Lion Cipher Lab

Virtual-patch a SQL injection tonight, or wait for the code fix?

Why it matters

It is 9pm, an endpoint on your product is taking a SQL injection, and the clean fix needs a release cycle you do not have tonight. A virtual patch, a filter rule dropped in front of the app, can cut the exposure in minutes without shipping code. The trap is treating that rule as the fix. In this lab you build the rule, then measure it: it stops 85% of a labelled attack set and wrongly blocks 19% of real customer searches, while the one-line parameterized query stops 100% with zero false positives. The skill a security engineer is paid for here is not writing the regex; it is knowing what it…

What you'll learn

Steps in this lab

  1. The decision you are actually making, and the words you need
  2. Set up: a folder and a working Python (no installs)
  3. Save the vulnerable app and the filter it will call
  4. See the leak live, before you defend anything
  5. Build the measurement sets: labelled attacks and labelled real traffic
  6. Measure both defences against both sets
  7. Watch the virtual patch work, and watch it fail, live
  8. Now the code fix, and why it wins on the numbers
  9. The third number: time-to-protect, the only axis the virtual patch wins
  10. The judgment: four scenarios, pick a path and defend it
  11. Honest negatives: what the rule misses, why WAF rules rot, and the expiry date
  12. What you built, and the reflex to keep

Open the full interactive lab →