genai
SECURITY LAB
Learn · Free hands-on series

Learn AI security by breaking it.

A free series that teaches LLM and AI application security the way you actually test it: short concept material, then a live in-browser lab where you run the loop — Attack → Defend → Verify. You exploit a real target, implement the fix, and prove the fix holds. No setup, no API keys, no Docker.

Browse the curriculum Every lesson is free to read.
Some labs are free with an account; the rest are on a paid plan.
  • No setup
  • No API keys
  • No Docker
Join 1,500+ learners
Every part runs the same loop
01 · Attack
Exploit a real target.
02 · Defend
Implement the fix.
03 · Verify
Prove the fix holds.

Who is this for?

  • Penetration testers and AppSec engineers who already know web application security and need to add AI/LLM components to their testing scope. Applications are shipping with LLM features now, and clients are starting to ask for AI testing.
  • Security engineers and developers defending AI systems — the defensive track of every part walks you through implementing the fix and checking it holds.

What do I need to start?

  • Familiarity with web application security concepts (injection, access control, SSRF-style trust boundaries) is enough.
  • No ML knowledge required. LLMs are treated as components in an application — the security testing mindset transfers directly.

You already know the shape of these bugs

LLM vulnerabilities are the trust-boundary bugs you already hunt, on a new surface. The exploitation instinct transfers — but the defenses don’t, and that’s the part worth learning.

If you can find this……you’ll recognize thisThe catch
SQL injection Prompt injectionSQLi has parameterized queries. Prompt injection has no equivalent — every defense is probabilistic.
Stored XSS Indirect prompt injectionThe attacker poisons content the model reads later — a web page, email, or retrieved doc. Closer to stored XSS than SQLi.
Reflected XSS / template injection Improper output handlingModel output rendered or executed unsanitised → XSS, SQLi, RCE downstream.
SSRF Tool abuse / excessive agencyOver-scoped tools and standing identities turn a prompt into a confused-deputy chain.
IDOR / broken access control Context & canary leakageThe model treated as an authorization boundary that isn't one.
The one-sentence version

Prompt injection is to LLM apps what SQLi was to web apps in 2002 — the canonical first bug — except the industry hasn’t found its parameterized queries yet, and may not. That’s why the defensive track here isn’t “use prepared statements”; it’s layered controls you verify under attack.

Aditya Agrawal, founder of GenAI Security Lab
Aditya AgrawalFounder, GenAI Security Lab
Why does this exist?

Ten years ago I published a free Android application security series at manifestsecurity.com. At the time, Android security had almost no free material to learn from — web security had plenty. That gap is why I wrote it. It still gets traffic today, and people still message me saying it’s how they learned Android pentesting.

AI security has that same gap right now. So I’m rebuilding it — this time for AI.

The curriculum

Six paths are live now, and a new part ships every week — each mapped to the OWASP LLM Top 10 (2026), the Agentic AI Top 10, and the MCP Top 10, so you can cite a recognized framework in your reports.

New to the terminology? Browse the AI security glossary

Foundations

AI Security Foundations

Build the map before you specialise. The trust-model shift that makes LLM security different, just enough of how a model works, the attack surface where every OWASP LLM risk lives, and how it all maps to the AppSec you already know.

  1. 1Why LLM security is different
  2. 2How LLMs work, just enough
  3. 3Why models follow instructions, refuse, and make things up
  4. 4Anatomy of an LLM app: the attack-surface map
  5. 5Prompts: engineering vs injection
  6. 6The LLM threat model, mapped to AppSec
  7. 7Orientation: OWASP, the two tracks, and scope
  8. 8The lab toolkit: how this platform works
Free to read8 parts, reading onlyStart the path
OWASP LLM01 · 2026

Prompt Injection

The attack every other LLM exploit rides on. Work the full technique tree — direct, jailbreaks, encoding, smuggling, context, indirect, and tool- and agent-mediated — then the controls that actually hold, each with a live target to try it on.

  1. 1Direct prompt injection
  2. 2Jailbreaks and guardrail evasion
  3. 3Encoding and obfuscation
  4. 4Smuggling and hidden injection
  5. 5Context and example manipulation
  6. 6Indirect prompt injection
  7. 7Tool, memory, and agent-mediated injection
  8. 8Controls that actually hold
Free to read8 parts · 29 labsStart the path
OWASP LLM02 · 2026

Sensitive Information Disclosure

Anything the model can see, it can be talked into repeating. Work the ways an assistant gives up secrets, internal documents, personal data and other tenants' records — then the controls that keep sensitive data out of its reach, with live targets to try them on.

  1. 1Cross-tenant and history bleed
  2. 2Internal knowledge leakage
  3. 3Secrets and config in context
  4. 4Personal data over-disclosure
  5. 5Retrieval and aggregation leaks
  6. 6Minimizing what the model can leak
Free to read6 parts · 14 labsStart the path
OWASP LLM08 · 2026

Hidden Context Exposure

The system prompt is not a secret store. Work the ways an assistant gives up its hidden instructions, its tool definitions and anything planted in them: asked for directly, carried out through a translation or an encoding, completed from a primed sentence, released to a claimed debug mode or audit, and pulled out by a document it retrieved. Then the fix that holds, with live targets to try it on.

  1. 1Direct extraction
  2. 2Extraction by transformation and encoding
  3. 3Priming and forged turns
  4. 4Fake modes and borrowed authority
  5. 5Indirect leakage through retrieved content
Free to read5 parts · 13 labsStart the path
OWASP LLM09 · 2026

Vector & Embedding Weaknesses

A vector index ranks by similarity and checks nothing else. Work the ways a RAG pipeline hands over what it should not: another tenant's chunk, a wider net than the question needed, a planted document that steers the answer, a contributed page that outranks the official one, content everyone believes was deleted, and the second retrieval paths a scope filter never covered. Then the controls that hold, with live targets to try them on.

  1. 1Cross-tenant and access-control leakage
  2. 2Over-broad retrieval
  3. 3Knowledge-base and upload poisoning
  4. 4Ranking and provenance manipulation
  5. 5Stale, deleted, and ghost content
  6. 6Advanced retrieval patterns that route around the boundary
  7. 7Controls that actually hold
Free to read7 parts · 17 labsStart the path
OWASP LLM10 · 2026

Improper Output Handling

Whatever the model writes is attacker-influenced input to whatever reads it next. Work the sinks where that goes wrong: a markdown renderer that fetches images, an HTML view, a generated SQL query, a template engine or eval call on the server, a spreadsheet export, a URL fetcher or XML parser, and a backend that acts on the model's JSON. Then the controls that hold, with live targets to try them on.

  1. 1Markdown rendering: images and links
  2. 2Raw HTML and cross-site scripting
  3. 3Generated SQL and code
  4. 4Output executed as server-side code
  5. 5Spreadsheet and CSV formula injection
  6. 6Unvalidated URLs and trusted structured output
  7. 7Output that drives actions and emails
  8. 8Controls that actually hold
Free to read8 parts · 26 labsStart the path
No lab setup. Everything runs hosted in your browser — open the part, exploit the target, write the fix, verify. It works the same on a pentest engagement machine as on your laptop.
New part every week — or jump ahead

Every path dated below is already in the app on the paid plan, and every path has a defensive track there too. Subscribe and work them today instead of waiting for the weekly drop.

Get the full path
OWASP LLM04
Supply Chain

Compromise what the app trusts before runtime — poisoned models, tampered dependencies, and unvetted third-party components.

OWASP LLM05
Data & Model Poisoning

Corrupt what the model learns or retrieves — poisoned training data, fine-tunes, and RAG sources that steer it.

Cross-cutting
OWASP Agentic AI Top 10

The agent-specific risks: goal manipulation, unsafe tool use, memory poisoning, and multi-agent trust failures.

Cross-cutting
OWASP MCP Top 10

Model Context Protocol risks: malicious tool descriptions, over-permissioned connectors, and consent/onboarding injection.

If you find this series useful, share it — same as the Android series, it only grows by people passing it around.

Suggestions, problems, or a topic you want covered: [email protected]

© 2026 GenAI Security Lab. All rights reserved. You may read, quote, and link to this material with attribution. Copying, republishing, redistribution, resale, or use to train models or build competing products is prohibited without prior written permission.