Course contentsShow
← Security
Lesson 2414 of 3,05246. Incident ResponseFree lesson

DNS and HTTP Forensics

Investigating DNS tunneling, malicious domains, HTTP anomalies, and web-based attacks.

DNS and HTTP Forensics

What you'll learn: How to investigate DNS tunneling, malicious domains, HTTP anomalies, and web-based attacks using forensic analysis techniques.

The Foundation of Web-Based Forensics

DNS and HTTP are the workhorses of internet communication—and unfortunately, favored attack vectors. DNS translates human-readable domains into IP addresses, while HTTP carries web traffic. Attackers exploit both protocols to exfiltrate data, communicate with command-and-control (C2) servers, and deliver malicious payloads. Your job as a forensic analyst is to spot these abuses in captured traffic.

DNS Forensics: Beyond Normal Lookups

DNS Tunneling occurs when attackers encode data inside DNS queries and responses to bypass firewalls. Look for:

  • Unusually long subdomain names (data encoded in queries like ZGF0YWV4ZmlsdHJhdGlvbg==.malicious.com)
  • High query volumes to a single domain
  • Queries to unusual TLDs or newly registered domains
  • Non-standard record types (TXT, NULL) containing suspicious data

Malicious Domain Detection involves analyzing:

  • Domain reputation scores and registration dates
  • Fast-flux DNS (rapidly changing IP associations)
  • Domain Generation Algorithm (DGA) patterns (random-looking domains like xjk3d9fksl2.com)

HTTP Forensics: Tracking Web Attacks

Examine HTTP traffic for:

  • Anomalous User-Agents: Malware often uses distinctive or outdated browser strings
  • POST requests with encoded payloads: Base64 or hex-encoded data in form submissions
  • Unusual URI patterns: SQL injection attempts, directory traversal (../../etc/passwd)
  • HTTP headers with suspicious values: Custom headers used for C2 communication
  • Beaconing patterns: Regular, periodic GET requests indicating C2 check-ins

Key Takeaway: DNS and HTTP forensics require baseline knowledge of normal traffic patterns—anomalies like DNS tunneling, DGA domains, unusual User-Agents, and beaconing behaviors reveal attacker activity hidden in legitimate protocols.