Botnet
Adversaries may compromise numerous third-party systems to form a botnet that can be used during targeting. A botnet is a network of compromised systems that can be instructed to perform coordinated tasks. Instead of purchasing/renting a botnet from a booter/stresser service, adversaries may build their own botnet by compromising numerous third-party systems. Adversaries may also conduct a takeover of an existing botnet by redirecting bots to adversary-controlled C2 servers. With a botnet at their disposal, adversaries may perform follow-on activity such as large-scale phishing or Distributed Denial of Service (DDoS). Notable real-world operators include Volt Typhoon operating KV Botnet through compromised Cisco and NETGEAR SOHO routers, Sandworm's Cyclops Blink targeting SOHO network devices, HAFNIUM using compromised devices in covert proxy networks, and Axiom using large groups of compromised machines as proxy nodes.
// Detect systems exhibiting botnet node behavior: beaconing to external IPs with
// regular intervals, IRC C2 port usage, or high-frequency outbound connections
// suggesting DDoS participation or automated bot check-ins.
let LookbackPeriod = 24h;
let MinConnectionsThreshold = 20;
let MinHourlyBuckets = 3;
let BotnetC2Ports = dynamic([6667, 6697, 6660, 6661, 6662, 6663, 6664, 6665, 6666, 6668, 6669, 1080, 4444]);
let PrivateRanges = dynamic(["10.", "172.16.", "172.17.", "172.18.", "172.19.", "172.20.",
"172.21.", "172.22.", "172.23.", "172.24.", "172.25.", "172.26.", "172.27.", "172.28.",
"172.29.", "172.30.", "172.31.", "192.168.", "127.", "169.254."]);
DeviceNetworkEvents
| where Timestamp > ago(LookbackPeriod)
| where ActionType in ("ConnectionSuccess", "ConnectionAttempt")
| where RemoteIPType == "Public"
| where not(RemoteIP has_any (PrivateRanges))
// Aggregate per device + remote endpoint to identify repeated connections over time
| summarize
TotalConnections = count(),
HourlyBuckets = dcount(bin(Timestamp, 1h)),
BytesSent = sum(SentBytes),
BytesReceived = sum(ReceivedBytes),
FirstSeen = min(Timestamp),
LastSeen = max(Timestamp),
Processes = make_set(InitiatingProcessFileName, 10),
ProcessPaths = make_set(InitiatingProcessFolderPath, 5)
by DeviceName, AccountName, RemoteIP, RemotePort
| where TotalConnections >= MinConnectionsThreshold
| where HourlyBuckets >= MinHourlyBuckets
| extend
AvgConnectionsPerHour = round(todouble(TotalConnections) / HourlyBuckets, 1),
AvgBytesPerConnection = round(todouble(BytesSent + BytesReceived) / TotalConnections, 0),
DurationHours = datetime_diff('hour', LastSeen, FirstSeen),
IRCPort = RemotePort in (BotnetC2Ports)
// Score: IRC port use = 3, low-byte high-freq beaconing = 2, high-volume connections = 1
| extend BeaconingScore = case(
IRCPort == true, 3,
AvgBytesPerConnection < 500 and AvgConnectionsPerHour > 10, 2,
TotalConnections > 200 and HourlyBuckets >= 6, 2,
TotalConnections > 100, 1,
0
)
| where BeaconingScore >= 1
| project
FirstSeen, LastSeen, DeviceName, AccountName,
RemoteIP, RemotePort, IRCPort,
TotalConnections, HourlyBuckets, AvgConnectionsPerHour,
AvgBytesPerConnection, BytesSent, BytesReceived,
DurationHours, BeaconingScore, Processes, ProcessPaths
| sort by BeaconingScore desc, TotalConnections desc Data Sources
Required Tables
False Positives
- Monitoring and observability agents (Datadog, SolarWinds, PRTG, Zabbix) that check-in to cloud endpoints at regular intervals with small payloads
- Software update services and telemetry clients (Windows Update, browser update checks, antivirus cloud lookups) that connect frequently to the same CDN or update endpoint
- VoIP and real-time communication platforms that maintain persistent connections with high-frequency keepalives
- Gaming clients, streaming services, and P2P applications that maintain persistent external connections
- Network management tools or custom scripts that perform frequent health checks against external services
References (10)
- https://attack.mitre.org/techniques/T1584/005/
- https://us.norton.com/internetsecurity-malware-what-is-a-botnet.html
- https://www.imperva.com/learn/ddos/booters-stressers-ddosers/
- https://www.secureworks.com/research/dridex-bugat-v5-botnet-takeover-operation
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-038a
- https://www.ncsc.gov.uk/news/joint-advisory-sandworm-cyclops-blink
- https://www.microsoft.com/en-us/security/blog/2025/03/05/silk-typhoon-targeting-it-supply-chain/
- https://feodotracker.abuse.ch/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1584.005/T1584.005.md
- https://www.cisa.gov/sites/default/files/2024-02/aa24-038a-prc-state-sponsored-actors-compromise-us-critical-infrastructure_0.pdf
Unlock Pro Content
Get the full detection package for T1584.005 including response playbook, investigation guide, and atomic red team tests.