Concepts / Network attacks

Network attacks

Pivoting

Also called pivot, ssh dynamic forwarding, proxy pivot, socks relay

Using a host you already control as a relay to reach a network that has no route from where you stand — the compromised box bridges the two segments.

The owned host is the only bridge
The owned host is the only bridge

No route leads from the attacker to the internal network. Connections sent into the SOCKS proxy come out of the owned host, which is already inside.

Pivoting is using a host you already control as a relay to reach a network you have no route to. The host sits in both networks, so connections sent through it come out on the inside. With SSH, ssh -D 1080 opens a [[socks-proxy|SOCKS proxy]] on your machine, and curl --socks5-hostname 127.0.0.1:1080 then reaches internal addresses. Nothing is routed between the networks: the owned host is the only bridge.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab