Back to Skills

tunneling-and-pivoting

Tunneling and pivoting playbook. Use when establishing network tunnels through compromised hosts including SSH tunneling, Chisel, Ligolo-ng, socat, DNS/ICMP/HTTP tunneling, ProxyChains, and multi-layer pivoting strategies.

1,311stars179forksUpdated 7/8/2026

Security Assessment

High Risk(35/100)

Detected risks:

Secret Exposure([SKILL.md] secret=)
Sensitive File Access([SKILL.md] .ssh/)
Privilege Escalation([SKILL.md] sudo)
Security Score35/100

About tunneling-and-pivoting

A tunneling and pivoting playbook for moving traffic through compromised hosts to reach otherwise unreachable internal networks during an authorized penetration test. It catalogs the major techniques for building tunnels and routing traffic, organized so the practitioner can select a method based on what egress the pivot host allows. Coverage spans SSH port forwarding in all its forms (local, remote, dynamic SOCKS, and ProxyJump), the Chisel reverse SOCKS proxy, Ligolo-ng transparent TUN-interface pivoting, socat relays, and ProxyChains configuration for chaining proxies.

Reach for this after initial access is established and the next objective is to enumerate or exploit services that sit behind the pivot. The material walks through single and multi-layer (double) pivots, Windows-specific forwarding via netsh portproxy and plink, and covert channels for locked-down environments: DNS tunneling with iodine and dnscat2, ICMP tunneling with icmpsh and ptunnel-ng, and HTTP tunneling through web shells using Neo-reGeorg and Tunna.

The core decision aid is an egress-aware matrix mapping allowed outbound traffic (any TCP, only 80/443, DNS only, ICMP only, no outbound, or web-shell only) to the appropriate tool, plus a decision tree for choosing an approach based on whether tools can be installed on the compromised host. Concrete command examples accompany each technique, and the skill cross-references related playbooks for reverse shells, network-protocol attacks, service exploitation, and privilege escalation once a new host is reached.

FAQ

Which tunneling tool should I use if the pivot only allows outbound 80/443?

The egress matrix recommends Chisel over HTTP/S or Neo-reGeorg, since they blend with normal web traffic. For DNS-only egress it suggests iodine or dnscat2, and for ICMP-only it suggests ptunnel-ng or icmpsh.

What is Ligolo-ng used for here?

Ligolo-ng provides TUN-interface-based pivoting that routes traffic transparently without a SOCKS proxy. You bring up a tun device, run ligolo-proxy, connect an agent, then add ip routes for the internal networks over the ligolo interface.

Does it cover Windows pivoting?

Yes. It documents netsh interface portproxy for port forwarding (which requires admin) and plink (the PuTTY CLI) for dynamic SOCKS and remote port forwards, including a non-interactive host-key-accept form.

How is a reverse SOCKS proxy set up with Chisel?

The attacker runs chisel server with --reverse on a port, and the victim connects back as a client with R:socks, which exposes a SOCKS5 proxy on the attacker's 127.0.0.1:1080 for use with proxychains.

What is a double pivot?

Chaining two agents so a host on a first internal network tunnels to a second internal network, with routes for both added on the attacker. The skill shows this for Ligolo-ng and via chained ProxyChains SOCKS entries.

Install tunneling-and-pivoting

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill