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

  1. Gibberish
  2. Count the whispers
  3. The record type
  4. The clockwork
  5. Hex in disguise
  6. How many pieces?
  7. Read the whole message
  8. The loot
  9. The boss answers
  10. Why it works
  11. 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.

Back to all cases

ColdCase Labs: Learn cyber security by reopening cold cases.