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

PromptArmor:简单而有效的提示注入防御方法

PromptArmor: Simple yet Effective Prompt Injection Defenses

UC Berkeley(加州大学伯克利分校);UC Santa Barbara(加州大学圣巴巴拉分校);Duke University(杜克大学);National University of Singapore(新加坡国立大学);King Abdulaziz City for Science and Technology(国王阿卜杜勒阿齐兹城市科学技术学院);University of Washington(华盛顿大学)
Tianneng Shi, Kaijie Zhu, Zhun Wang, Yuqi Jia, Will Cai, Weida Liang, Haonan Wang, Hend Alzahrani, Joshua Lu, Kenji Kawaguchi, Basel Alomair, Xuandong Zhao, Wil… 展开作者

Tianneng Shi, Kaijie Zhu, Zhun Wang, Yuqi Jia, Will Cai, Weida Liang, Haonan Wang, Hend Alzahrani, Joshua Lu, Kenji Kawaguchi, Basel Alomair, Xuandong Zhao, William Yang Wang, Neil Gong, Wenbo Guo, Dawn Song

AI总结:

本文提出 PromptArmor,通过让现成大语言模型在智能体处理输入前检测并移除注入提示,在 AgentDojo 基准上实现假阳性率、假阴性率及攻击成功率均低于 1%,并建议将其作为提示注入防御评估的标准基线。

摘要:

尽管大语言模型智能体具有巨大潜力,近期研究表明它们容易受到提示注入攻击,即恶意提示被注入智能体的输入中,使其执行攻击者指定的任务,而非用户提供的预期任务。本文提出了 PromptArmor,一种简单而有效的提示注入攻击防御方法。具体而言,PromptArmor 提示一个现成的大语言模型在智能体处理输入之前检测并移除其中潜在的注入提示。实验结果表明,PromptArmor 能够准确识别并移除注入提示。例如,使用 GPT-4o、GPT-4.1 或 o4-mini 时,PromptArmor 在 AgentDojo 基准测试上的假阳性率和假阴性率均低于 1%。此外,在使用 PromptArmor 移除注入提示后,攻击成功率降至 1% 以下。我们还展示了 PromptArmor 对自适应攻击的有效性,并探索了提示大语言模型的不同策略。我们建议将 PromptArmor 作为评估针对提示注入攻击的新型防御方法的标准基线。

英文摘要:

Despite their potential, recent research has demonstrated that LLM agents are vulnerable to prompt injection attacks, where malicious prompts are injected into the agent's input, causing it to perform an attacker-specified task rather than the intended task provided by the user. In this paper, we present PromptArmor, a simple yet effective defense against prompt injection attacks. Specifically, PromptArmor prompts an off-the-shelf LLM to detect and remove potential injected prompts from the input before the agent processes it. Our results show that PromptArmor can accurately identify and remove injected prompts. For example, using GPT-4o, GPT-4.1, or o4-mini, PromptArmor achieves both a false positive rate and a false negative rate below 1% on the AgentDojo benchmark. Moreover, after removing injected prompts with PromptArmor, the attack success rate drops to below 1%. We also demonstrate PromptArmor's effectiveness against adaptive attacks and explore different strategies for prompting an LLM. We recommend that PromptArmor be adopted as a standard baseline for evaluating new defenses against prompt injection attacks.

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

↑