DNS Tunneling Detection
The zoo's ticket PC cannot upload anything, so it whispers secrets through the phone book instead. Collect the whispers, put them in order, and read the stolen message.
At a glance
- Type
- Walkthrough (guided: every task says where to look)
- Difficulty
- Medium
- Time
- about 25 min
- Tools
- Wireshark, CyberChef
- Skills
- Packet Capture Analysis with Wireshark, C2 and Data Exfiltration Detection
- Exam prep
- Security+, CySA+, BTL1
- MITRE ATT&CK tactics
- Command and Control, Exfiltration
- Tasks
- 11
The scenario
CASE FILE 5160 · DNS TUNNELING DETECTION · PRIORITY HIGH
Friday, 21:40. Happy Zoo has a strict firewall: no uploads, no email from the ticket booth, no USB sticks. The only thing the booth PC (192.168.56.60) is allowed to do besides browsing is ask the network's phone book for addresses.
And yet, visitor card details have leaked. Someone found a way to talk with no uploads at all. The evidence is a recording of the PC's DNS traffic. This is a step up in difficulty, but every task tells you where to look.
What you will investigate
- Gibberish
- Count the whispers
- The record type
- The clockwork
- Hex in disguise
- How many pieces?
- Read the whole message
- The loot
- The boss answers
- Why it works
- File your report
Terms you will meet
- DNS
- The network's phone book. It turns names into IP addresses.
- TXT record
- A DNS record that holds free text.
- Hex
- A way to write bytes as pairs of the characters 0-9 and a-f.
- Tunneling
- Hiding one kind of traffic inside another, like DNS inside normal lookups.
- Exfiltration
- Quietly sending stolen data out of a network.
Key takeaways
- Allowed traffic can still be abused. DNS is the classic example.
- Long, random-looking names, repeated at a steady pace, mean a tunnel.
- Hex and base64 are costumes, not locks. Decode them.
- Log your DNS. It is one of the best places to catch a quiet intruder.
How to talk about this case in an interview
I found data leaving a PC through DNS. Long random-looking subdomains at a steady pace stood out. I put the pieces in order, decoded the hex and read the stolen message. I recommended DNS logging and alerts on long or high-volume queries.