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

通过投毒对齐增强针对 LLM 的提示注入攻击

Enhancing Prompt Injection Attacks to LLMs via Poisoning Alignment

Georgia Institute of Technology(佐治亚理工学院);Duke University(杜克大学);Carnegie Mellon University(卡内基梅隆大学)

Zedian Shao, Hongbin Liu, Jaden Mu, Neil Zhenqiang Gong

AI总结:

本文提出 PoisonedAlign 方法,通过投毒 LLM 的对齐数据集来放大未来提示注入攻击的成功率,且在保持模型标准能力基准性能不变的情况下难以被检测。

摘要:

提示注入攻击,即攻击者将一个提示注入到原始提示中,旨在使大型语言模型(LLM)遵循注入的提示以执行攻击者选定的任务,构成了一种严重的安全威胁。现有的攻击主要集中在推理时精心构造这些注入,将 LLM 本身视为静态目标。我们的实验表明,这些攻击取得了一定成功,但仍有很大的改进空间。在这项工作中,我们引入了一种更基础的攻击向量:投毒 LLM 的对齐过程,以放大未来提示注入攻击的成功率。具体而言,我们提出了 PoisonedAlign,这是一种策略性地创建投毒对齐样本以投毒 LLM 对齐数据集的方法。我们在五个 LLM 和两个对齐数据集上的实验表明,当即使一小部分对齐数据被投毒时,生成的模型也会变得极易受到各种提示注入攻击的影响。关键在于,这种脆弱性是在 LLM 在标准能力基准上的性能基本保持不变的情况下植入的,使得这种操纵难以通过自动化的通用性能评估来检测。实现该攻击的代码可在 https://github.com/Sadcardation/PoisonedAlign 获取。

英文摘要:

Prompt injection attack, where an attacker injects a prompt into the original one, aiming to make an Large Language Model (LLM) follow the injected prompt to perform an attacker-chosen task, represent a critical security threat. Existing attacks primarily focus on crafting these injections at inference time, treating the LLM itself as a static target. Our experiments show that these attacks achieve some success, but there is still significant room for improvement. In this work, we introduces a more foundational attack vector: poisoning the LLM's alignment process to amplify the success of future prompt injection attacks. Specifically, we propose PoisonedAlign, a method that strategically creates poisoned alignment samples to poison an LLM's alignment dataset. Our experiments across five LLMs and two alignment datasets show that when even a small fraction of the alignment data is poisoned, the resulting model becomes substantially more vulnerable to a wide range of prompt injection attacks. Crucially, this vulnerability is instilled while the LLM's performance on standard capability benchmarks remains largely unchanged, making the manipulation difficult to detect through automated, general-purpose performance evaluations. The code for implementing the attack is available at https://github.com/Sadcardation/PoisonedAlign.

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

↑