
Deliberately vulnerable local AI application for hands-on LLM, agentic AI, and MCP red teaming, with 46 OWASP-mapped attack labs, CTF challenges, and progressive defenses.
AIGoat (also written AI Goat) is an open source, deliberately vulnerable AI application for hands-on LLM red teaming, agentic AI security, and MCP security training. Security engineers, red teamers, students, and researchers attack a live large language model inside a realistic AI-powered e-commerce store: prompt injection, jailbreaks, system prompt leakage, RAG poisoning, supply chain backdoors, MCP tool poisoning, agent memory poisoning, and data exfiltration.
AIGoat maps every lab to the OWASP Top 10 for LLM Applications 2026, the OWASP Top 10 for Agentic Applications 2026, and the OWASP MCP Top 10 (2025, beta). It ships 46 hands-on labs, 9 AI security CTF challenges, an Agentic Kill Chain capstone, a threat modeling guide, and 3 progressive defense levels up to NVIDIA NeMo Guardrails. Everything runs locally with Ollama, free and with no API keys, or in Google Colab if you cannot run it locally.
This application is intentionally vulnerable. Run it only on your own machine or a private Colab session, for learning. Do not expose it to the internet.
What's new in v2.0: agent and MCP attack surfaces, labs grow from 17 to 46, the Agentic Kill Chain workbench, Learn pages, Google Colab support, and a refreshed UI. See RELEASE_NOTES_v2.0.md.
At the core is Cracky, an AI shopping assistant backed by a real LLM (Mistral by default, via Ollama) and connected to a product database, an order system, and a poisonable vector knowledge base. Around it sit a tool-using shop agent, a staff admin assistant that speaks the Model Context Protocol (MCP) to allow-listed servers, and the Agentic Kill Chain workbench. Every weakness is real and mapped to an OWASP risk.
You exploit each vulnerability yourself, then switch on defenses to see what still works. Every attack, defense, and flag runs on your own hardware.
AIGoat platform architecture: attack labs, defense pipeline, and challenge engine
Attack Labs page with guided exercises for each OWASP risk
AIGOAT{...}) generated at runtime, worth 2,100 points.LLM security is different from traditional application security. Prompt injection does not behave like SQL injection, and RAG poisoning has no equivalent in the OWASP Web Top 10. You learn it by practicing on a target.
| Feature | AIGoat | Typical alternatives |
|---|---|---|
| Focus | LLM, agent, and MCP security | Infrastructure or generic AI security |
| Deployment | Local single command, Docker, or Colab | Cloud-based or heavy provisioning |
| Coverage | OWASP LLM 2026, Agentic 2026, and MCP 2025 with 46 labs | Partial or narrow |
| Defense progression | 3 levels on chat, RAG, agent, and MCP surfaces | Static difficulty |
| Targets | Chatbot, tool-calling agent, real MCP servers, end-to-end kill chain | Chat only |
| CTF | 9 challenges with dynamic flags | Rarely integrated |
Pick one way to run AIGoat: