用诱饵陷阱实时检测工具型大模型的隐蔽攻击,无需人工标注。
AgentShield: Deception-based Compromise Detection for Tool-using LLM Agents
- 在工具接口埋设假工具、假凭证等诱饵,触发即代表被攻陷。
- 在4个模型上捕获90.7%~100%的越狱攻击,且零误报。
- 支持多语言跨模型迁移,适合需高安全性的部署场景。
针对工具型大模型的间接提示注入(IPI)防御存在两大缺陷:一是重在防范而非检测已渗透的攻击,二是仅在英语环境中验证,低资源语言如库尔德语、阿拉伯语用户缺乏有效防护。本文提出AgentShield,一种基于诱饵的检测框架,在代理工具接口内设置三重陷阱:假工具、假凭证和白名单参数。相同触发信号作为自监督分类器的高精度标签。遵循攻击者隐藏指令的大模型几乎必然触发陷阱,从而实现实时入侵信号与无须人工标注的零误报训练数据。在176个跨语言攻击提示与三个提供商的4个大模型上测试,因现代大模型已自行抵御大部分攻击(成功率≤10%),AgentShield聚焦于漏过的攻击。商用模型上捕获90.7%至100%的成功攻击,在485次正常使用测试中零误报。系统性对抗攻击测试中商用模型零逃逸,且自监督分类器可跨模型、跨语言迁移无需重训。
原文摘要 · Abstract (English)
Defenses against indirect prompt injection (IPI) in tool-using LLM agents share two structural weaknesses. First, they all attempt to prevent attacks rather than detect the compromises that slip through. Second, they have only been evaluated in English, leaving users of low-resource languages such as Kurdish and Arabic without tested protection. This paper addresses both gaps with AgentShield, a deception-based detection framework that places three layers of traps inside the agent's tool interface: fake tools, fake credentials, and allowlisted parameters. The same trap triggers serve as high-precision labels for a self-supervised classifier. An LLM agent that follows an attacker's hidden instruction almost always touches one of these traps, which gives both a real-time compromise signal and a zero-FP label for training a downstream detector without manual annotation. Across 176 cross-lingual attack prompts and four LLMs from three providers, and because modern LLMs already refuse most IPI attempts on their own (attack success rate <= 10%), AgentShield's job is to catch the attacks that do slip through. On commercial models, it catches 90.7%-100% of such successful attacks, with zero false alarms on 485 normal-use tests. It survives a systematic adaptive-attack evaluation with zero evasion on commercial models, and the self-supervised classifier transfers across models and languages without retraining.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。