Lion Cipher Lab

Reverse a malware DGA and pre-empt its C2 (predict tomorrow's domains, then block them today)

Why it matters

When malware needs orders, hard-coding one command-and-control (C2) domain is suicide: a defender blocks that single name and the malware goes deaf. So modern families use a Domain Generation Algorithm (DGA) -- a seeded routine that mints hundreds of throw-away pseudo-random domains a day. The attacker registers only a few; every infected host runs the identical algorithm and reconnects to whichever of the day's names resolves. MITRE ATT&CK catalogs this as Dynamic Resolution: Domain Generation Algorithms (T1568.002), and it is exactly why a reactive domain blocklist loses -- you are always…

What you'll learn

Steps in this lab

  1. Why REVERSE a DGA when you could just block it
  2. Meet the captured sample -- run it, see today's domains
  3. Reverse it: read the code and instrument the seed and the PRNG
  4. Reimplement it cleanly -- and prove you understood it by matching byte-for-byte
  5. Predict next week's domains -- the capability a blocklist can never give you
  6. Turn prediction into defence: emit a forward feed as a blocking RPZ
  7. When NOT to reverse, and the DGAs that beat pre-computation (opinion)

Open the full interactive lab →