arXiv:2505.15738cs.CRcs.AI2025-05被引 2

提出新攻击方法,突破当前主流提示注入防御

Checkpoint-GCG: Auditing and Attacking Fine-Tuning-Based Prompt Injection Defenses

  • 利用微调过程中的中间检查点,逐步增强攻击强度
  • 对最强防御实现最高96%的攻击成功率,通用后缀达89.9%
  • 可跨模型迁移,在黑盒场景仍保持63.9%有效攻击率

大型语言模型在聊天机器人到智能体系统等真实应用中日益普及,需处理不可信数据并遵循可信指令。若无法区分两者,易受提示注入攻击,恶意指令可操控模型输出。已有模型级防御通过微调使模型忽略不可信数据中的注入指令。本文提出白盒攻击方法Checkpoint-GCG,通过利用微调过程中的中间模型检查点初始化贪心坐标梯度(GCG)攻击,每个检查点作为下一阶段的跳板持续提升攻击效果。首先,在已知输入且可访问中间检查点的审计场景下,验证了最先进防御的脆弱性,实现高达96%的攻击成功率(ASR)。其次,放宽输入已知假设,搜索通用后缀以应对未见输入,仍达到89.9%的ASR。最后,进一步放宽假设,寻找可迁移至类似黑盒模型和防御的通用后缀,对Meta新发布的受保护模型实现63.9%的攻击成功率。

原文摘要 · Abstract (English)

Large language models (LLMs) are increasingly deployed in real-world applications ranging from chatbots to agentic systems, where they are expected to process untrusted data and follow trusted instructions. Failure to distinguish between the two poses significant security risks, exploited by prompt injection attacks, which inject malicious instructions into the data to control model outputs. Model-level defenses have been proposed to mitigate prompt injection attacks. These defenses fine-tune LLMs to ignore injected instructions in untrusted data. We introduce Checkpoint-GCG, a white-box attack against fine-tuning-based defenses. Checkpoint-GCG enhances the Greedy Coordinate Gradient (GCG) attack by leveraging intermediate model checkpoints produced during fine-tuning to initialize GCG, with each checkpoint acting as a stepping stone for the next one to continuously improve attacks. First, we instantiate Checkpoint-GCG to evaluate the robustness of the state-of-the-art defenses in an auditing setup, assuming both (a) full knowledge of the model input and (b) access to intermediate model checkpoints. We show Checkpoint-GCG to achieve up to $96\%$ attack success rate (ASR) against the strongest defense. Second, we relax the first assumption by searching for a universal suffix that would work on unseen inputs, and obtain up to $89.9\%$ ASR against the strongest defense. Finally, we relax both assumptions by searching for a universal suffix that would transfer to similar black-box models and defenses, achieving an ASR of $63.9\%$ against a newly released defended model from Meta.

提示注入模型安全白盒攻击微调防御

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。