
This course contains the use of artificial intelligence
Companies now run their own AI: a model server, an assistant that reads the company's documents, and a gateway in
front. Attackers rarely need to break the model itself. They swap a model file, find a leaked key, reach the model
server by a back way, or hide orders inside a document the assistant reads. This course teaches you to defend every
one of those parts, on a real platform you run yourself.
You build a small AI platform with Python and Docker on one computer: a ticket classifier (scikit-learn), a model
registry, a retrieval assistant, a model server and an API gateway. A runner of 13 safe attacks scores it. On the open
platform, 13 of 13 attacks get through. Section by section you add one control at a time, and the same runner shows
the same attack blocked, until 0 of 13 get through.
You learn to:
Threat-model an AI platform: assets, trust boundaries and the attacker's map.
Load model files safely: why a pickle file can run code, SHA-256 fingerprints, signatures and a restricted loader.
Harden containers: a non-root user, read-only files, dropped capabilities, and memory, CPU and process limits.
Lock down the network: a private model server, hashed and scoped API keys with rotation, rate and size limits.
Keep secrets secret: leaks in image layers, debug pages and errors; Docker Compose secrets; a secret scanner.
Protect data and the assistant: signed training data, team-by-team document isolation, prompt-injection guards.
Detect and test: tamper-evident audit logs, model-extraction alerts, security tests with pytest, and one release
gate that stops an unsafe build.
How the course is taught
Problem first: every lecture starts with what goes wrong, shown as an animated picture before any code.
The attack first: you see the attack work on the open platform, then build the defence, then see it blocked.
Code explained block by block: every file opens in a real terminal and every block is explained before it runs.
Real output only: every result on screen comes from a real run of the lab; surprises are kept and explained.
Safe by design: every attack targets only your local lab and is harmless.
What you need
Basic Python and a terminal. Everything runs on one computer: no cloud account and no GPU. Lecture 1.3 sets up
Ubuntu (on Windows through WSL), Docker and Python step by step.
The last section shows the whole platform under attack end to end, and what changes at production scale with
Kubernetes, cloud and GPU clusters.