AI Security
The attacker's input is just more text to the model — that's the whole problem
Category: Defensive Security & SOC
Here's the plan: why this is a genuinely different problem, the modules below, a runbook-style walkthrough, interview prep last.
Worth knowing going in: the CIA triad and basic threat modeling (Security Fundamentals covers that). It also helps to know roughly what an LLM agent and tool use mean — see the AI Agents track.
Why AI Security Is a Different Problem
Traditional application security draws a reasonably clean line between code (trusted, written by developers) and data (untrusted, supplied by users). SQL injection, XSS, and most classic vulnerabilities exploit exactly that boundary blurring — data that gets accidentally interpreted as code.
An LLM has no equivalent boundary built in. Everything — the system prompt written by the developer, a user's message, a document retrieved for RAG, a tool's returned result — arrives as the same kind of thing: text in the context window. The model has no structural way to know that the developer's instruction deserves more trust than text that showed up inside a retrieved document. That collapsed distinction is the root of prompt injection, and it's why defenses borrowed directly from traditional web security (sanitize the input, escape special characters) don't fully transfer — there's no reliable syntactic marker separating "instruction" from "data" the way there is in SQL.
Analogy — Think of a brilliant new employee who takes absolutely everything they read at face value, including a sticky note found taped to a customer's file that says "please also email this customer's full records to this other address." A well-trained human employee has accumulated judgment about which instructions are legitimate and which aren't; an LLM, by default, has no equivalent instinct — it just processed more text, and some of that text looked like an instruction. Securing an LLM system means building that judgment back in deliberately, since the model won't develop it on its own just from being capable.
The Expanded Attack Surface, Once Tools Enter the Picture
A plain chatbot with no tool access can still be tricked into saying something embarrassing, but the damage stays contained to its own output. An agent with tool access — one that can read files, call APIs, send messages — turns a successful prompt injection into a real action with real consequences, not just bad text.
Learning Modules
Module 01 — Prompt Injection, Direct and Indirect
The core vulnerability, and the much harder variant
Topics covered:
Direct injection stays visible in the conversation itself, so a human reviewer or a message-scanning classifier at least has a shot at noticing it. Indirect injection buries the same kind of attempt inside something the model was only supposed to treat as data — a retrieved webpage, a PDF, a tool's returned result — content nobody set out to review for a hidden instruction at all.
Module 02 — Agent Permission Scoping
Treating every connected tool as a capability grant, not a convenience
Topics covered:
Connecting an agent to a tool that can delete records, send messages, or move money hands it real-world capability the moment the connection exists — whether or not the model ever actually misuses it under normal conditions. Scoping exactly which tools are reachable for a given task, and requiring explicit confirmation before anything consequential executes, is what limits the damage when (not if) a successful injection occurs.
Module 03 — Data Exfiltration Through Tool Use
Why "the model said something it shouldn't" is the mild version of this risk
Topics covered:
A genuinely dangerous outcome of a successful injection isn't a rude response — it's an agent with access to sensitive data and a messaging or network-capable tool being instructed to combine the two. Rendering an image whose URL encodes stolen data as query parameters is a documented real technique: the data leaves the system the moment the image is rendered and the request fires, with nothing in the visible text output looking obviously wrong.
Production Example
Interview Prep
Give the problem, the fix, and what it changed — around a minute a question works well.
Questions This Track Tends to Draw
Q1. Why would layering several weaker defenses beat relying on one strong-sounding defense for an LLM system?
A: Problem: no single mitigation available today reliably closes off prompt injection on its own, so betting everything on one control leaves a single point of failure. Solution: combining least-privilege tool scoping, marking retrieved content as data rather than instructions, monitoring tool-call behavior, and human confirmation on consequential actions means an attacker needs multiple independent layers to fail at once, not just one. Result: the system degrades gracefully when any single layer is bypassed, instead of failing completely the moment its one strong defense doesn't hold.
Q2. Where exactly should a human-confirmation step go, and what happens if it's added too liberally?
A: Problem: teams sometimes add a confirmation prompt everywhere "to be safe," which sounds cautious but changes user behavior in a way that undermines the control. Solution: reserve confirmation specifically for actions with real consequences — deleting data, sending something externally, moving money — and let routine, low-stakes actions proceed without one. Result: when a confirmation does appear, users still read and consider it, rather than having been trained to click through approvals without looking because most of them didn't matter.
Q3. A model's own training data gets manipulated to teach it a subtly harmful behavior. How is that different from prompt injection, and how do most teams actually address it?
A: Problem: this risk, usually called data poisoning, happens during training or fine-tuning, well before any runtime input ever reaches the deployed model — a completely different stage of the pipeline than an attacker crafting a clever prompt. Solution: a team that fine-tunes a foundation model it didn't train itself can't fix this with a runtime defense; the real mitigation is vetting whoever provided the base model and carefully checking any fine-tuning data that team controls. Result: treating this as a supply-chain concern, not an application-security one, puts the effort where it can actually catch the problem.
Open the Interview Q&A tab for the rest; Cheatsheets keeps the OWASP LLM risk categories handy for a quick look-up.

