Lion Cipher Lab

Define an agent-to-agent message protocol from scratch — an envelope, a hand-written schema registry, HMAC-SHA256 over a canonical serialization with per-sender keys, and a replay window — then forge a containment order against your own SOC mesh and measure what each layer actually stops

Why it matters

Split a SOC's automation across four agents — one triages the alert, one enriches it, one supervises, one contains — and you have built a MESH: peers that talk to each other over a bus, with no parent in the middle checking their homework. The last message in that mesh pulls a host off the network. That is the whole reason this lab exists. In a document pipeline a malformed handoff produces a bad summary. Here it produces a finance server that cannot reach the domain controller at 02:00, or an exfiltrating laptop that nobody isolated, and both of those are somebody's morning. Start where…

What you'll learn

Steps in this lab

  1. What this lab is, what it is not, and every word you will need
  2. Open a terminal, check Python, make a scratch folder
  3. Build the mesh — and read the paragraph about stubs before you paste anything
  4. The baseline: bare JSON dicts on a queue, and the 19 wrong containment decisions nobody heard about
  5. The envelope and the schema registry — a hundred lines you can read
  6. Measure the schema: 10.6% detection to 96.9%, 19 wrong decisions to 0 — and the three it cannot see
  7. Authenticity: canonical bytes first, then HMAC-SHA256 with per-sender keys
  8. The forgery: a compromised enrichment agent orders containment as 'supervisor'
  9. Why signing a non-canonical json.dumps is a bug — 400 of 400 legitimate conversations, dead
  10. Replay: 400 genuine orders, said again — and the trap that undoes both defences at once
  11. Version skew — the honest negative, where your own protocol takes your own mesh down
  12. The whole protocol, both attacks, one table
  13. When NOT to build your own protocol — and what to do on Monday

Open the full interactive lab →