Detectors struggle to spot rare attacks and unseen tools in hijacked AI agents
What Standard Evaluations Hide About Detectors of Hijacked LLM Agents: Rare Attacks, Unseen Tools and Benchmark Transfer
Cryptography and SecurityMachine Learning
Summary
Detecting when AI assistants have been hijacked can rely on spotting unusual patterns in the tools they use. The authors found that standard tests give detectors an easier job by including many attacks and familiar tools, which hides real-world challenges. When attacks are rare or tools are new, detectors often fail or make many false alarms. The authors show that detectors trained on one dataset do poorly on another and propose guidelines for better testing.
What this means in practice
- •For security teams in ai companies: Develop and test better hijack detection systems by including rare attacks and new tools in evaluation benchmarks to reduce false alarms in deployed AI assistants.
- •For developer teams building ai assistants: Improve monitoring tools to recognize suspicious behavior even when AI assistants use tools not seen during training or face rare attack patterns.
Authors
Mahmoud Abbasi, Juan M. Núñez V., Amin Shahraki
Abstract
Detectors can flag hijacked large language model (LLM) agents from the traces of the tools they call. In the eleven evaluations we audited, attacks or anomalies make up 16% to 86% of the test samples, no evaluation varies that share, and six report no test on data from a second benchmark or source. We ask what such evaluations hide. On the AgentDrift and AgentDojo benchmarks we test trained detectors that read tool identities, behavior, call sequences, step embeddings or text, and a released LLM action monitor, AlignmentCheck, with thresholds fixed on training data or set by the monitor's released decision rule. First, at a 2% attack rate a detector with an area under the receiver operating characteristic curve (AUROC) of 0.879 reaches a precision of 0.076, and the mix of negatives alone moves that precision between 0.039 and 0.117. Second, as tool coverage, the share of test tool calls whose tool was seen in training, falls, detector rankings cross near 50% coverage and reverse below it, because unseen tools map to inputs that training never reached. Dropout on tool inputs largely removes the reversal. Third, no detector trained on AgentDrift ranks AgentDojo traces better than chance (AUROC 0.47 to 0.52), including one that reaches 0.996 within AgentDojo. The monitor, trained on neither, reaches 0.930, but with its open backbone its released decision rule would still mostly raise false alerts at a 2% attack rate (precision 0.096). We turn these findings into a checklist for evaluating trace detectors.