Lion Cipher Lab

Hunt threats in a Jupyter notebook with pandas

Why it matters

A detection RULE answers a question you already knew to ask: it fires when a known-bad pattern appears. Threat HUNTING is what you do about the attacks no rule covers yet -- you form a hypothesis about how an intruder would behave, pull the telemetry that would prove or disprove it, and go looking. The single most productive way to do that over process and endpoint data is not another dashboard; it is a hunter in a notebook, slicing a few thousand events by hand with pandas until the anomaly falls out of the long tail. The core move -- least-frequency-of-occurrence analysis, or 'stacking' --…

What you'll learn

Steps in this lab

  1. Hunting vs alerting: why a hypothesis and a notebook beat another rule
  2. Set up Jupyter and pandas locally (the only online step)
  3. Generate self-contained telemetry: a benign day plus one injected intrusion
  4. Load the telemetry into pandas and get your bearings
  5. Frame the hypothesis (this is a hunt, not a rule)
  6. Technique 1 -- least frequency of occurrence ('stacking') to surface the long tail
  7. Technique 2 -- pivot on the anomalous lineage and pull the full context
  8. Technique 3 -- command-line analysis: encoded blobs, download cradles, and long-command outliers
  9. Technique 4 -- beacon detection by jitter, not by volume
  10. Technique 5 -- rolling time-series views to see the burst
  11. Turn the confirmed hunt into a durable, ATT&CK-tagged detection
  12. Failure modes and judgment: when a hunt wins, and when it does not

Open the full interactive lab →