Attacking Enterprise Networks: Double Pivot using Chisel


At the end of “Attacking Enterprise Networks” the module “Post-Exploitation” describes how to set up MSF autoroute to perform a double pivot and proxy traffic over 2 intermediate hops:

`Attack host` --> `dmz01` --> `DC01` --> `MGMT01`

I am currently trying to figure out how to perform the same task with chisel through installation of a client / server process on the DMZ jump host.
Is there anyone who has tried that out successfully?

Many thanks!

I CANNOT get it to work with meterpreter at all, I’ve been on it for ages.


I ended up setting up a port forward on DC01 with netsh in the end.

Tried several configuration in the Lab Environment and finally got a Chisel Double Pivot to work!

We are connecting via
Kali ( <<>> DMZ01 ( | <<>> DC01 ( | <<>> MGMT01 (

On our local Kali:

./chisel_linux server --socks5 -p 9001 --reverse


socks5 9999
socks5 8888


./chisel_linux client R:9999:socks
./chisel_linux server  -p 9002 --reverse --socks5 


chisel.exe client R:8888:socks

Now close any Socks4 connection (e.g. SSH Dynamic Port Forward) and comment in /etc/proxychains

#socks4 9050

Scan Target MGMT01 via socks5 proxy:

└─$ proxychains nmap -sT -p 22                                                    
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/
[proxychains] DLL init: proxychains-ng 4.14
Starting Nmap 7.91 ( ) at 2022-11-11 17:27 EST
[proxychains] Strict chain  ...  ...  ... <--socket error or timeout!
[proxychains] Strict chain  ...  ...  ...  ...  OK
RTTVAR has grown to over 2.3 seconds, decreasing to 2.0
Nmap scan report for
Host is up (14s latency).

22/tcp open  ssh

Nmap done: 1 IP address (1 host up) scanned in 16.31 seconds

This saved my bacon! Thank you! I could not get metasploit to work for some reason. I also much prefer chisel.

1 Like

Great I could help with that!
Although MSF autoroute was working for me, the connection was very instabile and it would die in regular time intervals. Then I had to do the whole setup in MSF again. With Chisel it is much less of a hassle…

Although I have not yet tried it, it should be possible to extend the chain beyond 2 hops in that configuration!

Weird part was MSF was working a couple weeks ago. But following the same steps I couldn’t ever get it to work this week. I could get everything except the connection to MGMT01 to work with MSF.

Were you able to gain access to MGMT via Meterpreter? I followed to a “T” on obtain the double hop port forward and I am getting port 22 closed for, and I do ping sweep no other IP’s are showing alive other than the DC. my question is it how I have my proxy set up that its causing this error. I cannot figure this one out. Any hint would be grateful.
thank you

Yes, when I was doing the module 6 months ago, I was able to reach MGMT via Metasploit Autoroute.
Provided nothing has been changed in the lab setup, it should still work if you follow the exact steps shown in the module text.
However, I found this setup extremely unstable. Very often, the second reverse shell from Windows machine 1 back to the Linux Host would die (especially when using connection heavy tools such as CME). Then you have to repeat all the necessary steps to get another connection.

In short: Yes, it should work!

This post was very very helpful in my training for OSCP, thank you for your explanation. You’ve greatly improved the quality of my notes.

1 Like

This is an epic effort, great work!

Did you figure this out? I’m getting 22 closed as well, and not showing other hosts as alive…

Just wanted to say thanks for the info!! It was most definitely needed!

Thank you bro, I’m doing Dante Pro Lab right now, and there I also had to use Double Pivot, and your guide really helped :heart:

Thanks so much, was getting so frustrated with this final challenge. Always annoying when it does not work as shown in the course…

you resolved the issue man… this post be included in the course… the content in the course has alot of issues… instability and conceptual confusions…

Hey guys, I am unable to discover the last host (the one on the subnet). I am using a standard pingsweep from DC01:

1..254 | ForEach-Object {"172.16.9.$($_): $(Test-Connection -count 1 -comp 172.16.9.$($_) -quiet)"} | Out-File -FilePath "output.txt"

With this command I am getting only a hit on which is the DC01 host itself.
Anyone know what the problem might be?

I had the same issue. In my case I repeated the ping sweep a couple of times and worked. You should see the same additional host as in the course steps.

Generally, this specific lab is highly unstable connection-wise which in turn results multiple tries to be sure that something is not correct or the net failed.

“Stealing” the idea from our friend Rapunzel3000, you can make the metasploit setup work if you go to ‘/etc/proxychains’ and comment out the line we set up for the initial ssh pivot connection:

#socks4 8081

But do not close the SSH pivot connection. It will kill all connections using it and of course the dependent meterpreter sessions.

After that, the scan is successful (port 22 open)l and the access to the server achieved.

Hey guys, has anyone been able to run Metsasploit over the double chisel pivot? I have found that while the double chisel pivot works, many tools have a very hard time working with it. For example, burpsuite, gobuster, ffuf, metasploit. I know how to set up metasploit with a single socks proxy but I have no idea how to do 2. If anyone knows, please share.