proxychains-ng
Proxychains-ng is a tool that forces TCP connections from applications to go through SOCKS4a/5 or HTTP proxies. It hooks libc functions via LD_PRELOAD to redirect network traffic transparently.
Description
Proxychains-ng is a continuation of the original proxychains project and enables users to proxy TCP connections through SOCKS or HTTP proxies. It works by preloading a shared library that intercepts network-related libc functions in dynamically linked programs, redirecting their connections accordingly. This is particularly useful for maintaining anonymity or bypassing network restrictions in penetration testing scenarios.
The tool consists of packages like proxychains4, which provides the main executable for proxying applications, and libproxychains4, the runtime shared library. Users can run any command-line program through proxychains-ng to route its traffic via configured proxies. It supports TCP only and does not handle UDP or ICMP.
Additional features include a daemon mode for remote DNS resolution, allowing flexible proxy chaining configurations defined in a config file.
How It Works
Proxychains-ng hooks network-related libc functions in dynamically linked programs using a preloaded DLL via dlsym() and LD_PRELOAD. It intercepts calls and redirects TCP connections through SOCKS4a/5 or HTTP proxies. The configuration is specified in a config file, and the tool operates transparently without modifying the target application.
Installation
sudo apt install proxychains4Flags
Examples
proxychains4 -q -f config_file program_name [arguments]proxychains4 telnet somehost.comproxychains4 --helpproxychains4-daemon -hproxychains4-daemon -i listenip -p port -r remotesubnetproxychains4-daemonproxychains4 nmap -sT target