The idea
The first box I land on is rarely the goal — it is a door into a network I otherwise cannot route to. Pivoting is about turning that one host into a path for my tools to reach everything behind it.
How I work through it
SSH is my default. A dynamic forward gives a SOCKS proxy I can point the whole toolkit through:
ssh -D 1080 user@10.10.10.10
# /etc/proxychains.conf -> socks5 127.0.0.1 1080
proxychains nmap -sT -Pn 172.16.5.0/24
Local and remote forwards for reaching a single internal service, or exposing my attack box to a host that can only call back:
ssh -L 8080:172.16.5.20:80 user@10.10.10.10 # pull a remote port to me
ssh -R 9001:127.0.0.1:9001 user@10.10.10.10 # push a port to the pivot
When SSH is not available I use a purpose-built pivot (Ligolo-ng, Chisel) to stand up a tunnel and route a subnet through it, which is cleaner than chaining forwards by hand.
Pitfalls I watch for
- Proxychains only carries full TCP connects — SYN scans and ICMP do not traverse it, so I scan with
-sT -Pnthrough a proxy. - Proxied scans are slow; I enumerate a few known hosts rather than sweeping a whole range through the tunnel.
- Draw the network as I go. Losing track of which host reaches which subnet is how a pivot chain falls apart.
Takeaway
A foothold is only as useful as the reach it gives you. Get a stable SOCKS proxy up early, keep a map of the segments, and the internal network becomes as reachable as the perimeter.