Pivoting Techniques

Understanding Pivoting

Pivoting is a technique used to route traffic through a compromised machine to reach an otherwise inaccessible network. This is useful for post-exploitation, enumeration, and lateral movement.


SSH Pivoting

Establishing an SSH Connection

ssh -i pivot [email protected]

Understanding the Network


ProxyChains

ProxyChains allows tunneling network traffic through an SSH connection, enabling tools like nmap, xfreerdp, and firefox to work through the pivoted machine.

Configuring ProxyChains

  1. Open and edit the ProxyChains configuration file:

    sudo nano /etc/proxychains4.conf
    
  2. Find the following line at the bottom:

    socks4 127.0.0.1 9050
    

    This tells ProxyChains to route all connections through a SOCKS4 proxy running on localhost (127.0.0.1) at port 9050.

    By default, Tor uses this port for SOCKS proxying, but in your case, it is likely used for SSH dynamic port forwarding (ssh -D 9050), creating a pivot point into another network.