PROXYCHAINS
MULTI-HOP
LD_PRELOAD
SOCKS CHAIN
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting proxychains: Chained-Proxy Pivoting and Config Artifacts

proxychains forces ordinary tools through a list of proxies in sequence. On a compromised host that list is a map of the operator’s pivot path.

Scroll

proxychains (and its maintained fork, proxychains-ng, installed as proxychains4) hooks network calls in a target program using LD_PRELOAD and routes them through a configured list of SOCKS4, SOCKS5 or HTTP proxies. The chain modes are strict_chain, dynamic_chain and random_chain. Operators use it to push scanners and administration tools through one or more pivots, which is multi-hop proxying.

Signals at a Glance

SignalWhereATT&CK
proxychains or proxychains4 as the parent or wrapper of a scanner or clientauditd, Sysmon for Linux, EDRT1090.003
proxychains.conf or proxychains4.conf created or edited in a user or temp pathFile events, FIMT1090.003
libproxychains4.so loaded through LD_PRELOAD by an unrelated processEDR module-load, auditdT1574.006
Sequential SOCKS connections hop to hop between internal hostsZeek socks.log, flowT1090.001
PROXYCHAINS_CONF_FILE set in the process environmentEDR environment captureT1090.003

Execution and Config Artifacts

The wrapper appears in the process tree: the operator prefixes a tool such as nmap, ssh or curl with proxychains4. The config lists the chain in [ProxyList] and usually points the first hop at a local SOCKS listener on 127.0.0.1. A Sigma rule for the wrapper and the preload:

title: proxychains Wrapper Execution
logsource:
  category: process_creation
  product: linux
detection:
  selection_wrapper:
    Image|endswith:
      - '/proxychains'
      - '/proxychains4'
  selection_parent:
    ParentCommandLine|contains:
      - 'proxychains'
  selection_env:
    CommandLine|contains:
      - 'LD_PRELOAD=libproxychains'
      - 'PROXYCHAINS_CONF_FILE'
  condition: selection_wrapper or selection_parent or selection_env
level: high
# tune/validate: expect penetration-testing hosts and red-team jump boxes;
# allow-list them by hostname and keep the rule firing everywhere else.

Config creation is a useful second layer, since chains are written per engagement and the wrapper itself can be renamed:

# auditd - watch for proxychains configs and the preload library
-w /etc/proxychains.conf -p wa -k proxychains_cfg
-w /etc/proxychains4.conf -p wa -k proxychains_cfg
-a always,exit -F arch=b64 -S execve -F exe=/usr/bin/proxychains4 -k proxychains_exec
# tune/validate: per-user configs live in ~/.proxychains/; add FIM for home
# directories on servers or hunt with a file-content search for [ProxyList].

Multi-Hop Behaviour on the Network

The compromised host runs the wrapper, and the first hop is often a local SOCKS port that forwards to the next pivot. East-west, you see a series of SOCKS or tunnel connections where each host talks only to the next one. Draw the graph from Zeek socks.log and flow data and mark any host that is both a SOCKS server and a SOCKS client:

Vetted sources

Use SigmaHQ Linux rules for proxy tools and LD_PRELOAD abuse, Elastic rules for Linux proxy and preload behaviour, the proxychains-ng documentation for configuration grammar, Zeek socks.log and your auditd baseline. Always baseline your own environment — penetration-test infrastructure legitimately uses proxychains and must be allow-listed explicitly.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026