Lion Cipher Lab

Write a C2 beaconing detector from scratch (statistical hunting over Zeek logs)

Why it matters

Modern command-and-control (C2) traffic is almost all encrypted. An implant on a compromised host phones home to its C2 server over TLS on 443, and you cannot decrypt it to read the payload -- so the classic move of inspecting content is blind. But the malware has a tell it cannot fully hide: it has to call home on a schedule, and a schedule is REGULAR in a way human-driven traffic never is. That regularity in the TIMING is the signal, and timing survives encryption. Learning to read it turns 'the traffic is encrypted, we are stuck' into 'the traffic is encrypted, so let me time it.' This lab…

What you'll learn

Steps in this lab

  1. What beaconing is, and why timing is the signal
  2. Get self-contained data: generate a synthetic Zeek conn.log
  3. Parse the log into sessions by (src, dst, dst_port)
  4. Score timing regularity with the coefficient of variation
  5. Run it and watch the beacon rise -- next to your top false positive
  6. The adversary round: add jitter and watch confidence collapse
  7. Re-tune -- and pay the false-positive tax honestly
  8. The judgment: when this wins, when it fails, and how the pros do it

Open the full interactive lab →