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.

Quick Reference Commands

Verified quick-reference commands for Ligolo-ng
CommandPurpose
./proxy -selfcertStart the proxy with a self-signed certificate in an isolated lab.
certificate_fingerprintDisplay the proxy certificate fingerprint.
interface_create --name LAB_TUNCreate a managed lab TUN interface.
interface_add_route --name LAB_TUN --route AUTHORIZED_CIDRAdd only the approved subnet route.
Ligolo-ng Quickstart

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
startStart the tunnel for the selected agent session
start --tun ligoloStart the tunnel binding traffic to a named tun interface
stopStop the running tunnel for the current agent session
listener_add --addr 0.0.0.0:1234 --to 127.0.0.1:4444Add an agent-side listener that forwards to an operator-side address
listener_add --addr 0.0.0.0:1234 --to 127.0.0.1:4444 --tcpAdd a TCP redirector from the agent to the operator
listener_add --addr 0.0.0.0:53 --to 127.0.0.1:53 --udpAdd a UDP redirector from the agent to the operator
listener_listList all active listeners/redirectors
listener_delete --id 0Delete a listener by its numeric ID
helpShow available proxy console commands
./agent -connect 10.10.10.10:11601 -vRun the agent with verbose logging for troubleshooting

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

Socat

Maintaining Access

Socat is a command line based utility that establishes two bidirectional byte streams and transfers data between them, widely used for establishing shells, port forwarding, and encrypted connections.

Chisel

Post Exploitation

Chisel is a fast TCP/UDP tunnel utility that encapsulates traffic over an HTTP transport channel, secured via SSH. It is useful for traversing firewall boundaries and pivoting inside network environments.

sshuttle

Post Exploitation

sshuttle acts as a transparent proxy server that forwards traffic over an SSH connection, configuring local routing rules without requiring administrator privileges on the remote server host.

ProxyChains

Post Exploitation

ProxyChains forces TCP connections made by arbitrary applications to follow user-configured proxy networks (such as TOR or SOCKS4/5 configurations), useful for obfuscation and internal pivoting.

Nmap

Information Gathering

Learn how to use Nmap, the free open-source network scanner: run your first port scan, discover live hosts, detect services and operating systems, and check for vulnerabilities with NSE scripts — a beginner tutorial for Kali Linux.

WireGuard

Maintaining Access

WireGuard is an extremely fast, modern VPN protocol that lives inside the Linux kernel and uses state-of-the-art cryptography — Curve25519 key exchange, ChaCha20Poly1305 encryption, and the Noise protocol framework — in a core codebase of only a few thousand lines. In penetration testing and red team work it creates secure, persistent tunnels for pivoting into internal networks and maintaining encrypted access, while system administrators use the same tool for site-to-site links and road-warrior VPNs. Every peer is identified by a single public key, traffic is bound to that key by cryptokey routing (AllowedIPs), and the protocol stays completely silent toward unauthenticated packets, which makes a WireGuard port nearly invisible to scanners.

Related Cybersecurity Guides

Networking · Beginner

How to Use WireGuard: Beginner's Guide to Setting Up a WireGuard VPN in Kali Linux

How to use WireGuard: install it on Kali Linux, build your first tunnel, verify it with wg show, and fix common problems — cheat sheet and 31 FAQs.

Linux · Beginner

SSH Fundamentals: Secure Remote Access and Administration

Learn SSH for secure remote access including key-based authentication, configuration, tunneling, port forwarding, and security hardening.

Wireless Security · Advanced

Aircrack-ng Guide: Complete Wireless Security Assessment

A comprehensive guide to the Aircrack-ng suite for wireless security testing including monitor mode, packet capture, deauthentication attacks, WPA/WPA2 cracking, and WEP analysis.

Getting Started · Beginner

Complete Kali Linux Beginner Guide 2027: From Zero to Hacker

Master Kali Linux from scratch with this comprehensive 2027 guide. Learn installation, essential commands, top tools, ethical hacking methodology, and career paths in cybersecurity.

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.