Pivoting
SSH Local Port Forwarding
# Below sets up local port 8123 forwarded thru victim to reach port 80 on target.local
ssh -L 8123:target.local:80 pwner@victim
curl localhost:8123
attacker:8123 -> 10.0.0.1:22 -> 10.0.0.5:80
# Below creates a tunnel with the established private key. Creates tunnel on https://localhost:4443
sudo ssh -i ~/.ssh/id_rsa -X -Y -C -g -L 4443:1.1.1.1:443 [email protected]
# Below forwards a port on the victim localhost to be accessible (i.e. MySQL for localhost only)
ssh -L 3306:localhost:3306 pwnt@victim
mysql -u root -pSSH Dynamic Port Forwarding
ssh -D 9123 pwnt@victimSSH Remote Port Forwarding
Meterpreter/MSF Forwarding
Socat
IPtables
Windows Portproxy
Ngrok
Last updated