Ligolo
Guide Basic usage From Kali:
sudo ip tuntap add user pop mode tun ligolosudo ip link set ligolo upsudo ip route add $targetIP.0/24 dev ligolosudo ./proxy -selfcert
From Windows Target (agent file):
.\ligolo.exe -connect $kaliIP:11601 -ignore-cert
OR
From Linux Target (agent file):
./ligolo -connect $kaliIP:11601 -ignore-cert
Then from Kali:
session1Startlistener_add --addr 0.0.0.0:5555 --to 127.0.0.1:6666This allows you to access port 5555 on target from 127.0.0.1:6666 (kali machine).
Local Port Forwarding:
- ip route add 240.0.0.1/32 dev ligolo
- 240.0.0.1 will point to whatever machine Ligolo-ng has an active tunnel on.
Other tools
While the OSCP Lab discusess other tools such as socat, sshuttle, and plink, I found that Ligolo-ng was able to provide all of the same functionality and more simply. That said, I am linking a guide discusess the other tools. Here is frankyyano’s Pivoting & Tunneling guide.
Tips
Port scanning through a tunnel can take a while, and it may be only TCP scans that work so no UDP or ICMP