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.

Jul 12, 2025 - 12:28
Updated: 
101.5k

SOC & Blue Team in Cybersecurity & Ethical Hacking · Explainer

Networking, Network Security

DNS Attack Types and How SOC Teams Detect and Prevent Them

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?

AttackSOC relevanceMITRE
DNS tunnelling and C2Hidden data exfiltration and malware controlT1071.004
Domain generation algorithmsMalware finding its serversT1568.002
Phishing and lookalike domainsUsers visiting credential theft sitesT1566
Domain hijackingYour own domain redirectedT1584.002
Cache poisoningUsers silently redirectedT1557
DNS DDoSOutage of your DNS serviceT1498

For a full list with mechanisms, see top 10 DNS attack types.

Which DNS Logs Should a SOC Collect?

SourceWhat it shows
Internal resolver logsEvery query by client IP
Windows DNS Server analytical logsQueries on domain controllers (Microsoft Learn)
Sysmon Event ID 22Which process made each query (Sysmon)
Zeek dns.logNetwork view including record types and answers (Zeek docs)
Protective DNS / DNS firewallBlocked 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?

  1. Identify the host and, with Sysmon, the process that made the queries.
  2. Check the domain's age, registrar and reputation.
  3. Look for successful connections after the lookup.
  4. Check other hosts for the same domain.
  5. Contain the host if malware is confirmed; block the domain at the resolver.
  6. 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

Almost all malware and phishing involves DNS lookups, so query logs reveal threats early and cheaply across every device.

Look for long or random query names, many unique subdomains of one domain, and unusual record types such as TXT.

Malware code that creates many pseudo-random domain names so it can find its command server even if some are blocked.

Sysmon Event ID 22 on Windows records DNS queries together with the process that made them.

A resolver service that blocks lookups of known malicious domains before users or malware can connect to them.

No. Force them through internal or protective resolvers so queries are logged and filtered, and block direct outbound DNS.

Enable registrar lock, use MFA on registrar and DNS hosting accounts, and monitor your public DNS records for changes.

Identify the host and process, check domain reputation and age, look for connections, then contain and block if malicious.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.