Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
AI Infrastructure Security: Build, Attack and Harden AI
New

AI Infrastructure Security: Build, Attack and Harden AI

Build, attack and harden a real AI platform with Python and Docker: model files, containers, keys, secrets and data
Created byAnil Kumar
Last updated 11/2026
English

What you'll learn

  • Map an AI platform's assets, trust boundaries and attack paths, and score it with a runner of 13 safe local attacks
  • Show why loading a pickle model file can run code, and refuse changed models with SHA-256 hashes and signatures
  • Harden Docker containers: a non-root user, read-only files, dropped Linux capabilities and memory, CPU and process limits
  • Hide the model server on a private Docker network so the only way in is the API gateway
  • Design API keys the right way: stored as hashes, scoped to what each client needs, and rotated safely
  • Add rate limits, size limits and input checks at the gateway, and see a flood and a crash request stopped
  • Find secrets leaking from image layers, debug pages and error messages, and move them into Docker Compose secrets
  • Scan a project for leaked secrets and audit pinned Python packages for known vulnerabilities with pip-audit
  • Protect training data with a signed manifest, and catch a careful data-poisoning attack the old checks missed
  • Keep each team's documents apart in a retrieval assistant, with the team taken from the API key, not the request
  • Guard an assistant against prompt injection with an input filter and an output check, and test both
  • Build tamper-evident audit logs, spot model extraction, and gate every release with one security check

Course content

10 sections • 30 lectures • 6h 46m total length
  • What AI Infrastructure Is, and Why Attackers Go After It13:28
  • The Brightmoor Platform: Every Part and What Can Go Wrong13:05
  • Your Lab: Ubuntu, Docker, Python, and the Platform Running19:24

Requirements

  • Basic Python: functions, running scripts, installing packages
  • Basic terminal use: moving between folders and running commands.
  • A computer with Linux, or Windows 10/11 with WSL (Ubuntu), able to run Docker. Lecture 1.3 sets everything up

Description

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.


Who this course is for:

  • Developers and ML engineers who run models in production and need to secure them
  • Security engineers moving into AI security who want hands-on attacks and defences
  • DevOps and platform engineers who deploy AI services with Docker
  • Students who want a practical, portfolio-ready AI security project