T1090.003: Multi-hop Proxy

Adversaries may chain together multiple proxies to disguise the source of malicious traffic. Typically, a defender will be able to identify the last proxy traffic traversed before it enters their network; the defender may or may not be able to identify any previous proxies before the last-hop proxy. This technique makes identifying the original source of the malicious traffic even more difficult by requiring the defender to trace malicious traffic through several proxies to identify its source.

For example, adversaries may construct or use onion routing networks – such as the publicly available Tor network – to transport encrypted C2 traffic through a compromised population, allowing communication with any device within the network.

In the case of network infrastructure, it is possible for an adversary to leverage multiple compromised devices to create a multi-hop proxy chain (i.e., Network Devices). By leveraging Patch System Image on routers, adversaries can add custom code to the affected network devices that will implement onion routing between those nodes. This method is dependent upon the Network Boundary Bridging method allowing the adversaries to cross the protected network boundary of the Internet perimeter and into the organization’s Wide-Area Network (WAN). Protocols such as ICMP may be used as a transport.

Similarly, adversaries may abuse peer-to-peer (P2P) and blockchain-oriented infrastructure to implement routing between a decentralized network of peers.

Positive Technologies products that cover the technique

Detection

PT NAD can detect proxy chains, commonly used in the Tor network, and other methods used for traffic proxying.

Examples of PT NAD detection rules

  • POLICY [PTsecurity] TOR SSL connection (sid 10001464)
  • TOOLS [PTsecurity] Pivotnacci proxy through web shell (sid 10007668)
  • TOOLS [PTsecurity] Neo-reGeorgTool (sid 10006797)
  • TOOLS [PTsecurity] reGeorg http tunnel response (sid 10006153)

Examples of PT NAD filters

  • app_proto == "socks5"
  • (rpt.cat == "tor-relays" && app_proto == "tls" and rpt.where == "flow.dst") or alert.msg ~ "*[PTsecurity]TOR"

PT NAD detection modules

  • Connections to external SOCKS5 proxies
  • Connections to external OpenVPN servers
  • [Abnormal] Established connections to a new external port
  • Connections to Tor relays

Detection

IDDS0029Data source and componentNetwork Traffic: Network Traffic ContentDescription

Monitor and analyze traffic patterns and packet inspection associated to protocol(s) that do not follow the expected protocol standards and traffic flows (e.g extraneous packets that do not belong to established flows, gratuitous or anomalous traffic patterns, anomalous syntax, or structure). Consider correlation with process monitoring and command line to detect anomalous processes execution and command line arguments associated to traffic patterns (e.g. monitor anomalies in use of files that do not normally initiate connections for respective protocol(s)).

IDDS0029Data source and componentNetwork Traffic: Network Traffic FlowDescription

Monitor network data for uncommon data flows. Processes utilizing the network that do not normally have network communication or have never been seen before are suspicious.

IDDS0029Data source and componentNetwork Traffic: Network Connection CreationDescription

Monitor for newly constructed network connections that are sent or received by untrusted hosts.

Mitigation

IDM1037NameFilter Network TrafficDescription

Traffic to known anonymity networks and C2 infrastructure can be blocked through the use of network allow and block lists. It should be noted that this kind of blocking may be circumvented by other techniques like Domain Fronting.