DNS Attack Types and How SOC Teams Detect and Prevent Them
The DNS attacks SOC teams deal with most are DNS tunnelling and command-and-control traffic hidden in DNS, malware using domain generation algorithms, connections to newly registered or lookalike phishing domains, DNS hijacking of the organisation's own domains, cache poisoning, and DNS-based DDoS.
Topic: SOC & Blue Team in Cybersecurity & Ethical Hacking · Explainer
Also covers: Networking, Network Security
Quick answer: The DNS attacks SOC teams deal with most are DNS tunnelling and command-and-control traffic hidden in DNS, malware using domain generation algorithms, connections to newly registered or lookalike phishing domains, DNS hijacking of the organisation's own domains, cache poisoning, and DNS-based DDoS. SOC teams prevent and detect them by forcing all clients to use internal or protective DNS resolvers, logging every query, alerting on unusual patterns such as very long or random names and high volumes to one domain, blocking known bad domains, and locking down registrar and DNS hosting accounts.
Key takeaways
- DNS query logs are one of the richest and cheapest detection sources.
- Block direct outbound DNS so malware cannot bypass your resolvers.
- Tunnelling and DGAs show up as statistical anomalies in query names.
- Protective DNS blocks many threats before a connection is made.
- Your own domains need registrar locks and MFA to prevent hijacking.
Table of Contents
- Which DNS Attacks Matter Most to a SOC?
- Which DNS Logs Should a SOC Collect?
- Which Detection Use Cases Work Best?
- What Do Detection Queries Look Like?
- How Should Analysts Triage a DNS Alert?
- How Do SOC Teams Prevent DNS Attacks?
- References
Which DNS Attacks Matter Most to a SOC?
| Attack | SOC relevance | MITRE |
|---|---|---|
| DNS tunnelling and C2 | Hidden data exfiltration and malware control | T1071.004 |
| Domain generation algorithms | Malware finding its servers | T1568.002 |
| Phishing and lookalike domains | Users visiting credential theft sites | T1566 |
| Domain hijacking | Your own domain redirected | T1584.002 |
| Cache poisoning | Users silently redirected | T1557 |
| DNS DDoS | Outage of your DNS service | T1498 |
For a full list with mechanisms, see top 10 DNS attack types.
Which DNS Logs Should a SOC Collect?
| Source | What it shows |
|---|---|
| Internal resolver logs | Every query by client IP |
| Windows DNS Server analytical logs | Queries on domain controllers (Microsoft Learn) |
| Sysmon Event ID 22 | Which process made each query (Sysmon) |
| Zeek dns.log | Network view including record types and answers (Zeek docs) |
| Protective DNS / DNS firewall | Blocked lookups |
Which Detection Use Cases Work Best?
- Query names longer than about 60 characters, or high-entropy labels.
- Many unique subdomains of one parent domain from one host.
- High volume of TXT, NULL or unusual record types.
- Lookups of domains registered in the last few days.
- Many NXDOMAIN responses from one host (DGA behaviour).
- Clients sending DNS directly to external resolvers.
- Unexpected changes to your public DNS records.
What Do Detection Queries Look Like?
// Microsoft Sentinel: hosts generating many NXDOMAIN responses (possible DGA)
DnsEvents
| where TimeGenerated > ago(1h)
| where ResultCode == 3
| summarize NX=count(), Domains=dcount(Name) by ClientIP
| where NX > 200
# Zeek: parent domains with the most unique subdomains (possible tunnelling)
zeek-cut query < dns.log | awk -F. 'NF>2{print $(NF-1)"."$NF}' | sort | uniq -c | sort -rn | head
How Should Analysts Triage a DNS Alert?
- Identify the host and, with Sysmon, the process that made the queries.
- Check the domain's age, registrar and reputation.
- Look for successful connections after the lookup.
- Check other hosts for the same domain.
- Contain the host if malware is confirmed; block the domain at the resolver.
- Record indicators and tune the rule.
How Do SOC Teams Prevent DNS Attacks?
- Use protective DNS; NSA and CISA explain how to select a protective DNS service.
- Block outbound port 53 and unapproved DNS over HTTPS from clients.
- Enable DNSSEC validation on resolvers.
- Lock registrar accounts and use MFA, the core requirement of CISA's Emergency Directive 19-01.
- Monitor certificate transparency logs for lookalike domains.
Related: how SIEM works. WebAsha offers SOC analyst training.
References
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0