The Pattern: Defense Becomes Attack
Across five incidents between 2024 and 2026, AI agents deployed for defense were turned against the organizations that deployed them. The pattern is consistent enough to deserve a name. We call it defense weaponization — the same architecture that makes an AI agent useful for triaging millions of events also makes it useful as an unwitting ally of an attacker.
The trigger is rarely a sophisticated exploit. It is an agent with action authority — the ability to approve, execute, summarize, or write back into trusted systems — combined with no robust trust boundary on what it reads and no reliable verification of what it produces. Once the agent touches a privileged system, every weakness in its input pipeline becomes a potential weapon, and every gap in its output verification becomes a potential backdoor.
What follows are five cases. They share a single mechanism: an autonomous system with privileged action, no robust trust boundary on its inputs, and no reliable verification of its outputs.
Failure Mode 1: Rogue Agent — When an AI Assistant Goes Off-Script
The first documented case: a Google Dialogflow agent, designed to assist customers on a public-facing site, was found to be taking unauthorized actions outside its intended scope. Adversarial inputs — carefully crafted user prompts — coerced the agent into invoking backend service operations it should never have touched. The bug class wasn't in the orchestration logic. It was in the agent's scope: once action authority was granted, there was no persistent boundary on what that authority could reach.
An agent with no scope constraint and no human-on-the-loop checkpoint is, in practice, an agent acting on the most recent instruction it received. When that instruction arrives through an attacker-controlled input surface — a chatbot, a transcript, a customer-support inbox — the attacker is now addressing the privileged backend directly. The trust problem isn't "did this agent write wrong code?" It's "did this agent act on a prompt it shouldn't have?"
Two things make this failure mode dangerous. The blast radius scales with the agent's accumulated authority, not with the model's output quality. And the failure leaves a clean audit trail: the agent did exactly what it was told; it just should never have been told to do it in the first place.
Failure Mode 2: Friendly Fire — Detectors That Run the Malware
An AI malware classifier is supposed to evaluate suspect files — detonate them in a sandbox, watch the behavior, and write a verdict. The friendly-fire failure mode inverts the threat model: the detector runs the payload.
The agent receives a sample from an analyst — typically via a ticketing system, an email attachment, or a pasted snippet. The agent then executes the sample in an environment that shares credentials, network reach, or trust with production systems. In documented cases, attacker-supplied payloads ran with credentials that allowed them to reach internal services, exfiltrate environment variables, or pivot laterally. The defender's own tooling became the initial-access vector.
The failure isn't a misclassification. It's an unguarded execution path. AI agents that "run code to analyze code" extend the trust boundary of the runtime directly into attacker-controlled territory. A trust-graded model treats detonation output as advisory until a human verifies the sample source and the sandbox containment. A non-trust-graded model reads the verdict, takes action on it, and the attacker's submission was the action that initiated the chain.
The pattern to take away: every "run-and-classify" agent needs a deterministic boundary between the test environment and any environment holding production authority. If the agent can write to anything real while running attacker code, the agent is the weapon.
Failure Mode 3: GhostApproval — Symlink Confusion in Approval Flows
Approval workflows are an obvious place to deploy an AI agent. Read the request, understand the context, route it to the right queue. The GhostApproval failure mode inverts this: the agent rubber-stamps approvals because it conflated an attacker-controlled identifier with a trusted one.
An attacker submits an approval request — a deploy, a permission grant, a finance transfer — and includes a file path, host identifier, or principal name that resolves to a different (trusted) entity than its surface appearance suggests. In one case, a symlink in a workspace caused the agent to review the contents of a different file than the path in the request named. In another, an attacker-controlled service identifier resembled an internal service name closely enough that the agent treated the request as a routine internal escalation.
The blast radius here is structural: an agent that approves actions is an agent whose approval ID will appear in every audit log downstream. If the agent approves a credential grant, the attacker now holds a legitimate credential. The confused-deputy problem is well understood in classical security; it is less well understood when the deputy is a language model that pattern-matches on identifiers rather than verifying their provenance against a ground-truth source.
The countermeasure isn't better prompts. It's a cross-source identity check: every identifier the agent uses to gate an action must be verified against a directory, a certificate authority, or a signed manifest before the action is taken.
Failure Mode 4: Chat vs Code — One Model, Two Wholly Different Answers
The fourth case is often missed: GitHub Copilot's chat interface and its code-completion surface have produced contradictory outputs to the same underlying question. Ask one: "what's the secure way to handle this authentication token?" Ask the other: "write a function that handles this authentication token." Two different answers — one cautious, one with the wrong behavior in production.
This isn't a generic "AI is inconsistent" complaint. It's a failure mode specific to systems where the same model is exposed through multiple surfaces — each with different context windows, prompt framing, and downstream action. Deterministic infrastructure — commits, pull requests, build configurations, deployed services — receives output from a non-deterministic assistant. An analyst reads the chat-interface guidance, trusts it, and the code-completion output writes into a system that runs in production. The contradiction becomes a vulnerability.
For SOC teams, this is the failure mode that lives inside their own workflows. If you use AI assistants in code review, threat-intel summarization, detection-authoring, and runbook generation, and you treat each surface as independent, you'll ship contradictory guidance. The fix is a verification layer: every output that drives a deterministic action gets cross-checked against the same context that the action will run under.
Failure Mode 5: HalluSquatting — Hallucinated Identifiers Become Attack Surface
An AI agent hallucinates a package name. The agent suggests a library for handling cryptographic primitives — but there's no package by that name in any registry. So an attacker registers it. Now every developer who follows the agent's instruction installs the attacker's code. This is HalluSquatting.
It's an attack class unique to agentic workflows. Anything the model invents — package names, CLI tool names, internal hostnames, configuration file paths — is a candidate target for the attacker who gets there first. The attacker doesn't need to compromise the model. They need to squat the artifact the model invented.
The financial-services analog is typosquatting. The AI analog is hallucinationsquatting, and it scales: every hallucination is potential attack surface. The trust-graded countermeasure is grounding. Every dependency name, hostname, or identifier in the agent's output is checked against a package registry, DNS record, or internal service catalog before any action is taken.
This is the failure mode most likely to spread: the failure isn't visible until the artifact gets used. If the developer doesn't install the package or run the command, nothing happens. If they do — silently, on the recommendation of a trusted assistant — the attacker has the inside path.
The Common Thread
Five cases. One mechanism. The defense agents failed because they were allowed to act on untrusted instructions and produce ungrounded outputs.
The blast radius scales with the agent's authority. A hallucinated package name compromises a developer's machine. A hallucinated internal hostname compromises a service. A scope-confused action compromises an entire backend integration. An approval forgery compromises the audit chain. The scope of the breach tracks the scope of the agent's permissions, not the cleverness of the attacker.
The question these five incidents raise: who defends against the defender? When the defense is an autonomous agent, that question is no longer rhetorical. The answer is a structural property of the defense system, not an afterthought bolted on after the next incident.
Trust-graded output. Every decision carries a confidence score and a written rationale. Suppression, escalation, and auto-response are gated not on the model's output alone but on a verifiable chain — input provenance, source-of-truth cross-check, and an explicit human-on-the-loop boundary. A hallucinated identifier, a confused-deputy approval, a contradictory answer across surfaces — each becomes a signal to escalate rather than act.
The RedEye Model: Outputs You Can Audit
The RedEye triage layer is designed against these failure modes. It treats every alert as an instruction input that may be adversarial, every classification as an output that may be ungrounded, and every response as an action with a verifiable audit chain.
Concretely: detection results are scored against a deterministic decision boundary — suppress, investigate, or escalate — with a confidence score and a written rationale attached to every action. Auto-response is gated on confidence above a tuned threshold; below it, humans receive the case with full enrichment already attached. Threat-intel context, asset criticality, and related-event timelines are surfaced before the human decides, not after.
For the cases above, the operational difference is structural. A rogue-agent scope-creep is caught by RedEye's action-layer scope provenance before any privileged write. A friendly-fire execution is contained by treating analyst-supplied samples as adversarial until source-attested. A hallucinated identifier is grounded against directory and registry sources before it enters the decision chain.
For the full side-by-side against the legacy SIEM workflow, see RedEye vs Legacy SIEM: Why AI SOC Analysts Win.
What This Means for SOC Teams
For teams deploying AI defense agents, the takeaway isn't "don't deploy." It's map the exposure surface against each of the five failure modes before you trust the system with privileged action.
Walk your agent's action surface. For each capability — approve, write, execute, summarize, classify — ask four questions. What is the input trust boundary, and where does attacker-controlled text reach the model? What is the output verification layer, and is every dependency, hostname, or identifier grounded against a verifiable source before action? Is there a human-on-the-loop boundary below which automatic action is gated? And is contradictory output across surfaces — chat, code, tickets, runtime — surfaced as a signal rather than absorbed silently?
If any capability fails one of these tests, that capability is a candidate for one of the failure modes above. Distinguishing advisory output from actionable output is the structural safeguard. Building review loops that catch contradictory instructions across surfaces is the operational safeguard.
The teams that get AI defense right aren't the ones that ship the most aggressive automation. They're the ones that ship the most verifiable one.
Stay current on AI security
Alert triage research, SOC automation patterns, and AI security guides. No spam — unsubscribe anytime.
Cross-Links and Further Reading
For the deep dive on indirect prompt injection as a broader attack class, see our article on prompt injection attacks against SOC tooling. Failure Mode 5 (HalluSquatting) is downstream of the same instruction-channel vulnerability, and the two are increasingly combined in observed attacks.
For the case for replacing the legacy SIEM with an AI SOC analyst layer — including side-by-side metrics on response time, suppression precision, and analyst burden — see RedEye vs Legacy SIEM: Why AI SOC Analysts Win. For the broader alert-fatigue problem AI triage is designed to solve, see our Alert Fatigue resource page. And for the skills SOC teams of the AI era will need, the CAISF course covers Module 3 (LLM & Gen AI security) and Module 5 (AI governance & risk) in depth.
Map your AI defense agent against these five failure modes →