Lion Cipher Lab

Detect distributed password spraying with a fleet-wide analytic (build it from scratch)

Why it matters

Password spraying is one of the most common ways real intrusions start, and it is specifically designed to slip past the detection most shops actually have. The naive rule everyone writes first — 'alert when one account fails to log in N times' — is blind to it by design, because a sprayer tries ONE password against MANY accounts, low and slow, from MANY source IPs, so no single account ever crosses the lockout line. Learning to pivot the detection the other way — counting how many DISTINCT accounts across the whole estate are failing at once — and then honestly measuring and tuning that…

What you'll learn

Steps in this lab

  1. When you reach for this — spraying vs. brute force
  2. The real-world signals this maps to
  3. Set up a scratch folder and confirm Python runs
  4. Create the whole thing in one file
  5. Run it and read Part 1
  6. Why a fixed threshold is a trap — the base rate
  7. Now watch the attacker adapt — and the analytic go blind
  8. Re-tune with the spray SHAPE, not just the count
  9. When this analytic is blind — the failure modes to say out loud

Open the full interactive lab →