SecDNS

Command and control (C2) — blocking implant beacons and DGA traffic

SecDNS detects DGA-based and static C2 beacons and blocks them at the resolver, breaking the control channel before the implant ever connects out.

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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-suspect events 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.

Frequently asked questions

How is "C2" different from the malware category?

The Malware category covers initial payload delivery — the domains that serve droppers, loaders or second-stage binaries. The C2 category covers the ongoing control channel an implant uses after it is already installed: heartbeat beacons, task pickup, exfiltration triggers. The two categories often overlap on a given domain but the detection signals are different.

Are DGAs still relevant in 2026, or have attackers moved to other channels?

DGAs remain common in commodity botnets and some APT toolkits. Higher-end families have shifted toward DNS-over-HTTPS to public providers, fronting through CDNs, or piggybacking on legitimate cloud APIs. Blocking DGA traffic is necessary but not sufficient; pairing DNS-layer detection with TLS/JA3 inspection at the edge closes the rest.

How do you avoid false positives on benign random-looking hostnames?

DGA classifiers are notorious for tripping on telemetry hostnames from real products (cloud SDKs, analytics SaaS, CDNs all generate noisy-looking names). We feed an allowlist of known-good DGA-shaped patterns into the classifier and require at least two independent signals — DGA score plus NRD plus suspicious NS, for example — before we block by default.

Can SecDNS detect DNS tunnelling used for covert C2?

Yes, with a couple of caveats. The recursive logs surface high-entropy subdomains, abnormal query rates per client and outsized TXT/NULL responses, which together identify most off-the-shelf DNS tunnelling tools. Custom tunnels with carefully shaped traffic can hide for a while; for high-assurance environments we recommend a dedicated DNS-tunnel detector in addition to protective DNS.