arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.05174cs.CRcs.AI
收藏

MELON:针对 AI 智能体中间接提示注入攻击的可证明防御

MELON: Provable Defense Against Indirect Prompt Injection Attacks in AI Agents

University of California, Santa Barbara(加州大学圣巴巴拉分校)

Kaijie Zhu, Xianjun Yang, Jindong Wang, Wenbo Guo, William Yang Wang

AI总结:

本文提出 MELON,通过掩码用户提示后重放并比较智能体操作来检测 IPI 攻击,在 AgentDojo 上实现优于现有方法的安全性与效用保持。

摘要:

近期研究表明,LLM 智能体容易受到间接提示注入(IPI)攻击;在这种攻击中,嵌入工具检索信息中的恶意任务会诱导智能体执行未经授权的操作。现有 IPI 防御存在显著局限:要么需要大量模型训练资源,要么对复杂攻击缺乏有效性,或损害正常效用。我们提出 MELON(Masked re-Execution and TooL comparisON,掩码重执行与工具比较),一种新型 IPI 防御方法。该方法基于如下观察:在攻击成功时,智能体的下一步操作对用户任务的依赖会降低,而更多依赖恶意任务。据此,我们设计 MELON,通过使用经掩码函数修改的用户提示重新执行智能体轨迹来检测攻击;如果原始执行与掩码执行生成的操作相似,则判定为攻击。我们还加入三项关键设计,以减少潜在的误报和漏报。在 IPI 基准 AgentDojo 上的广泛评估表明,MELON 在攻击阻止和效用保持方面均优于 SOTA 防御。此外,我们证明将 MELON 与 SOTA 提示增强防御结合(记为 MELON-Aug)可进一步提升性能。我们还进行了详细消融研究以验证关键设计。代码位于 https://github.com/kaijiezhu11/MELON。

英文摘要:

Recent research has explored that LLM agents are vulnerable to indirect prompt injection (IPI) attacks, where malicious tasks embedded in tool-retrieved information can redirect the agent to take unauthorized actions. Existing defenses against IPI have significant limitations: either require essential model training resources, lack effectiveness against sophisticated attacks, or harm the normal utilities. We present MELON (Masked re-Execution and TooL comparisON), a novel IPI defense. Our approach builds on the observation that under a successful attack, the agent's next action becomes less dependent on user tasks and more on malicious tasks. Following this, we design MELON to detect attacks by re-executing the agent's trajectory with a masked user prompt modified through a masking function. We identify an attack if the actions generated in the original and masked executions are similar. We also include three key designs to reduce the potential false positives and false negatives. Extensive evaluation on the IPI benchmark AgentDojo demonstrates that MELON outperforms SOTA defenses in both attack prevention and utility preservation. Moreover, we show that combining MELON with a SOTA prompt augmentation defense (denoted as MELON-Aug) further improves its performance. We also conduct a detailed ablation study to validate our key designs. Code is available at https://github.com/kaijiezhu11/MELON.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑