Prompt Injection Detection for Email Agents Through Attack Chain Modeling
作者: Ahmad Hashmi, Dhyey Patel, Yunting Yin
分类: cs.CR, cs.CL
发布日期: 2026-09-25
备注: Accepted to IEEE ICTAI 2026
💡 一句话要点
提出基于攻击链建模的电子邮件代理提示注入检测方法
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 提示注入检测 攻击链建模 电子邮件安全 语言模型 多阶段分析 用户意图一致性 机器学习
📋 核心要点
- 现有的提示注入检测方法主要将问题简化为二元分类,忽视了攻击过程的多阶段特性。
- 本文提出的框架通过建模攻击链,结合多种检测和验证机制,提升了检测的准确性和鲁棒性。
- 实验结果显示,本文方法在五个基准测试中实现了平均F1分数0.406,显著优于现有预训练检测器的0.216。
📝 摘要(中文)
大型语言模型的电子邮件助手特别容易受到间接提示注入的攻击,因为不可信的电子邮件内容可能被引入模型上下文,从而影响后续工具的使用。现有的提示注入检测器主要将此问题视为二元恶意文本分类,忽视了有害代理行为通常通过一系列阶段产生的重要因素。本文提出了一种检测框架,通过结合文本检测器、特定阶段的验证器、基于规则的风险信号、用户意图和行为一致性分析以及逻辑决策策略来建模这一攻击链。实验结果表明,随机训练测试分割在分布转移下显著高估了鲁棒性,而框架中后期工具参数阶段的可预测性高于早期阶段。
🔬 方法详解
问题定义:本文旨在解决大型语言模型电子邮件助手中间接提示注入的检测问题。现有方法将其视为简单的二元分类,未能考虑攻击行为的多阶段特性,导致检测效果不佳。
核心思路:本文提出的框架通过建模攻击链,结合文本检测、阶段特定验证、规则风险信号和用户意图分析,提供了一种更全面的检测机制。这种设计能够更好地捕捉到攻击的复杂性和阶段性。
技术框架:整体框架包括多个模块:文本检测器用于初步识别潜在的恶意内容;每个阶段的验证器负责分析特定阶段的行为;规则风险信号提供额外的风险评估;用户意图和行为一致性分析确保用户请求与电子邮件内容的一致性;最后,逻辑决策策略用于综合判断。
关键创新:本文的主要创新在于将攻击链建模引入提示注入检测,强调了多阶段分析的重要性。这与现有方法的单一分类思路形成了鲜明对比,能够更准确地识别复杂的攻击模式。
关键设计:在设计中,本文采用了多种损失函数和参数设置,以平衡检测准确性和假警报率。此外,通过训练包含类似攻击的无害电子邮件,显著降低了误报率,同时保持了对真实攻击的检测能力。
🖼️ 关键图片
📊 实验亮点
实验结果表明,本文提出的框架在五个二元基准测试中实现了平均F1分数0.406,而最强的五个预训练检测器在没有额外训练的情况下仅为0.216。这一显著提升展示了结合攻击阶段预测与用户请求一致性检查的重要性。
🎯 应用场景
该研究的潜在应用领域包括电子邮件安全、智能助手和自动化客服等。通过提高对提示注入攻击的检测能力,可以有效保护用户数据安全,提升电子邮件助手的可靠性和用户信任度。未来,该方法还可以扩展到其他基于语言模型的应用中,增强其安全性。
📄 摘要(原文)
Large language model email assistants are particularly vulnerable to indirect prompt injection because untrusted email content can be retrieved into the model context and influence subsequent tool use. Existing prompt injection detectors mainly formulate this problem as binary malicious text classification, which overlooks the important factor that harmful agent behavior often arises through a sequence of stages. We propose a detection framework that models this attack chain by combining a text detector, verifiers specific to each stage, explicit rule-based risk signals, user intent and action consistency analysis, and a logistic decision policy. To support this framework, we derive attack chain labels from prompt injection datasets, evaluate the proposed framework under random splits, temporal phase transfer, conditional stage transfer, cross-dataset transfer, and conduct ablation studies on multiple benchmarks. Results show that random train test splits substantially overestimate robustness under distribution shift, while later tool argument stages are more predictable than earlier stages in the framework. We also show that training on harmless emails that resemble attacks helps reduce false alarms while preserving the ability to detect real attacks. Across five binary benchmarks, our framework achieves a mean F1 score of 0.406 under the strict threshold setting policy, compared with 0.216 for the strongest of five pretrained detectors evaluated without additional training. These results highlight the value of combining attack stage predictions with checks for conflicts between the user's request and instructions in retrieved emails. Our experiments also demonstrate the importance of training with challenging benign examples to balance attack detection and false alarms.