Knowledge & Retrieval · Intermediate · about 25 min
RAG Poisoning
Upload malicious documents to manipulate RAG context and override policies.
What you practise
Poison retrieval context and override downstream behavior. You run the attack yourself on a live model in a private sandbox set up for you, then capture the flag. Nothing to install and no API key.
Why retrieval looks like memory until it isn't
A RAG assistant feels like it 'knows' your company's policies. It doesn't, it has read access to a folder. Anyone who can write to that folder can edit the assistant's memory in real time. The model has no way to distinguish a real HR memo from a forged one that says 'this overrides previous memos', because the difference isn't in the text, it's in provenance, which the retriever throws away.
Where this has happened
- ChatGPT 'web browsing' results (2023): OpenAI's browsing alpha would summarize arbitrary web pages, and pages with hidden injection text steered the summarizer's downstream actions.
- Microsoft Copilot ASCII smuggling (Aug 2024): Johann Rehberger showed Copilot ingesting calendar invites and emails as RAG context, with hidden Unicode tags overriding instructions.
- Notion AI / Confluence AI (2024): Multiple reports of wiki pages with attacker-controlled content steering enterprise summarizers, because anyone with edit rights to one page could rewrite what the assistant 'knew'.
Sign in to launch this lab Learn the theory in the Academy
More Knowledge & Retrieval labs
- SSRF via LLM URL Generation: Turn LLM-generated URLs into server-side requests against internal services.
- Structured Output Injection: Manipulate LLM-generated JSON so downstream pricing logic accepts a malicious quote.
- RCE via Pickle Deserialization: Exploit unsafe deserialization to execute arbitrary code on an ML inference server.
- Indirect Prompt Injection: Inject instructions via external content that the LLM retrieves and follows.
- RAG Membership Inference: Determine whether specific documents exist in a RAG knowledge base.
Catalog
Attack labs
20 hands-on scenarios across 4 tracks. Pick a target, launch a private sandbox, capture the flag.
Sessions
Active sessions
Resume a running lab or stop it before starting the next one.