Lion Cipher Lab

Steal a model with a model-extraction attack: train a victim classifier, query it, and clone it into a surrogate (free, local scikit-learn — no API key)

Why it matters

The moment you expose a trained model behind a prediction API — a public MLaaS endpoint, an internal microservice, a mobile app that phones home — you are handing out samples of the exact function that model computes. An attacker who never sees your weights or your training data can query that API, keep the input-output pairs, and train their own SURROGATE that copies your decision boundary. That lets a competitor clone a model you spent money and private data to build, and it gives an attacker a free local copy to craft further attacks against without tripping your monitoring. Model…

What you'll learn

Steps in this lab

  1. The words you need: victim, surrogate, black-box, fidelity
  2. When extraction is a real threat, and why it works
  3. Set up: install scikit-learn and split the data three ways
  4. Train the victim and stand it up behind a local API
  5. Be the attacker: harvest predictions and train a surrogate
  6. Run it, then watch fidelity grow with the query budget
  7. Defend: shrink the leak, raise the cost, and watch for extractors
  8. Honest limits, and doing it better

Open the full interactive lab →