Real Case Walkthrough: PCAP + DNS Tunnels
Scenario overview
You are given a PCAP file containing internal network traffic. The SIEM flagged multiple DNS requests with long, random-looking subdomains. Some requests occur every few minutes from a single host, with consistent response sizes.
Your task is to:
- Confirm whether this is DNS tunneling or benign activity.
- Identify the affected host and data flow pattern.
- Recommend appropriate containment and detection improvements.
1. Understand the prompt
Clarify before starting:
- Goal: Determine whether the DNS traffic represents C2 or exfiltration.
- Scope: Single PCAP dataset, not full network logs.
- Deliverable: Written summary describing your findings and remediation recommendations.
Rephrased prompt:
“Analyze the provided PCAP data to determine if DNS tunneling is present, identify the compromised host, and propose containment and prevention actions.”
Understanding what the interviewer wants prevents unnecessary deep dives.
2. Plan your workflow
Outline what to look for before opening the data:
Planning first helps you move faster and stay organized.
3. Investigate methodically
Use OODA to structure your investigation.
Observe
Open the PCAP in Wireshark or NetworkMiner and filter for DNS traffic:
dns
Look for:
- Long subdomains (50–200 characters)
- Frequent queries with encoded-looking data
- High ratio of queries to responses
- Consistent response packet sizes (common in tunnels)
Example suspicious query:
ajdiw92dnakdhsa9q8sdnbas7dnasd.example.biz
Orient
Correlate observations:
- Determine whether queries originate from a single IP or multiple hosts.
- Note time intervals (regular beacons suggest C2).
- Decode subdomains if possible because base32/base64-encoded data often indicates tunneling.
Decide
If you confirm repetitive, high-entropy DNS queries to a single domain from one host, classify as probable DNS tunneling.
If traffic resembles legitimate CDN or telemetry domains (like Microsoft or Akamai), classify as benign but document reasoning.
Act
- Contain by blocking outbound DNS queries to the suspicious domain.
- Isolate the affected host for EDR review.
- Preserve the PCAP, host logs, and timestamps for IR analysis.
4. Summarize findings
Executive summary:
“PCAP analysis confirms DNS tunneling activity originating from host 10.10.5.23. The host repeatedly queried subdomains of example.biz containing base32-encoded payloads every three minutes. The traffic pattern indicates command-and-control communication. Containment involves blocking the domain, isolating the endpoint, and capturing forensic artifacts.”
Key evidence:
Impact: Potential data exfiltration or remote control channel from an infected endpoint.
Deliver actionable insights
Containment actions:
- Block DNS traffic to example.biz in the firewall and DNS resolver.
- Isolate the affected host (10.10.5.23) and capture memory.
- Rotate credentials associated with that endpoint.
Recovery recommendations:
- Reimage compromised system.
- Review outbound DNS traffic baselines.
- Enable enhanced logging on DNS resolvers.
Detection improvements:
- Deploy DNS analytics rules for:
- Query length > 80 characters.
- High request frequency per domain.
- Subdomain entropy scoring.
- Use MITRE ATT&CK mapping (T1071.004: Application Layer Protocol – DNS).
Summary excerpt:
“After reviewing the PCAP, I identified a host repeatedly sending long, encoded DNS queries to example.biz. The pattern and frequency align with DNS tunneling. I’d block the domain, isolate the host, and confirm the infection in EDR. For prevention, I’d add a detection rule for excessive query lengths and periodic DNS traffic.”
This concise, structured answer demonstrates investigation skill and containment judgment.