Dynamic Port Forwarding with SSH and SOCKS Tunneling

June 19, 2024

First we have to configure proxychains

sudo subl /usr/local/etc/proxychains.conf

Secnd we have to forward the victim # 2 machine and its port

Since 172.16.5.19 is only access via 10.129.181.10 but not in my attacker machine

ssh -L 1234:172.16.5.19:3389 ubuntu@10.129.181.10

Then just use proxychains to localhost / 172.16.5.19 which we port forwarded earlier

Our localhost will now act like the 172.16.5.19

./proxychains4 nmap -v -Pn -sT localhost -p 1234 -sC -sV

Now we can access the flag of victor in 172.16.5.19 via localhost

./proxychains4 xfreerdp /v:localhost:1234 /u:victor /p:pass@123

Last updated