[论文解读] Prompt Injection attack against LLM-integrated Applications
论文分析现实世界 LLM 集成应用中的提示注入风险,提出 HouYi,一个黑盒攻击框架,并在 36 个服务中验证,成功率为 86.1%,突出提示窃取和滥用 LLM 计算的潜在可能性。
Large Language Models (LLMs), renowned for their superior proficiency in language comprehension and generation, stimulate a vibrant ecosystem of applications around them. However, their extensive assimilation into various services introduces significant security risks. This study deconstructs the complexities and implications of prompt injection attacks on actual LLM-integrated applications. Initially, we conduct an exploratory analysis on ten commercial applications, highlighting the constraints of current attack strategies in practice. Prompted by these limitations, we subsequently formulate HouYi, a novel black-box prompt injection attack technique, which draws inspiration from traditional web injection attacks. HouYi is compartmentalized into three crucial elements: a seamlessly-incorporated pre-constructed prompt, an injection prompt inducing context partition, and a malicious payload designed to fulfill the attack objectives. Leveraging HouYi, we unveil previously unknown and severe attack outcomes, such as unrestricted arbitrary LLM usage and uncomplicated application prompt theft. We deploy HouYi on 36 actual LLM-integrated applications and discern 31 applications susceptible to prompt injection. 10 vendors have validated our discoveries, including Notion, which has the potential to impact millions of users. Our investigation illuminates both the possible risks of prompt injection attacks and the possible tactics for mitigation.
研究动机与目标
- 了解现有提示注入技术在现实世界 LLM 集成应用中的实际约束。
- 开发受 SQL 注入和 XSS 攻击启发的黑盒提示注入方法学(HouYi)。
- 展示攻击的可行性并量化在真实服务上的风险,包括潜在的经济影响。
- 为防御提供见解,推动对 LLM 集成应用的鲁棒设计。
提出的方法
- 对十个现实世界的 LLM 集成应用进行调查和试点研究,以评估现有提示注入技术的基线有效性。
- 开发 HouYi,包含三组件载荷(Framework Component、Separator Component、Disruptor Component),在模仿合法提示的同时注入恶意提示。
- 使用三阶段的 HouYi 工作流:Context Inference、Payload Generation 和 Feedback 以进行迭代改进。
- 在 36 个 LLM 集成应用上评估 HouYi,以衡量成功率并分析失败案例。
- 比较开源项目的防御并评估其在对抗 HouYi 生成的载荷时的局限性。
实验结果
研究问题
- RQ1RQ1:在现实世界的 LLM 集成应用中,现有提示注入攻击的模式和局限性是什么?
- RQ2RQ2:当对系统施加黑盒提示注入技术时,当前系统的可利用性有多高?
- RQ3RQ3:所提出的 HouYi 框架在不同应用类别中的有效性如何?
- RQ4RQ4:哪些防御或设计原则可以在 LLM 集成服务中减轻提示注入风险?
主要发现
- 现有提示注入方法在对 10 个商业应用的试点中因提示用法和防御性格式化差异而表现出有限成功。
- HouYi 在对 36 个经过测试的 LLM 集成应用中实现 86.1% 的成功率,包含潜在的提示窃取和未授权使用 LLM 计算。
- 攻击可以使 LLM 将恶意载荷视为问题并利用上下文分离;然而,使用格式化规则或多步流程的防御措施可限制效果。
- 包括 Notion 在内的厂商确认了这些发现,表明可能影响数百万用户并可能造成数百万美元的经济损失。
- 来自开源项目的防御在缓解某些攻击方面有所帮助,但对 HouYi 生成的载荷仍然脆弱;研究强调需要更强大、更健壮的防御。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。