Courses3 levels
Level 1 · Foundations11 courses
Level 2 · Core5 courses
Level 3 · Advanced5 courses
Labs8 topics
Library Practice exams AI Range Pricing Start free

KaliRange / Core

Securing models and the ML supply chain

Poisoned data, evasion, privacy attacks, model theft and unsafe model files.

13 lessons · about 10 hours · every command tested

How to use the lab files

The zip keeps the files of each lesson apart, and the lessons work in one flat folder. After you unzip it, sh kr-lab.sh LESSON FOLDER builds that folder as it stands after a lesson, for example sh kr-lab.sh 00-set-up-your-lab ~/krlab/securing-models.

You will build

Build a model security scorecard

You need

A computer with Linux, macOS, or Windows with WSL. No GPU, no cloud account and no paid tool.

Next course

Red-team your own AI system

  1. 00Set up your lab for Securing models and the ML supply chainCreate the lab folder and a Python environment with pinned versionsSet-up20 min
  2. 01Map the attacks on a model and train your targetPlace each attack on a model at the stage of its life where it enters35 min
  3. 02Poison the training data and detect itPoison one class by flipping labels and by adding bad images, at several rates40 min
  4. 03Plant a backdoor and find itPlant a corner-patch backdoor and show that the clean accuracy hides it45 min
  5. 04Fool a model at run time and harden itFool a model with a gradient attack and with a search that sees only its probabilities45 min
  6. 05Measure privacy leaks with membership inference and inversionRun a membership attack with a shadow model and read its accuracy against a coin flip40 min
  7. 06Add privacy defences and price themApply four defences against the membership attack and read the price of each in accuracy45 min
  8. 07Steal a model through its API and detect itCopy a model from its labels alone and measure how faithful the copy is for 10 to 225 queries45 min
  9. 08Load a model file safelyShow that a pickle file runs code while it loads, and read what is in one without loading it60 min
  10. 09Store the weights as safetensors and test the fileSave a model as a safetensors file and rebuild its predictions from the file alone30 min
  11. 10Secure the ML pipeline with release gatesWrite a script of seven gates that decides, by its exit code, whether a model may ship45 min
  12. 11Build a model security scorecardBuild one command that grades a model folder on five areasBuild45 min
  13. 12Grade a colleague's model and decide whether it shipsGrade a model folder with five planted problems using the scorecardTest90 min

Work roles

Work roles this course supports

The course helps you to prepare for these roles of the NICE Workforce Framework for Cybersecurity (NIST SP 800-181 Rev. 1). No single course covers a whole role, and KaliRange is not a certification body.

Role names and codes are NIST's (Components 2.2.0, 2026-04-28); the choice of roles is our own reading of the role descriptions. The NICE Framework at NIST has the full description of each role.