Lion Cipher Lab

Write a DNS-tunneling / exfiltration detector from scratch (evade it with low-and-slow, then re-tune)

Why it matters

Almost every network blocks arbitrary outbound traffic -- except DNS. Port 53 has to be open for the internet to work at all, and most egress filters wave it through without inspecting the payload. That makes DNS a near-universal covert channel: an attacker who owns a domain can encode stolen files into the subdomain LABELS of queries to that domain (data going OUT) and receive commands back in the answers, quietly turning name resolution into a two-way tunnel that firewalls and proxies never see. MITRE ATT&CK tracks the command-and-control side as Application Layer Protocol: DNS (T1071.004)…

What you'll learn

Steps in this lab

  1. What DNS tunneling is, why it slips egress controls, and how this lab differs from its siblings
  2. Generate a self-contained DNS query log (normal traffic + one hidden tunnel)
  3. Build the detection features from first principles
  4. Score, classify, and print precision / recall + a confusion matrix
  5. Meet the honest false positives -- the busy CDN and the analytics host
  6. The adversary round: switch to LOW-AND-SLOW and watch recall collapse
  7. Re-tune: per-parent aggregation on the signals a tunnel cannot shed
  8. The judgment: when statistics win, the base-rate trap, and where the tools fit

Open the full interactive lab →