Lion Cipher Lab

Turn rules of engagement into a machine-checked scope guard

Why it matters

The single fact that separates a penetration tester from a criminal is written permission, and that permission has edges. The rules of engagement say exactly which addresses and names you may touch, which ones you must never touch, and when. Step one address outside them and you can take down a client's production database, attack a third party who never agreed to anything, or break the law -- and a good intention is no defence. The scary part is how ordinary the mistakes are. Someone checks scope by eye or with a quick text match, and 10.1.2.30 looks like 10.1.2.3, evilexample.com contains…

What you'll learn

Steps in this lab

  1. What rules of engagement are -- every term, defined once
  2. Open a terminal and check Python (and, on Windows, the time zone data)
  3. Turn the signed scope into data: seed.py
  4. Write the guard -- and the naive check it replaces: scope_guard.py
  5. Run the guard on all 40 planned targets
  6. Measure the before/after: what the naive check would have let through
  7. Put the guard in front of every tool: the check mode and its exit code
  8. The honest negatives: what no scope guard can know
  9. When, why, and how to do it better
  10. What you built -- and the reflex to keep

Open the full interactive lab →