Skip to main content
QUICK REVIEW

[论文解读] Assessing Prompt Injection Risks in 200+ Custom GPTs

Jiahao Yu, Yuhang Wu|arXiv (Cornell University)|Nov 20, 2023
Adversarial Robustness in Machine Learning被引用 4
一句话总结

本研究调查了在 OpenAI 平台上的 200 多个用户创建的自定义 GPT 模型中提示注入漏洞,表明攻击性提示可高成功率地提取系统提示和上传的文件。研究发现,当前的防御措施,包括防御性提示和代码解释器禁用,对复杂攻击仍显不足,凸显了在可自定义的大语言模型中亟需更强大的安全框架。

ABSTRACT

In the rapidly evolving landscape of artificial intelligence, ChatGPT has been widely used in various applications. The new feature - customization of ChatGPT models by users to cater to specific needs has opened new frontiers in AI utility. However, this study reveals a significant security vulnerability inherent in these user-customized GPTs: prompt injection attacks. Through comprehensive testing of over 200 user-designed GPT models via adversarial prompts, we demonstrate that these systems are susceptible to prompt injections. Through prompt injection, an adversary can not only extract the customized system prompts but also access the uploaded files. This paper provides a first-hand analysis of the prompt injection, alongside the evaluation of the possible mitigation of such attacks. Our findings underscore the urgent need for robust security frameworks in the design and deployment of customizable GPT models. The intent of this paper is to raise awareness and prompt action in the AI community, ensuring that the benefits of GPT customization do not come at the cost of compromised security and privacy.

研究动机与目标

  • 调查在 OpenAI 平台部署的用户自定义 GPT 模型中提示注入的安全风险。
  • 评估通过攻击性提示在真实世界自定义 GPT 中提取系统提示和上传文件的可行性。
  • 评估现有防御机制(如防御性提示和代码解释器禁用)在应对复杂红队攻击时的有效性。
  • 在人工智能社区中提高对通过提示注入导致数据泄露和知识产权盗窃风险的认识。
  • 推动开发超越当前启发式防御的稳健、长期的可自定义人工智能模型安全解决方案。

提出的方法

  • 研究人员设计并部署了一系列攻击性提示,以测试 OpenAI GPT 商店中超过 200 个自定义 GPT 模型。
  • 采用两阶段红队测试方法:首先扫描文件名和代码解释器的存在情况,然后发起针对性的提示注入攻击。
  • 通过四位专家攻击者使用不同提示策略进行红队评估,以测试系统提示提取和文件泄露情况。
  • 研究评估了禁用代码解释器对攻击成功率的影响,对比了启用和禁用该功能的 GPT 模型的结果。
  • 研究人员在发表前通知 OpenAI,并在实验后删除了所有提取的数据,实施了负责任的披露。
  • 完整数据集、攻击提示和红队评估结果已开源,以支持可复现性和进一步研究。
Figure 1: Proposed prompt injection method to extract system prompts and files from custom GPTs.
Figure 1: Proposed prompt injection method to extract system prompts and files from custom GPTs.

实验结果

研究问题

  • RQ1攻击性提示在多大程度上能够从用户自定义的 GPT 模型中提取系统提示?
  • RQ2攻击者是否能通过提示注入可靠地检索上传的文件,包括其名称和大小?
  • RQ3防御性提示在减轻自定义 GPT 中系统提示提取和文件泄露方面的有效性如何?
  • RQ4禁用代码解释器是否能显著降低提示注入攻击的成功率?
  • RQ5复杂攻击性提示是否能在真实世界攻击场景中绕过最先进的防御机制?

主要发现

  • 共测试了 200 多个自定义 GPT 模型,其中绝大多数均可通过攻击性提示成功提取系统提示。
  • 代码解释器的存在显著提高了攻击成功率,并减少了提示注入攻击所需的尝试次数。
  • 即使使用了防御性提示,经验丰富的攻击者仍可绕过,表明此类防御对有决心的对手仍显不足。
  • 禁用代码解释器虽提升了安全性,但并未消除风险,因为四位专家中有三位在 10 次尝试内仍成功提取了系统提示。
  • 研究证实,上传的文件(包括其名称和大小)可通过提示注入系统性地被发现并外泄。
  • 研究人员成功从 DALL·E GPT 中提取了系统提示和文件元数据,证明了这些漏洞在真实世界模型中的可利用性。
Figure 2: Privacy issues with OpenAI interfaces. In the left figure, we could exploit the information of filenames. In the right figure, we could know how the user designed the plugin prototype for the custom GPT.
Figure 2: Privacy issues with OpenAI interfaces. In the left figure, we could exploit the information of filenames. In the right figure, we could know how the user designed the plugin prototype for the custom GPT.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。