Use DGA Detection to spot domain names generated algorithmically for command-and-control or domain exhaustion. Analyse DNS queries for high entropy, unusual character patterns, bursts of failed lookups and rare newly seen domains. Combine score-based detection with threat intelligence and host context, then investigate devices that repeatedly query suspicious domains.
How DGA detection should be tuned for real DNS traffic
Best-practice DGA detection starts with DNS behaviour, not with a single malicious pattern. The strongest signals are statistical and contextual: entropy, character distribution, lookup failure bursts, novelty, and repeated resolution attempts from the same host. Detection works best when it scores domains in combination with resolver telemetry, host context, and known threat intelligence, rather than relying on a simple allowlist or regex.
A practical DGA program should treat DNS as an environment-wide sensor. That means you are looking for domains that appear algorithmically created, are rarely seen elsewhere, or are queried in a way that differs from normal application lookups. The goal is to separate ordinary noisy DNS from domains that are likely supporting command-and-control or mass domain exhaustion.
That distinction matters because the same technique can support very different attacker goals. A host repeatedly querying suspicious domains may be reaching C2 infrastructure, but a high-volume or rotating pattern can also be used to stress defenders, hide communications, or blend into large-scale churn. Good detection therefore measures both the domain and the querying behaviour around it.
What signals separate DGA activity from ordinary lookup noise?
The most useful signals are those that are hard for normal software to mimic consistently. High entropy and unusual character sequences are common starting points, but they are not enough on their own. DGA models should also weight NXDOMAIN bursts, newly registered or first-seen domains, uncommon top-level domain usage, and repeated failures from the same endpoint or subnet.
Context improves precision. A browser or endpoint talking to a brand-new domain once may be normal. A workstation, server, or container making repeated attempts across many similarly random domains is much more suspicious. Analysts should also look at timing, because DGA families often generate traffic in bursts, probing many domains in a short window before settling on one that resolves.
There is also a difference between detection and confirmation. DGA scoring can surface candidates quickly, but confirmation usually requires DNS history, host process context, proxy logs, and, where available, endpoint telemetry. That broader view helps distinguish legitimate software update services, telemetry platforms, and CDN-like behaviour from malicious domain generation.
How should teams operationalise DGA detection?
A useful DGA program ties DNS analytics to response workflows. High-confidence detections should trigger investigation of the device, user session, and process lineage associated with the queries. The questions that matter are whether the host is compromised, whether the suspicious lookups are part of beaconing, and whether the same pattern appears across multiple assets.
For analyst efficiency, a separate detection queue for newly seen domains, rare domains, and repeated failed resolutions is often more effective than a single monolithic rule. That lets teams triage by confidence and business impact. It also avoids overreacting to isolated oddities while still surfacing hosts that exhibit sustained suspicious behaviour.
When DNS data is available at scale, combine it with threat intelligence and enrichment from passive DNS, whois age, sinkhole observations, and endpoint context. This is especially important for DGA because adversaries can rotate domains rapidly; a single observation may be weak, but a pattern across many queries can be decisive. Command and Control (C2) Guide is useful here because DGA is often one component of broader C2 infrastructure and beaconing behaviour.
Risk and Threat Considerations
DGA activity is risky because it gives attackers resilience. If defenders block one domain, the malware can generate another, which makes simple denylisting brittle and increases the chance that command-and-control stays reachable. It also raises the chance of false negatives when DNS telemetry is incomplete or when only a subset of resolvers is monitored.
Failure mechanism: Defenders miss the signal when they rely on static indicators, fail to correlate repeated NXDOMAIN activity with host context, or do not centralise DNS logs across endpoints and resolvers. The result is that algorithmically generated domains keep rotating faster than manual response can keep up.
Impact: The compromised host can maintain C2, resume communication after interruption, or continue probing until it finds an active domain. At scale, this also creates detection fatigue, because benign-looking DNS churn can hide genuinely malicious query patterns.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK addresses the attack and risk surface, while CIS Controls v8 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| MITRE ATT&CK | T1071 — Application Layer Protocol | DGA-driven C2 commonly rides DNS and related application-layer traffic. |
| T1568 — Dynamic Resolution | DGA is a dynamic resolution method used to find rotating infrastructure. | |
| Recommendation — Map suspicious DNS beacons to application-layer C2 techniques and hunt for repeated callback patterns. Track dynamic resolution behavior and correlate it with resolver logs and host activity. | ||
| CIS Controls v8 | CIS-13 — Network Monitoring and Defense | DGA detection depends on DNS visibility, alerting, and network telemetry review. |
| Recommendation — Centralize DNS telemetry and alert on rare, failed, or high-entropy lookups. | ||
Practitioner Guidance
What to prioritise: Tune detections around repeated failed lookups, first-seen domains, and per-host repetition before adding more exotic features. Those signals are usually the fastest route to a useful alert, especially in environments where DNS volume is high.
What to verify: Before trusting a DGA alert, check whether the same host shows process evidence, user activity, or resolver behaviour that explains the queries. A score without host context is often too weak for response, while a score plus repeat activity on the same endpoint is usually worth escalation.
Common mistake: Treating DGA as only a malware problem. In practice, the value is in building a DNS detection pipeline that also helps find C2, tunnelling, and unusual resolution behaviour, because those issues often overlap in the same telemetry set. DNS Security Guide is a good companion reference for the broader DNS controls that make DGA analytics more reliable.
Practitioner takeaway: The best DGA detection programs do not try to “spot randomness” in isolation, they combine DNS anomaly scoring with endpoint and threat context so that suspicious lookups become actionable investigations rather than noisy alerts.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org