Lion Cipher Lab

Draft Sigma rules with an LLM — then prove they actually work

Why it matters

A language model is genuinely good at the boring half of detection engineering: turn "I want to catch PowerShell running an encoded command" into a plausible Sigma rule in seconds, with the fields laid out and the YAML indented. That is a real time-saver. The trap is believing the other half. A model — especially a small one you run for free on your own laptop — will confidently invent field names that do not exist in your logs, pick the wrong logsource, and use modifiers that are not valid, and it will do all of that in output that looks completely correct. A wrong detection is worse than…

What you'll learn

Steps in this lab

  1. Why draft-then-verify beats draft-and-trust
  2. Install Ollama and a small local model
  3. Install the verification tooling — sigma-cli and pySigma
  4. Draft a rule from plain English with the model
  5. Verify (a): validate the rule with `sigma check`
  6. Verify (b) and (c): convert it, then test it against the sample event
  7. Catch the model lie and fix it against the real schema
  8. Draft several, and MEASURE the hit rate
  9. When to trust the model, when not — and how to do it better

Open the full interactive lab →