[论文解读] Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection
本文提出 Indirect Prompt Injection (IPI) 作为对基于 LLM 的应用的新型攻击向量,展示检索数据如何注入提示以远程控制模型,在 Bing Chat 和合成系统上进行了演示,并提供威胁分类与示例。
Large Language Models (LLMs) are increasingly being integrated into various applications. The functionalities of recent LLMs can be flexibly modulated via natural language prompts. This renders them susceptible to targeted adversarial prompting, e.g., Prompt Injection (PI) attacks enable attackers to override original instructions and employed controls. So far, it was assumed that the user is directly prompting the LLM. But, what if it is not the user prompting? We argue that LLM-Integrated Applications blur the line between data and instructions. We reveal new attack vectors, using Indirect Prompt Injection, that enable adversaries to remotely (without a direct interface) exploit LLM-integrated applications by strategically injecting prompts into data likely to be retrieved. We derive a comprehensive taxonomy from a computer security perspective to systematically investigate impacts and vulnerabilities, including data theft, worming, information ecosystem contamination, and other novel security risks. We demonstrate our attacks' practical viability against both real-world systems, such as Bing's GPT-4 powered Chat and code-completion engines, and synthetic applications built on GPT-4. We show how processing retrieved prompts can act as arbitrary code execution, manipulate the application's functionality, and control how and if other APIs are called. Despite the increasing integration and reliance on LLMs, effective mitigations of these emerging threats are currently lacking. By raising awareness of these vulnerabilities and providing key insights into their implications, we aim to promote the safe and responsible deployment of these powerful models and the development of robust defenses that protect users and systems from potential attacks.
研究动机与目标
- 动机并将 Indirect Prompt Injection 定义为在 LLM-enabled 系统中的新威胁。
- 制定一个分类法,以系统地分析 IPI 威胁在 LLM-integrated 应用中的表现。
- 演示 IPI 攻击在真实世界和合成系统上的实际可行性,并强调防御需求。
- 将演示和攻击提示发布到公共仓库,以促进进一步的安全研究。
提出的方法
- 引入并形式化 Indirect Prompt Injection (IPI),因为从数据源检索的提示可以充当任意指令。
- 从计算机安全角度构建 IPI 攻击面与威胁类别的分类法。
- 创建具有以下接口的合成 LLM-enabled 应用(Search、View、Retrieve URL、Read/Send Email、Memory)以测试注入。
- 在真实系统(Bing Chat)和基于合成 GPT-4 的应用上评估 IPI 攻击,以展示实际可行性。
- 演示攻击场景,包括信息收集、欺诈、恶意软件、内容操控,以及可用性/中断。
实验结果
研究问题
- RQ1通过检索数据注入的间接提示注入是否可以远程危及 LLM-integrated 应用?
- RQ2IPI 能激活的威胁类别有哪些(如数据盗取、操控、欺诈、恶意软件、DoS),以及它们在真实系统中的表现?
- RQ3真实世界系统(如 Bing Chat)和合成部署对 IPI 有多大易感性,以及需要何种防御?
- RQ4在自动化、检索增强的 LLM 部署中,IPI 对数据隐私、系统完整性和可用性的影响。
主要发现
- IPI 能通过检索的提示引导 LLM 行为,在 RAG 风格的设置中,数据和指令变得不可分离。
- 直接接口中过滤的提示在通过检索数据间接注入时仍可能有效。
- 注入的提示可以在对话中持续存在,并可能实现远程控制或持久性。
- 演示显示 IPI 相对于 Bing Chat 和合成系统的可行性,突出数据外泄、欺诈和恶意软件传播等风险。
- 研究强调缺乏强有力的缓解措施,以及对检索增强型 LLM 的更安全部署做法的需求。
- 作者提供了带有演示和攻击提示的 GitHub 仓库,以支持持续的研究。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。