[Paper Review] Detecting Domain-Generation Algorithm (DGA) Based Fully-Qualified Domain Names (FQDNs) with Shannon Entropy
This paper proposes using Shannon entropy to detect Domain-Generation Algorithm (DGA)-based Fully-Qualified Domain Names (FQDNs) in DNS traffic, leveraging the fact that DGA-generated domains exhibit higher entropy than legitimate domains. The method achieves effective detection through a simple 1-variable t-test on daily DNS logs, demonstrating feasibility in identifying malicious C2 communication patterns like those seen in SUNBURST malware.
Domain Name System (DNS) is the backbone of the Internet. However, threat actors have abused the antiquated protocol to facilitate command-and-control (C2) actions, to tunnel, or to exfiltrate sensitive information in novel ways. The FireEye breach and Solarwinds intrusions of late 2020 demonstrated the sophistication of hacker groups. Researchers were eager to reverse-engineer the malware and eager to decode the encrypted traffic. Noticeably, organizations were keen on being first to "solve the puzzle". Dr. Eric Cole of SANS Institute routinely expressed "prevention is ideal, but detection is a must". Detection analytics may not always provide the underlying context in encrypted traffic, but will at least give a fighting chance for defenders to detect the anomaly. SUNBURST is an open-source moniker for the backdoor that affected Solarwinds Orion. While analyzing the malware with security vendor research, there is a possible single-point-of-failure in the C2 phase of the Cyber Kill Chain provides an avenue for defenders to exploit and detect the activity itself. One small chance is better than none. The assumption is that encryption increases entropy in strings. SUNBURST relied on encryption to exfiltrate data through DNS queries of which the adversary prepended to registered Fully-Qualified Domain Names (FQDNs). These FQDNs were typo-squatted to mimic Amazon Web Services (AWS) domains. SUNBURST detection is possible through a simple 1-variable t-test across all DNS logs for a given day. The detection code is located on GitHub (https://github.com/MalwareMorghulis/SUNBURST).
Motivation & Objective
- To address the challenge of detecting malicious C2 communications via DGA-generated domains in DNS traffic.
- To exploit the high entropy characteristic of DGA-generated domains as a detection signal.
- To provide a lightweight, scalable detection method applicable to real-world DNS logs.
- To demonstrate practical detection of SUNBURST-like malware using entropy analysis.
- To offer a detection approach that complements prevention, as emphasized by security experts like Dr. Eric Cole.
Proposed method
- Measures Shannon entropy of each Fully-Qualified Domain Name (FQDN) in DNS logs to quantify randomness.
- Applies a 1-variable t-test across all FQDNs per day to detect statistically significant deviations in entropy.
- Uses the t-test to identify clusters of high-entropy domains indicative of DGA activity.
- Relies on the assumption that encrypted or DGA-generated domains have higher entropy than legitimate domains.
- Leverages existing DNS log data without requiring deep packet inspection or decryption.
- Implements the detection logic in open-source code available on GitHub for practical deployment.
Experimental results
Research questions
- RQ1Can Shannon entropy effectively distinguish DGA-generated FQDNs from legitimate domains in DNS traffic?
- RQ2Is there a statistically significant difference in entropy between DGA-generated and legitimate domains?
- RQ3Can a simple t-test on daily DNS logs detect DGA-based C2 activity in real-world scenarios?
- RQ4To what extent can entropy-based detection detect malware like SUNBURST without prior knowledge of the domain generation algorithm?
- RQ5How does entropy-based detection compare to other heuristic or signature-based detection methods in terms of scalability and false positives?
Key findings
- DGA-generated domains exhibit significantly higher Shannon entropy compared to legitimate domains, enabling detection via entropy thresholds.
- A 1-variable t-test on daily DNS logs successfully identifies abnormal entropy spikes associated with DGA activity.
- The method successfully detects SUNBURST-like C2 behavior by identifying high-entropy FQDNs that mimic legitimate domains like AWS.
- The detection approach is lightweight and scalable, requiring only DNS log data and no decryption or reverse engineering.
- The open-source implementation on GitHub enables practical deployment and validation by security teams.
- The approach provides a viable detection mechanism even when prevention is not possible, aligning with the principle that detection is essential.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.