Lion Cipher Lab

Audit an AWS security group export with CIDR math and find the world in disguise

Why it matters

Most cloud breaches that start with the network start with one rule: SSH, Remote Desktop or a database port open to far more of the internet than anyone meant. Teams look for it by searching for 0.0.0.0/0, the address everyone knows means 'anywhere'. That search drowns in noise from the default outbound rule and misses the rules that actually bite: an IPv6 ::/0 added during a test, a /16 typed where a /24 was meant, and the two halves 0.0.0.0/1 and 128.0.0.0/1 that together are the whole internet without ever saying so. On top of that, AWS security groups have no deny rules and every group…

What you'll learn

Steps in this lab

  1. The words first, and a one-line recap of the beginner labs
  2. Open a terminal, check Python, and make a folder
  3. Warm up: five lines of CIDR math with the ipaddress module
  4. Generate the export you will audit
  5. BEFORE: the search everybody runs first
  6. Build the tool: a CIDR-aware auditor in about 160 lines
  7. AFTER: run it and read every finding
  8. Effective exposure: why one loose group wins
  9. Measure: the naive match and the tool against the same answer key
  10. Fix it on a copy, and prove the fix with the same tool
  11. What the export cannot tell you (the honest negatives)
  12. Optional: point it at a real account, read-only
  13. Judgment: when to reach for this, when not to, and how a pro does it

Open the full interactive lab →