GO KALI FREE

ProxyChains

Post Exploitation

Intermediatelow risk

ProxyChains forces TCP connections made by arbitrary applications to follow user-configured proxy networks (such as TOR or SOCKS4/5 configurations), useful for obfuscation and internal pivoting.

Installation

sudo apt install proxychains4

Basic Syntax

proxychains4 [program] [arguments]

Quick Facts

Full Name
ProxyChains-ng
License
GPL
Language
C
Interface
CLI (prepend to commands)
Category
Proxy Routing
Chaining
SOCKS4/5, HTTP, Dynamic/Strict/Random

Tool Overview

ProxyChains is a UNIX tool that forces network connections initiated by any TCP application to follow through user-defined proxy chains. It is essential for pivoting through networks and anonymizing penetration testing tools.

By intercepting the connect(), sendto(), and resolver functions via LD_PRELOAD, ProxyChains transparently routes traffic through proxy chains without requiring application modifications.

Common Commands

proxychains firefoxLaunch a program with its TCP connections forced through the proxy chain
proxychains4 nmap -sT -Pn 10.10.10.10Run a TCP connect scan tunneled through the proxy chain
proxychains -q curl http://example.comRun curl through the chain in quiet mode (suppress proxychains output)
proxychains -f /path/to/proxychains.conf nmap 10.10.10.10Use a specific configuration file instead of the default
proxychains ssh <USER>@10.10.10.10Tunnel an outbound SSH session through the proxy chain
proxychains nc 10.10.10.10 4444Route a raw TCP netcat connection through the chain
proxychains wget http://example.com/fileDownload a file over the proxy chain
proxychains sqlmap -u http://10.10.10.10/page?id=1Proxy a sqlmap request through the chain for anonymity/pivot
proxychains4 -q -f /etc/proxychains4.conf smbclient -L 10.10.10.10Enumerate SMB shares over the proxy chain quietly
cat /etc/proxychains4.confView the active proxychains-ng configuration
sudo nano /etc/proxychains4.confEdit the proxychains configuration (chain mode, DNS, ProxyList)
socks5 127.0.0.1 1080ProxyList entry: route through a local SOCKS5 proxy (e.g. an SSH -D tunnel)
socks4 127.0.0.1 9050ProxyList entry: route through a SOCKS4 proxy (e.g. Tor default port)
http 127.0.0.1 8080ProxyList entry: route through an HTTP CONNECT proxy (e.g. Burp)
socks5 127.0.0.1 1080 <USER> <PASS>ProxyList entry with SOCKS5 username/password authentication
dynamic_chainConfig directive: skip dead proxies and chain the live ones in order
strict_chainConfig directive: use all proxies in order; fail if any is down
random_chainConfig directive: use a random subset of proxies for each connection
chain_len = 2Config directive: number of random proxies to use with random_chain
proxy_dnsConfig directive: resolve DNS through the proxy to prevent DNS leaks
localnet 192.168.1.0/255.255.255.0Config directive: bypass the proxy for a directly reachable local subnet
tcp_read_time_out 15000Config directive: TCP read timeout in milliseconds
tcp_connect_time_out 8000Config directive: TCP connect timeout in milliseconds
proxychains proxychains nmap 10.10.10.10Nest proxychains to demonstrate chaining, though a single config is preferred
proxychains4 --helpDisplay proxychains-ng usage and options

Step-by-Step Guide

  1. 1Edit the configuration file located at /etc/proxychains4.conf
  2. 2Adjust the chaining rules and append your specific proxy addresses
  3. 3Save your changes and close the editor
  4. 4Prepend the command 'proxychains4' to any network tool to force it through the established route

Warnings

Use Cases

Anonymous Scanning

Route nmap through Tor or SOCKS proxies.

Pivoting

Chain through multiple compromised hosts.

Traffic Obfuscation

Hide source IP through proxy chains.

Access Restriction Bypass

Reach internal networks via intermediate hosts.

Key Features

Related Tools

Chisel

Post Exploitation

Chisel is a fast TCP/UDP tunnel utility that encapsulates traffic over an HTTP transport channel, secured via SSH. It is useful for traversing firewall boundaries and pivoting inside network environments.

sshuttle

Post Exploitation

sshuttle acts as a transparent proxy server that forwards traffic over an SSH connection, configuring local routing rules without requiring administrator privileges on the remote server host.

Socat

Maintaining Access

Socat is a command line based utility that establishes two bidirectional byte streams and transfers data between them, widely used for establishing shells, port forwarding, and encrypted connections.

WinPEAS

Post Exploitation

WinPEAS is a script designed to discover local privilege escalation paths on Windows environments. It audits configurations, user security rights, system vulnerabilities, and active processes.

CrackMapExec

Post Exploitation

CrackMapExec (CME) is a post-exploitation tool for pentesting Windows and Active Directory networks. It can enumerate users, spray passwords, execute commands, and move laterally.

NetExec

Post Exploitation

NetExec (formerly CrackMapExec successor) is a post-exploitation tool for enumerating and attacking Active Directory environments. It automates SMB, WinRM, LDAP, and SSH attacks across large networks with support for Kerberos, NTLM, and pass-the-hash authentication.

Related Cybersecurity Guides

Active Directory · Advanced

Lateral Movement: Moving Through Network Environments

A comprehensive guide to lateral movement techniques in Windows networks including pass-the-hash, pass-the-ticket, PSExec, WMI, DCOM, and WinRM for authorized penetration testing.

Active Directory · Advanced

Pass-the-Hash: Understanding NTLM Authentication Attacks

An in-depth look at pass-the-hash attacks against NTLM authentication, how they work, real-world exploitation scenarios, detection techniques, and defense strategies.

Active Directory · Advanced

Active Directory Fundamentals: Windows Network Domains

A comprehensive introduction to Microsoft Active Directory covering domain services, LDAP, Group Policy, authentication protocols, and security fundamentals for Windows enterprise environments.

Active Directory · Advanced

BloodHound Guide: Mapping Active Directory Relationships

Learn how to use BloodHound and SharpHound for Active Directory reconnaissance, attack path analysis, privilege escalation detection, and security assessment.

Frequently Asked Questions

What is ProxyChains used for?

ProxyChains forces any TCP-based application to route its traffic through a chain of SOCKS4/5 or HTTP proxies, enabling anonymous scanning, pivoting through multiple networks, and traffic obfuscation.

How does ProxyChains chain proxies?

ProxyChains supports three chaining modes: dynamic (skip dead proxies), strict (use all in order), and random (randomize proxy order). Configured in /etc/proxychains4.conf.

Does ProxyChains work with nmap?

Yes, but only TCP scans (-sT) work through ProxyChains because the tool cannot route raw packets. Use it with caution as scans through proxies are significantly slower.

Can I use ProxyChains with Tor?

Yes, configuring ProxyChains to use Tor's local SOCKS proxy (127.0.0.1:9050) is a common setup for anonymous scanning and browsing during security assessments.

Tags

#post-exploitation#pivoting#proxy#traffic-routing

Output Explanation

The console displays the routing path for each connection attempt, prefixed with [proxychains], confirming whether the network request succeeded or failed.

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.