Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
IGNORE PREVIOUS: Attacking & Defending LLM Applications
New
Rating: 5.0 out of 5(3 ratings)
14 students

IGNORE PREVIOUS: Attacking & Defending LLM Applications

Prompt injection, indirect injection, agent and MCP attacks, guardrail evasion, and the defences that hold.
Created byArmaan Sidana
Last updated 10/2026
English
EnglishSpanish

What you'll learn

  • Why the context window has no provenance, and why that single property is the root cause of every prompt injection attack.
  • Stand up a local LLM attack range (model, chat surface, retrieval store, tool-calling agent and classifier) and attack it for the rest of the course.
  • Why a model's refusal is a learned preference rather than an enforced control, and what follows from that distinction.
  • Why instruction and data share one channel, and why delimiters, XML tags and "never reveal your prompt" cannot separate them.
  • Evade a content classifier at the character and encoding layer, and explain the rule underneath: a filter reading one layer cannot see a payload in another.
  • Carry out and recognise indirect injection from a web page, a retrieved document, an image and a tool result.
  • Recognise injected VALUES, not just injected instructions: the 2026 agent problem where nothing in the input looks like a command.
  • Trace a full promptware kill chain: reconnaissance, payload, persistence and exfiltration, with no click from the victim.
  • Audit tool schemas and MCP servers as attack surface, including tool poisoning, rug pulls and the re-review problem.
  • Use the lethal trifecta of private data, untrusted content and exfiltration as a design test that tells you which capability to remove.
  • Measure a guardrail's own contribution instead of the whole stack's, and then break the guardrail you just deployed.
  • Design an LLM system that cannot be talked out of its own policy, and state honestly what that design does not buy you.
  • Run an adaptive attack against your own defence, and write a finding that is denominated in a budget so it is still true next quarter.

Course content

5 sections • 22 lectures • 2h 1m total length
  • The one sentence3:52
  • Build the range5:33
  • Your first extraction5:18
  • Refusal is a preference5:43
  • One channel for instruction and data5:40

Requirements

  • Comfort with a terminal and basic Python. You will install and run things.
  • A machine that can run a small open-weights model. A recent laptop GPU is plenty; the course gives a CPU-only fallback.
  • No machine learning background required. Every mechanism the course relies on is explained in the course.
  • No cloud account, no API key and no paid service is needed. The entire range runs locally.

Description

The context window has no provenance.

That one sentence is the whole course. A language model receives a single stream of tokens. The system prompt, the user's question, the web page a tool fetched, the row that came back from a database, the alt text inside an image: all of it arrives in the same channel, in the same format, with no mark saying which part you wrote and which part an attacker did. Everything in these twenty two modules is a consequence of that, and every defence that works is an attempt to put provenance back somewhere the model cannot reach.

IGNORE PREVIOUS is a practical course on attacking and defending LLM applications, built against a local stack you stand up yourself in module one and keep for the rest of the course. No API keys. No cloud bill. No vendor's product on the other end of a payload.

WHAT MAKES THIS COURSE DIFFERENT

It argues. Every module takes a position, shows you the mechanism underneath it, and tells you where the position stops being true. You are not given a list of tricks to paste; you are given the reason a class of attack works, which is the only thing that survives the next model release.

It is honest about defence. Four modules are spent on what actually holds, and they are the ones with the most caveats in them. A filter that reads English is reading the wrong layer. A guardrail is a classifier with a threshold, and a threshold has an outside. Design beats detection, and even the design chapter states, out loud, the three things it does not buy you.

It runs locally. Module one builds the range: a small open-weights model, a chat surface, a retrieval store, a tool-calling agent and a classifier, all on one machine. Every later module attacks that, so you can re-run anything, change one variable, and watch the result move.

WHAT YOU WILL SEE

  • Why a refusal is a preference and not a control, shown where the model actually makes the decision.

  • Why one channel for instruction and data is the defect, and why delimiters, tags, XML fences and the phrase "never reveal" cannot repair it.

  • Character-level evasion at the byte layer: invisible ranges, homoglyphs, bidirectional text, measured against a classifier rather than asserted.

  • Encoding and indirection, and the general lesson underneath them: a filter reading one layer cannot see a payload living in another.

  • Multi-turn drift, where the defended quantity is per-turn and the attack is per-conversation.

  • Dormant payloads that pass human review and wake on a trigger.

  • Indirect injection: the web page that attacks you, the retrieved chunk that is obeyed as an instruction, and text inside an image or a document.

  • Injected values rather than injected instructions. This is the harder 2026 problem, where nothing in the input looks like a command.

  • A full promptware kill chain: reconnaissance, payload, persistence, exfiltration, zero-click.

  • Tool schemas as prompt surface. Names, descriptions and parameter docs are all in the context window, and all of them are attacker-reachable in a supply chain.

  • MCP tool poisoning and rug pulls, and the question nobody has an answer to: who re-reviews a tool after it was approved.

  • Excessive agency, where capability and not intent decides what an injection costs you.

  • The lethal trifecta of private data, untrusted content and exfiltration, and why removing any one of the three kills the attack.

  • What a guardrail actually is, how to measure its own contribution rather than the stack's, and then measured evasion against the exact guardrail the course deployed.

  • A design that cannot be talked out of it: plan and data separation, capabilities, provenance, and approval at the exfiltration boundary, with its limits stated.

  • And finally, why the attacker moves second: what an adaptive attack does to a static benchmark, why a number without a budget is a sentence and not a finding, and how to write one up so it is still true next quarter.

WHAT IS NOT IN HERE

No working payload against any named, currently live product. The course teaches mechanisms against a stack you own. Where a technique's specifics would be a search term for someone attacking a system they do not run, the course says so and withholds them, and tells you what it withheld. The argument is what a defender needs; the recipe is not.

WHO IT IS FOR

Application and platform engineers shipping LLM features. Security engineers and pentesters who now have "AI" in scope and no methodology for it. Red teamers moving into model and agent testing. Architects and GRC people who have to sign off on an agent design and want to know what the signature means.

REQUIREMENTS

Comfort with a terminal and with Python. A machine that can run a small open-weights model. A recent laptop GPU is plenty, and the course tells you the CPU-only fallback. No prior machine learning background is assumed; the course explains every mechanism it relies on.

Twenty two modules, about two hours, none longer than six minutes. Every one of them is a complete argument.

Who this course is for:

  • Application and platform engineers who are shipping an LLM or agent feature and have to make it safe.
  • Security engineers and penetration testers who now have "AI" in scope and no methodology for testing it.
  • Red teamers moving from traditional application testing into model and agent testing.
  • Architects, AI governance and GRC practitioners who must sign off on an agent design and want to understand what they are signing.
  • Anyone who has read that prompt injection is unsolved and wants to know precisely why, at the mechanism level.