arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.00750cs.CRcs.AI
收藏

通过规避性注入绕过提示注入检测器

Bypassing Prompt Injection Detectors through Evasive Injections

Centre for Secure Information Technologies(安全信息技术中心);Queen's University Belfast(贝尔法斯特女王大学)

Md Jahedur Rahman, Ihsen Alouani

AI总结:

本文提出了一种多探针规避攻击,通过优化后缀同时欺骗所有层间漂移检测器,实验显示其在Phi-3和Llama-3上成功绕过检测器的高成功率,提出基于对抗后缀增强的防御方法。

摘要:

大型语言模型(LLMs)在交互和检索增强系统中被越来越多地使用,但它们仍易受提示注入攻击的影响,其中注入的二次提示迫使模型偏离用户指令执行潜在恶意任务。最近的研究表明,通过训练在LLM隐藏层激活偏移上的ML模型可以检测此类漂移。本文证明这些检测器对适应性对手不够稳健。我们提出了一种多探针规避攻击,通过在受污染输入后附加对抗性优化的后缀,共同优化一个通用后缀,以同时欺骗所有层间漂移检测器并保持底层注入的有效性。使用改进的贪心坐标梯度(GCG)方法,我们生成了使提示注入在多个探针上保持规避的通用后缀。在Phi-3 3.8B和Llama-3 8B上,单个后缀在成功绕过所有检测器的同时实现了93.91%和99.63%的成功率。这些结果表明,基于激活的任务漂移检测器对适应性提示注入攻击高度脆弱,促使更强的防御措施。我们还提出了一种基于对抗后缀增强的防御方法:我们生成多个后缀,在前向传递中随机附加一个,并在生成的激活上训练检测器。这种方法被发现对规避攻击有效。

英文摘要:

Large language models (LLMs) are increasingly used in interactive and retrieval-augmented systems, but they remain vulnerable to prompt injection attacks, where injected secondary prompts force the model to deviate from the user's instructions to execute a potentially malicious task defined by the adversary. Recent work shows that ML models trained on activation shifts from LLMs' hidden layers can detect such drift. In this paper, we demonstrate that these detectors are not robust to adaptive adversaries. We propose a multi-probe evasion attack that appends an adversarially optimised suffix to poisoned inputs, jointly optimising a universal suffix to simultaneously fool all layer-wise drift detectors while preserving the effectiveness of the underlying injection. Using a modified Greedy Coordinate Gradient (GCG) approach, we generate universal suffixes that make prompt injections consistently evasive across multiple probes simultaneously. On Phi-3 3.8B and Llama-3 8B, a single suffix achieves attack success rates of 93.91% and 99.63% in successfully evading all detectors simultaneously. These results show that activation-based task drift detectors are highly vulnerable to adaptive prompt injection attacks, motivating stronger defences against such threats. We also propose a defence based on adversarial suffix augmentation: we generate multiple suffixes, append one at random during forward passes, and train detectors on the resulting activations. This approach is found to be effective against evasive attacks.

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

↑