Course contentsShow
← Security
Lesson 2242 of 3,05243. Offensive Security ToolingFree lesson

Chisel and Ligolo for Reverse Tunneling

Establish reverse tunnels through firewalls using Chisel and Ligolo to access internal networks from compromised endpoints.

Chisel and Ligolo for Reverse Tunneling

What you'll learn: How to establish reverse tunnels through firewalls using Chisel and Ligolo, enabling access to internal networks from compromised external endpoints.

The Challenge: Firewalls Block Inbound Connections

When you compromise a system inside a protected network, firewalls typically block your direct access to internal services. The firewall allows outbound connections from the compromised host but blocks your inbound attempts. You need a way to "flip" the connection direction.

How Reverse Tunnels Work

Think of a reverse tunnel like a call-back mechanism. Instead of you calling into the protected network (blocked), the compromised machine calls out to your attack server. Once connected, you piggyback on that outbound connection to reach internal resources.

Chisel is a fast TCP/UDP tunnel transported over HTTP, secured via SSH. You run a Chisel server on your attack box and a Chisel client on the compromised host. The client connects outbound, creating a tunnel you can route traffic through using SOCKS proxies.

Ligolo-ng (modern Ligolo) creates a virtual network interface on your attacker machine, making pivoting feel like you're directly on the internal network. The compromised host runs a Ligolo agent that connects back to your Ligolo proxy, establishing the tunnel without needing proxy chains.

Choosing Your Tool

  • Chisel: Lightweight, single binary, perfect for quick SOCKS tunnels
  • Ligolo: More seamless routing, better for complex multi-hop scenarios

Both tools bypass egress filtering by using common protocols (HTTP/HTTPS) that firewalls typically allow outbound.

Typical Workflow

  1. Upload Chisel/Ligolo agent to compromised host
  2. Start server/proxy on your attack machine
  3. Execute client/agent on compromised host (connects outbound)
  4. Route traffic through the established tunnel to access internal services

Key Takeaway: Chisel and Ligolo solve the firewall problem by establishing reverse tunnels—the compromised host initiates an outbound connection that you then use as a highway into the protected internal network.