Lion Cipher Lab

Detect a model-extraction attack against your own classifier from its query stream: build a PRADA-style monitor, measure detection vs false positives, and see why a patient attacker still slips through (free, local scikit-learn)

Why it matters

Model extraction is usually taught from the attacker's chair: query a deployed model, harvest its answers, train a clone. But if you RUN a model behind an API, your job is the other side of that transaction, and you cannot un-expose a model you are paid to serve. So the practical question becomes: can you SEE a cloning attempt in the traffic while it is still happening? Juuti et al.'s PRADA work observed that extraction queries, which are engineered to probe the decision boundary, cluster unnaturally: the distribution of distances between a client's successive queries stops looking like the…

What you'll learn

Steps in this lab

  1. The words you need: victim, query stream, and why extraction traffic is shaped differently
  2. When this detector earns its keep, and when it is security theater
  3. Set up: install the libraries and build the victim phishing classifier
  4. Build the PRADA-style detector: growing-minimum distances plus a normality test
  5. Simulate the two query streams: benign users vs a boundary-probing extractor
  6. Run it and read the ROC-style tradeoff: detection rate vs false positives
  7. The honest negative: the patient attacker walks straight through
  8. Honest limits, and doing it better

Open the full interactive lab →