ssh
ssh -L 10000:localhost:10000 agent47@10.10.220.153
# Port forward mysql from victim machine to attacker machine
# Then we can just use nmap to scan localhost 3306
ssh -L 1234:localhost:3306 ubuntu@10.129.202.64
# This command will port forward the other victim machine IP and its port
# That is not accessible by the attacker machine but through pivot machine only
# Now we can access the victim # 2 machine via localhost 3389
ssh -L 1234:172.16.5.19:3389 ubuntu@10.129.181.10
# This will enable dynamic port forwarding
# Now we can access other ips using proxychains command
# Like proxychain nmap
# But be sure to edit the /etc/proxychains.conf or something to add socks5 port 9050
ssh -D 9050 ubuntu@10.129.202.64
Last updated