Fallback Channels
Adversaries may use fallback or alternate communication channels if the primary channel is compromised or inaccessible in order to maintain reliable command and control and to avoid data transfer thresholds. Malware families such as HOPLIGHT, InvisiMole, TrickBot, and BISCUIT implement hard-coded primary and secondary C2 addresses, while others like OilRig's ISMAgent dynamically fall back from HTTP to DNS tunneling. Detection focuses on processes establishing connections to multiple distinct external destinations in sequence — particularly where port diversity (80→443→8080) or protocol switching (HTTP→DNS) is observed — which is anomalous for non-browser processes.
// Primary detection: non-browser processes connecting to 3+ distinct external IPs
// or 3+ distinct ports within a 1-hour window, indicating fallback C2 behavior
let ExcludedProcesses = dynamic([
"chrome.exe", "firefox.exe", "msedge.exe", "iexplore.exe", "opera.exe", "brave.exe",
"MicrosoftEdgeUpdate.exe", "MsMpEng.exe", "OneDrive.exe", "Teams.exe", "Slack.exe",
"Zoom.exe", "Skype.exe", "outlook.exe", "lync.exe", "SearchApp.exe",
"msedgewebview2.exe", "WINWORD.EXE", "EXCEL.EXE", "POWERPNT.EXE"
]);
let C2FallbackPorts = dynamic([53, 80, 443, 4443, 8080, 8443, 8888, 1194, 4444, 9443, 2222, 3128]);
DeviceNetworkEvents
| where Timestamp > ago(24h)
| where RemoteIPType == "Public"
| where RemotePort in (C2FallbackPorts)
| where not(InitiatingProcessFileName has_any (ExcludedProcesses))
| summarize
UniqueDestIPs = dcount(RemoteIP),
UniqueDestPorts = dcount(RemotePort),
TotalConnections = count(),
DestinationIPs = make_set(RemoteIP, 10),
DestinationPorts = make_set(RemotePort, 10),
FirstSeen = min(Timestamp),
LastSeen = max(Timestamp)
by DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine,
InitiatingProcessId, InitiatingProcessParentFileName, bin(Timestamp, 1h)
| where UniqueDestIPs >= 3 or (UniqueDestPorts >= 3 and TotalConnections >= 5)
| extend ConnectionSpanMinutes = datetime_diff('minute', LastSeen, FirstSeen)
| extend RiskScore = case(
UniqueDestIPs >= 5 and UniqueDestPorts >= 3, "Critical",
UniqueDestIPs >= 4 or (UniqueDestPorts >= 3 and TotalConnections >= 8), "High",
UniqueDestIPs >= 3, "Medium",
"Low"
)
| project FirstSeen, LastSeen, ConnectionSpanMinutes, DeviceName, AccountName,
InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessParentFileName,
UniqueDestIPs, UniqueDestPorts, TotalConnections, DestinationIPs, DestinationPorts, RiskScore
| sort by UniqueDestIPs desc, UniqueDestPorts desc Data Sources
Required Tables
False Positives
- Software update clients and package managers (e.g., Windows Update components, npm, pip) that contact multiple CDN endpoints or mirror servers during downloads
- IT monitoring and management agents (SCCM, Qualys, Tenable) that beacon to multiple management servers or cloud endpoints
- Backup agents and cloud sync clients (Veeam, Backblaze, Crashplan) contacting multiple storage endpoints
- Custom business applications with built-in load-balancing or geographic failover logic connecting to multiple cloud provider IPs
- Security scanning tools and vulnerability assessment agents that make broad outbound connections as part of their normal operation
References (10)
- https://attack.mitre.org/techniques/T1008/
- https://www.mandiant.com/resources/apt1-exposing-one-of-chinas-cyber-espionage-units
- https://www.welivesecurity.com/2017/05/09/sednit-adds-two-zero-day-exploits-using-trump-decoy/
- https://us-cert.cisa.gov/ncas/analysis-reports/AR19-100A
- https://researchcenter.paloaltonetworks.com/2017/07/unit42-oilrig-uses-ismdoor-variant-possibly-linked-greenbug-threat-group/
- https://www.welivesecurity.com/wp-content/uploads/2018/06/ESET_InvisiMole.pdf
- https://www.welivesecurity.com/2017/10/30/ebury-is-alive-but-unseen/
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicenetworkevents-table
- https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/CommonStatsFunctions
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1008/T1008.md
Unlock Pro Content
Get the full detection package for T1008 including response playbook, investigation guide, and atomic red team tests.