Advisor
Wiki Techniques, Tactics & Procedures (TTPs) Command & Control Domain Generation Algorithms (DGA)

Domain Generation Algorithms (DGA)

2 min read
Jump to:

Overview

Domain Generation Algorithms (DGAs) are techniques used by adversaries to algorithmically produce a large number of domain names that can be used for command and control (C2) communication. DGAs play a critical role in the attack lifecycle by enabling malware to evade detection and maintain resilience against takedown efforts by frequently changing the domains it contacts.

Attack Objective

  • Maintain stealthy and resilient command and control channels
  • Supports the Command & Control stage of the attack lifecycle
  • Advances attacker persistence and control by dynamically generating domains that are difficult to predict and block

How the Technique Works

DGAs use predefined algorithms, often seeded with variables such as date or random values, to generate a large set of domain names. Malware attempts to resolve and connect to these domains to locate active C2 servers. Because the domains change frequently and unpredictably, defenders face challenges in blacklisting or preemptively blocking them.

Common Methods & Variations

  • Time-based DGAs that generate domains based on date or time inputs
  • Seeded DGAs using pseudo-random number generators with secret keys
  • Variants targeting different environments including endpoint malware, cloud-based services, and network infrastructure
  • Use of custom DGAs versus leveraging legitimate system functions (living-off-the-land) to generate domain names

Indicators of Compromise (IOCs)

  • Unusual DNS query patterns with high volumes of failed or rare domain lookups
  • Network traffic to newly registered or algorithmically generated domains
  • Endpoint logs showing repeated DNS resolution attempts to non-standard domains
  • Suspicious domain registration metadata or rapid domain flux

Detection Strategies

  • Monitoring DNS logs and network telemetry for anomalous domain query behavior
  • Behavioral detection leveraging machine learning to identify algorithmically generated domain patterns
  • Correlation of DNS queries with threat intelligence on known DGA domains

Mitigation & Prevention

  • Implement DNS filtering and blocking of known malicious or suspicious domains
  • Use of threat intelligence feeds to update domain blacklists dynamically
  • Network segmentation and strict egress filtering to limit unauthorized DNS traffic
  • Application of least privilege principles to restrict malware capability to perform DNS queries

Response Considerations

  • Immediate containment by blocking identified DGA domains and associated IP addresses
  • Investigation of DNS logs to identify scope and timeline of DGA activity
  • Post-incident hardening including updating detection rules and improving DNS monitoring capabilities

Related Techniques

  • Use of Fast Flux DNS to further obscure C2 infrastructure
  • Beaconing and periodic communication patterns for maintaining C2 channels
  • Domain fronting and proxying as additional evasion methods

Mapping & References

  • MITRE ATT&CK: T1583.001 – Acquire Infrastructure: Domain Generation Algorithms
  • Public research on DGA detection and mitigation from cybersecurity vendors and academic sources
  • Incident reports detailing malware campaigns employing DGAs for C2 resilience
Tags: Attack Lifecycle Command and Control Cybersecurity DGA DNS Security Malware Techniques MITRE ATT&CK network defense Threat Detection