DNS Traffic Analysis and Query Patterns
You'll learn how to spot suspicious DNS activity by examining domain lookups and responses in network traffic.
What Is DNS Traffic Analysis?
DNS (Domain Name System) traffic analysis involves inspecting the queries computers make to resolve domain names into IP addresses. Just as you can learn someone's intentions by watching where they ask for directions, examining DNS queries reveals what systems are trying to connect to—and sometimes, what attackers are trying to hide.
Normal vs. Suspicious DNS Patterns
Normal DNS traffic shows predictable patterns: queries to common domains (google.com, microsoft.com), reasonable query rates, and straightforward responses. Queries happen when users browse websites or applications check for updates.
Suspicious patterns include:
- High query volumes to unusual or newly-registered domains
- Tunneling attempts: Using DNS queries to smuggle data out (e.g., encoding stolen files in subdomain names like
secret-data-chunk-1.attacker.com) - Long, randomized domain names that look like
x7k2m9p4q.malware-c2.net - Queries to known malicious domains or algorithmically-generated domains (DGA)
- Unusual query types (like excessive TXT record requests that can hide encoded commands)
Detecting DNS Abuse in Wireshark
In Wireshark, filter DNS traffic with dns. Look for:
- Query names (
dns.qry.name) with suspicious patterns - Unusually large response payloads
- Rapid-fire queries to sequential subdomains
- Queries that never receive responses (potential exfiltration attempts)
Think of DNS tunneling like someone shouting encoded messages during a phone call asking for directions—the conversation looks normal on the surface, but something's being hidden in the questions themselves.
Key Takeaway: DNS traffic analysis reveals both where systems are connecting and potential abuse through tunneling or malware command-and-control, by examining query patterns, domain characteristics, and response behaviors.