Command and control (C2) — blocking implant beacons and DGA traffic
What this threat is
Once a host is compromised, the attacker needs a way to talk to it. That channel is called command and control (C2). It is how new tasks reach the implant, how stolen data is exfiltrated, and how the operator pivots from the first foothold to the rest of the environment.
C2 is the most consequential moment in the kill chain to block. An initial infection that cannot phone home is effectively neutralised — the operator has no way to ransom files, lateral-move or upload stolen credentials. Blocking C2 is also where protective DNS shines, because almost every implant in the wild ultimately resolves a hostname before it opens a socket.
How it abuses DNS
C2 over DNS shows up in several forms:
- Static domains. Many commodity malware families ship with a small list of hard-coded apex domains. These are the easiest to block once a sample is analysed.
- Domain generation algorithms (DGAs). An algorithm seeded by the calendar date or another shared secret produces dozens to thousands of candidate domains per day. The implant tries each in turn until one resolves. Only a tiny fraction of the candidates are registered by the operator at any moment, making static blocklists ineffective.
- Fast flux. Hundreds of backing IPs rotate under a single apex on very short TTLs, making takedown by IP futile and dragging out the useful life of a C2 hostname.
- DNS tunnelling. The implant encodes commands or data into TXT, NULL or long subdomain labels. The query stream itself is the channel.
- Dynamic DNS. Free dynamic-DNS providers let operators rotate apex domains and IPs without owning real infrastructure.
Each pattern leaves a different DNS signature.
How SecDNS blocks it
The default "C2" category layers several detectors:
- Threat-feed indicators. Spamhaus DBL, Team Cymru, ThreatFox, our internal honeypot network, and partner feeds covering specific APT toolkits. Every feed is scored and aged so that stale indicators do not stay in the policy forever.
- DGA classifiers. We run a set of trained classifiers tuned per known family (Conficker, Necurs, Pykspa, Tofsee, Matsnu, contemporary variants) and a general-purpose model for unfamiliar DGAs. Hits are correlated with NRD signals to keep false positives down.
- Fast-flux detection. A separate pipeline flags hostnames whose answer set rotates faster than a threshold across our resolver fleet. Fast-flux apexes are demoted to a low-trust pool and blocked by default for profiles in strict mode.
- DNS-tunnelling signals. High-entropy subdomain labels, abnormal query rates per client and outsized TXT responses are detected at the recursive resolver and surface as
tunnel-suspectevents in the query log even when the apex itself is not yet blocked.
Blocked responses default to NXDOMAIN so the implant fails its DNS lookup cleanly. Profiles that need synthetic responses for telemetry can switch on the block-page A-record mode.
Example
A typical DGA-based botnet generates 80 candidate domains per day under a .top or .xyz TLD using a date-seeded algorithm. The operator registers four of them shortly before each weekly rotation. When an infected workstation works through its candidate list and hits one of those four — say qkrtmpzaq[.]top — the resolver checks the apex against ThreatFox (registered three days ago, already on the feed), the DGA classifier (high score) and the NRD pipeline. All three flag it; the resolver returns NXDOMAIN; the implant moves on to the next candidate, and so on through its budget until it gives up. The host is, from the attacker's point of view, dark.
Stats
Across the production resolver fleet we blocked approximately N C2-category queries in <month> this year, with roughly N% attributed to DGA-shaped hostnames and the remainder to static indicators. Data placeholder pending Q1 2026 transparency report.