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

对大型语言模型中提示注入防御措施的评估

Evaluation of Prompt Injection Defenses in Large Language Models

Swept AI;University of Michigan(密歇根大学)

Priyal Deep, Shane Emmons, Amy Fox, Kyle Bacon, Kelley McAllister, Peter Ortiz, Krisztian Flautner

AI总结:

研究通过构建自适应攻击者测试了九种防御配置,发现依赖模型自我保护的防御均失效,而输出过滤通过硬编码规则在应用代码中检查响应,实现了零泄露。

摘要:

LLM驱动的应用程序通常在系统提示中嵌入秘密,但模型可能被欺骗泄露这些信息。我们构建了一个自适应攻击者,在数百轮次中演变其策略,并测试了九种防御配置在超过20,000次攻击中的表现。每种依赖模型自我保护的防御最终均失效。唯一有效的防御是输出过滤,它通过应用代码中的硬编码规则检查模型响应,从而在15,000次攻击中实现零泄露。这些结果表明,安全边界必须在应用代码中强制执行,而不是由被攻击的模型来执行。直到此类防御通过如Swept AI等工具得到验证,处理敏感操作的AI系统应仅限于内部可信人员使用。

英文摘要:

LLM-powered applications routinely embed secrets in system prompts, yet models can be tricked into revealing them. We built an adaptive attacker that evolves its strategies over hundreds of rounds and tested it against nine defense configurations across more than 20,000 attacks. Every defense that relied on the model to protect itself eventually broke. The only defense that held was output filtering, which checks the model's responses via hardcoded rules in separate application code before they reach the user, achieving zero leaks across 15,000 attacks. These results demonstrate that security boundaries must be enforced in application code, not by the model being attacked. Until such defenses are verified by tools like Swept AI, AI systems handling sensitive operations should be restricted to internal, trusted personnel.

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

↑