arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.11513cs.CRcs.AIcs.LG
收藏

Maatphor:针对提示注入攻击的自动化变体分析

Maatphor: Automated Variant Analysis for Prompt Injection Attacks

Azure Research(Azure研究院);Microsoft Security Response Center(微软安全响应中心)

Ahmed Salem, Andrew Paverd, Boris Köpf

AI总结:

针对大语言模型提示注入攻击易生成变体规避防护的问题,提出自动化变体分析工具Maatphor,可自动生成提示变体并判断有效性,还能补充攻击数据集,实验显示其从0%有效率的种子提示出发,40次迭代内即可生成至少60%有效率的变体。

摘要:

提示注入已成为大语言模型(LLM)面临的严重安全威胁。目前,防御新发现的提示注入技术的最佳实践是为系统添加额外防护栏(例如更新系统提示,或对模型的输入和/或输出使用分类器)。然而,正如恶意软件会生成变体以规避杀毒软件一样,提示注入也可以生成变体来规避LLM的防护栏。理想情况下,当发现一种新的提示注入技术时,候选防御方案不仅要针对已成功的提示注入进行测试,还要针对可能的变体进行测试。\n在本研究中,我们提出了Maatphor,一款协助防御者对已知提示注入攻击开展自动化变体分析的工具。这需要解决两大核心挑战:(1)自动生成给定提示的变体;(2)仅基于模型输出自动判断某个变体是否有效。该工具还可协助生成越狱(jailbreak)和提示注入攻击的数据集,从而解决该领域数据稀缺的问题。\n我们在三类不同的提示注入任务上对Maatphor进行了评估。从有效率为0%的无效种子提示出发,Maatphor能稳定生成在前40次迭代内有效率至少达到60%的变体。

英文摘要:

Prompt injection has emerged as a serious security threat to large language models (LLMs). At present, the current best-practice for defending against newly-discovered prompt injection techniques is to add additional guardrails to the system (e.g., by updating the system prompt or using classifiers on the input and/or output of the model.) However, in the same way that variants of a piece of malware are created to evade anti-virus software, variants of a prompt injection can be created to evade the LLM's guardrails. Ideally, when a new prompt injection technique is discovered, candidate defenses should be tested not only against the successful prompt injection, but also against possible variants. In this work, we present, a tool to assist defenders in performing automated variant analysis of known prompt injection attacks. This involves solving two main challenges: (1) automatically generating variants of a given prompt according, and (2) automatically determining whether a variant was effective based only on the output of the model. This tool can also assist in generating datasets for jailbreak and prompt injection attacks, thus overcoming the scarcity of data in this domain. We evaluate Maatphor on three different types of prompt injection tasks. Starting from an ineffective (0%) seed prompt, Maatphor consistently generates variants that are at least 60% effective within the first 40 iterations.

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

↑