Skip to content
socks4 reverse proxy for penetration testing
Branch: master
Clone or download
artkond Merge pull request #3 from Gifts/master
Providing possibility to launch rpivot without pyinstaller
Latest commit 4963487 Jul 12, 2018

RPIVOT - reverse socks 4 proxy for penetration tests

RPIVOT allows to tunnel traffic into internal network via socks 4. It works like ssh dynamic port forwarding but in the opposite direction.


This tool is Python 2.6-2.7 compatible and has no dependencies beyond the standard library. It has client-server architecture. Just run the client on the machine you want to tunnel the traffic through. Server should be started on pentester's machine and listen to incoming connections from the client.

Works on Kali Linux, Solaris 10, Windows, Mac OS.

Usage example

Start server listener on port 9999, which creates a socks 4 proxy on upon connection from client:

python --server-port 9999 --server-ip --proxy-ip --proxy-port 1080

Connect to the server:

python --server-ip <rpivot_server_ip> --server-port 9999

To pivot through an NTLM proxy:

python --server-ip <rpivot_server_ip> --server-port 9999 --ntlm-proxy-ip <proxy_ip> --ntlm-proxy-port 8080 --domain CONTOSO.COM --username Alice --password P@ssw0rd

Pass-the-hash is supported:

python --server-ip <rpivot_server_ip> --server-port 9999 --ntlm-proxy-ip <proxy_ip> --ntlm-proxy-port 8080 --domain CONTOSO.COM --username Alice --hashes 9b9850751be2515c8231e5189015bbe6:49ef7638d69a01f26d96ed673bf50c45

You can use proxychains to tunnel traffic through socks proxy.

Edit /etc/proxychains.conf:

# add proxy here ...
# meanwile
# defaults set to "tor"
socks4 1080

Using single zip file mode:

zip -r *.py ./ntlm_auth/
python server <server_options>
python client <client_options> 

Pivot and have fun:

proxychains <tool_name>

Pre-built Windows client binary available in release section.


Artem Kondratenko

You can’t perform that action at this time.