Skip to main content

ASI01: Defending Against Agent Goal Hijack

Learn the nine OWASP mitigations that stop goal hijacking, from input filtering to drift alerts.

Task 1: Introduction

Task 2: Don't Trust the Input

Task 3: Guardrails and Instruction Hierarchy

Task 4: Goal Integrity Monitoring

Task 5: Practical: Find the Hijack

Task 6: Conclusion

Back to all walkthroughs
Room Icon

ASI01: Defending Against Agent Goal Hijack

Max room.

Learn the nine OWASP mitigations that stop goal hijacking, from input filtering to drift alerts.

medium

45 min

124

User profile photo.
User profile photo.

To access material, start machines and answer questions login.

Hopefully, the ASI01: Agent Goal Hijack and ASI01: Indirect Injection in Agentic Systems rooms have effectively communicated just how dangerous agent goal hijack is as a vulnerability. On top of this, it's also used as a jumping-off point for many of the vulnerabilities that will be discussed later in the Agentic Security path. That makes knowing how to defend against it pivotal.

We briefly discussed some mitigations in the ASI01: Agent Goal Hijack room. Now we go deeper, putting the spotlight on the controls that can help prevent an agent's goal from being hijacked. defines nine mitigations, and we've split them into three groups for discussion. These groups don't always line up with the numbers OWASP assigns to them, so don't get thrown off by that.

Learning Objectives

  • Explain why input-stage controls (treating everything as untrusted, sanitising connected data sources) come before an agent starts reasoning
  • Describe how locked system prompts, intent capsules, least privilege, and runtime intent validation define and gate what an agent can be and do
  • Distinguish a model-level defence (instruction hierarchy) from the application-level controls a builder configures
  • Explain how behavioural baselining, red-teaming, and insider threat programmes detect and respond to goal drift
  • Map a specific mitigation to a specific failure point in a goal hijack

Prerequisites

Answer the questions below

Let's go!