Detect Multi-hop Proxy in CrowdStrike LogScale
Adversaries may chain together multiple proxies to disguise the source of malicious traffic. Techniques include Tor onion routing, ProxyChains, SOCKS proxy chaining, operational relay box (ORB) networks, and peer-to-peer routing to make attribution difficult. Defenders can typically only see the last hop before their network boundary.
MITRE ATT&CK
- Tactic
- Command and Control
- Technique
- T1090 Proxy
- Sub-technique
- T1090.003 Multi-hop Proxy
- Canonical reference
- https://attack.mitre.org/techniques/T1090/003/
LogScale Detection Query
// Branch 1: Known proxy tool process creation (ProcessRollup2)
#event_simpleName = ProcessRollup2
| FileName = /(?i)(tor\.exe|proxychains|proxifier\.exe|3proxy\.exe|srelay\.exe|microsocks|redsocks|plink\.exe)/
OR CommandLine = /(?i)(proxychains|socks5|socks4a?|tor2web|proxyjump|proxycommand|dynamicforward)/
OR (FileName = /(?i)^ssh(\.exe)?$|plink\.exe$/ AND CommandLine = /(?i)(\s-[DJw]\s|proxyjump|proxycommand)/)
| eval DetectionType = case(
FileName = /(?i)(tor\.exe|proxychains|proxifier|3proxy|srelay|microsocks|redsocks)/, "KnownProxyTool",
FileName = /(?i)(ssh(\.exe)?$|plink)/ AND CommandLine = /(?i)(-D |-J |proxyjump|proxycommand)/, "SSHMultiHopProxy",
CommandLine = /(?i)(socks5|socks4|tor2web|proxyjump|proxycommand|dynamicforward)/, "SuspiciousProxyArg",
"SuspiciousProxy")
| table(@timestamp, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName, DetectionType)
| union {
// Branch 2: Network connections to Tor relay ports (NetworkConnectIP4)
#event_simpleName = NetworkConnectIP4
| RemotePort in [9001, 9030, 9040, 9050, 9051, 9150, 9151]
| RemoteAddressIP4 != /^(10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.|127\.)/
| eval DetectionType = "TorPortConnection"
| table(@timestamp, ComputerName, UserName, LocalAddressIP4, RemoteAddressIP4, RemotePort, DetectionType)
}
| sort(@timestamp, order=desc) Detects T1090.003 multi-hop proxy activity using CrowdStrike Falcon EDR telemetry in LogScale. Combines two branches via union: Branch 1 matches ProcessRollup2 events where FileName matches known proxy executables (Tor, ProxyChains, Proxifier, 3proxy, microsocks, redsocks, plink) or CommandLine contains SOCKS proxy keywords and SSH dynamic forwarding arguments (-D, -J, -w, ProxyJump, ProxyCommand). Branch 2 matches NetworkConnectIP4 events with RemotePort in the Tor relay port set where RemoteAddressIP4 is not a private RFC1918 address. Both branches are classified by DetectionType and sorted by timestamp descending.
Data Sources
Required Tables
False Positives & Tuning
- IT security engineers or red team operators running Tor-based C2 simulations or ProxyChains pivoting on Falcon-enrolled endpoints during authorized, time-boxed penetration test exercises
- System administrators establishing SSH dynamic port forwarding tunnels or plink-based multi-hop sessions to reach isolated network segments through authorized jump hosts
- Tor Browser installed by employees for personal anonymity use on BYOD or lightly managed endpoints, producing repeated Tor port connection events that are policy violations but not adversarial activity
Other platforms for T1090.003
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Launch Tor Process as SOCKS Proxy
Expected signal: Sysmon Event ID 1: Process Create with Image path in %TEMP%\tortest\tor\tor.exe and CommandLine containing --SocksPort 9050. Sysmon Event ID 3: Multiple outbound TCP connections to public IPs on ports 9001 and 9030 (Tor directory and guard connections). Sysmon Event ID 11: File creation events for tor.exe and torrc in non-standard temp path.
- Test 2ProxyChains Multi-hop Configuration and Execution
Expected signal: Linux auditd/syslog: Process creation for proxychains4 with command line referencing the config file. Sysmon for Linux (if deployed) Event ID 1: Process Create for proxychains4 with full command line. Network connection attempts through the configured SOCKS chain. File creation event for /tmp/test_proxychains.conf.
- Test 3SSH Dynamic Port Forwarding (Multi-hop SOCKS Proxy)
Expected signal: Sysmon Event ID 1 (Linux) or Security Event ID 4688 (Windows with OpenSSH): Process Create for ssh with CommandLine containing '-D 1080' or '-J jumphost.example.com'. Sysmon Event ID 3: Outbound TCP connection to 192.0.2.1:22 and jumphost.example.com:22. The -D flag creates a listening socket on local port 1080 visible in netstat/socket monitoring.
- Test 4SOCKS Proxy via Netcat/Ncat Relay Chain Simulation
Expected signal: Sysmon Event ID 1: Multiple ncat.exe or nc.exe process creation events with -l (listen) and -c (command/forward) flags. Sysmon Event ID 3: Network listen and connection events on ports 18080 and 18081. Security Event ID 4688 (if command line auditing enabled): ncat.exe process creation with forwarding arguments.
References (12)
- https://attack.mitre.org/techniques/T1090/003/
- https://en.wikipedia.org/wiki/Onion_routing
- https://cloud.google.com/blog/topics/threat-intelligence/china-nexus-espionage-orb-networks
- https://unit42.paloaltonetworks.com/manageengine-godzilla-nglite-kdcsponge/
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa21-200a
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-129a
- https://www.welivesecurity.com/2018/10/17/greyenergy-updated-arsenal-dangerous-threat-actors/
- https://www.torproject.org/about/history/
- https://github.com/rofl0r/proxychains-ng
- https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicenetworkevents-table
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1090.003/T1090.003.md
Unlock Pro Content
Get the full detection package for T1090.003 including response playbook, investigation guide, and atomic red team tests.