Machine Learning CTF Challenges

May 13, 2026 · View on GitHub

Machine Learning CTF Challenges

Exploit AI agents. Poison ML pipelines. Inject prompts. Invert models. Capture flags.

Total Agentic LLM ML

Mapped to: OWASP LLM OWASP Agentic OWASP ML MITRE ATLAS

Easy Medium Hard Docker

Applications increasingly rely on ML models, LLMs, and autonomous agents in their backend — but these components introduce attack surfaces that traditional security testing often overlooks. This repository is a collection of CTF challenges that put you in the attacker's seat: break into AI agents, poison training data, invert models, inject prompts, and exploit insecure ML pipelines to capture flags.

CTF Challenges :open_file_folder:


Agentic

Exploiting trust boundaries, insecure communication, and tool-use in autonomous AI agent systems.

Matrix

Exploit Agent Smith's hidden capabilities to access the Architect's sealed Vault from within.

TargetMulti-Agent System (A2A Protocol)
VectorInsecure A2A Agent Capabilities
DifficultyMedium
RefOWASP ASI02:2026

Rogue

You control a Research Agent trusted by a fintech app — make the Financial Assistant perform an unauthorized action.

TargetFinancial Assistant + Research Agent (A2A)
VectorInter-Agent Trust Exploitation
DifficultyMedium
RefOWASP ASI07:2026 | ASI02:2026

Mirage

Identify a backdoored MCP server and exfiltrate .env data to an attacker-controlled endpoint.

TargetSecureCode IDE + Remote MCP Server
VectorMCP Signature Cloaking
DifficultyMedium
RefOWASP LLM03:2025

LLM

Exploiting prompt injection vulnerabilities in LLM-powered backends to achieve unintended code execution or data access.

Dolos

Bypass prompt-injection detection and trick the LLM into executing system commands to read the flag.

TargetFlask + OpenAI LLM + Rebuff Guardrails
VectorPrompt Injection → RCE
DifficultyEasy
RefOWASP LLM01 | AML.T0051

Dolos II

Craft prompts that make the LLM generate malicious SQL, leaking user David's secret from the database.

TargetFlask + OpenAI LLM + SQL Database
VectorPrompt Injection → SQLi
DifficultyEasy
RefOWASP LLM01 | AML.T0051

ML

Attacking machine learning models directly — inverting, extracting, poisoning, or exploiting their supply chain to subvert intended behavior.

Vault

Reverse-engineer the model's learned representations to reconstruct valid credentials for the vault.

TargetFlask + Neural Network (Access Control)
VectorModel Inversion
DifficultyHard
RefOWASP ML03

Heist

Poison the training data so CityPolice's AI cameras fail to detect the crew's red getaway car.

TargetFlask + CV Model (AI Surveillance Cameras)
VectorData Poisoning
DifficultyMedium
RefOWASP ML02 | AML.T0020

Fourtune

Extract AI Corp's verification model and craft adversarial inputs to bypass authentication.

TargetNeural Network (model.h5) + Identity Verification
VectorModel Extraction
DifficultyHard
RefOWASP LLM10 | AML.T0044

Persuade

Upload a malicious PyTorch model to exploit unsafe deserialization and achieve arbitrary file read on the server.

TargetFlask + PyTorch Model Upload (Sentiment Analyzer)
VectorModel Serialization Attack
DifficultyMedium
RefOWASP LLM05 | ML06 | AML.T0010


Contributing

Got a challenge idea? New attack vector? Love to add it.

  1. Fork the repo
  2. Create a folder: <Name>_ML_CTF_Challenge/
  3. Include a README.md, Dockerfile, and requirements.txt
  4. Open a pull request

LinkedIn GitHub

More challenges actively in development — watch this repo to stay updated.