Metasploit With Proxychains -
Routing the Matrix: How to Run Metasploit Through ProxyChains (For Anonymity & Pivoting)
| Feature | Works? | Explanation | | :--- | :--- | :--- | | TCP Connect scans ( scanner/portscan/tcp ) | ✅ Yes | Pure TCP handshake. | | Most TCP exploits (e.g., SMB, SSH, FTP) | ✅ Yes | As long as payload is TCP-based. | | Meterpreter reverse_tcp | ⚠️ Tricky | Callback must also go through proxy chain. Use bind_tcp or reverse_https with proxy-aware stagers. | | UDP-based exploits (SNMP, DNS) | ❌ No | ProxyChains only hooks TCP. | | SYN stealth scans | ❌ No | Requires raw sockets. | | Nmap -sS or -sU via proxychains | ❌ No | Use -sT or switch to Metasploit's portscan. | | db_nmap inside msf | ❌ No | Nmap launched from msf ignores the proxychains wrapper. | metasploit with proxychains
proxychains4 curl ifconfig.me If configured with Tor, you should see a Tor exit node IP, not your real IP. Routing the Matrix: How to Run Metasploit Through
socks4 127.0.0.1 9050 If you have a compromised host acting as a SOCKS proxy (via auxiliary/server/socks_proxy ), add its IP: | | Meterpreter reverse_tcp | ⚠️ Tricky |
proxychains4 nmap -sT -Pn -p 80 example.com Note: Only -sT (TCP Connect) scans work, not -sS (SYN stealth). The magic command is simple: prefix msfconsole with proxychains4 .
sudo proxychains4 msfconsole ProxyChains needs to bind to privileged ports (under 1024) for certain modules, and raw packet operations often require root.