Lion Cipher Lab

Extract IOCs from a threat report with a local LLM, score it against your own regex, and catch the IOCs it invents

Why it matters

Pasting a threat report into a chatbot and asking 'what are the IOCs?' is now a normal Tuesday for an analyst, and the answer looks great: neat, refanged, de-duplicated. Some of it is invented. In this lab the model's reply contained three indicators that exist nowhere in the report - a sibling domain, a 'completed' URL and a hash with one character wrong - and a hash that is one character wrong is worse than no hash, because it looks checked. A plain regex invents nothing but cannot read: it flagged a software version number as an IP and a vendor's update server as an IOC. The skill this lab…

What you'll learn

Steps in this lab

  1. The words first: IOCs, defanging, regex, a local LLM, precision, recall, and a hallucinated IOC
  2. Open a terminal and make a scratch folder (Windows, macOS, Linux)
  3. Write the synthetic report and its answer key - and read the seven traps planted in it
  4. Write your own regex extractor in about 40 lines
  5. Write the scorer and score the regex: 90% recall, 53% precision, zero inventions
  6. Score the STUB model's plain answer: better precision, three invented IOCs
  7. OPTIONAL, live: install Ollama, run a real small model on the same report, and score it
  8. The better way: force JSON, make every IOC quote its source span, and drop the ones that cannot
  9. The honest negatives: what the gate cannot fix, and why the result is a review queue, not a blocklist
  10. The judgment: regex vs model, when NOT to use a model at all, and how a pro does it

Open the full interactive lab →