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

ShadowLogic:任意白盒LLM中的后门

ShadowLogic: Backdoors in Any Whitebox LLM

Kasimir Schulz, Amelia Kawasaki, Leo Ring

AI总结:

本研究提出ShadowLogic方法,通过向白盒LLM计算图注入解除审查向量植入隐蔽后门,利用触发短语绕过安全防护,在Phi-3和Llama 3.2上实现超60%攻击成功率。

摘要:

大型语言模型(LLMs)被广泛部署于各种应用中,通常带有防止生成有害或受限内容的安全防护措施。然而,通过对模型的计算图进行对抗性修改,这些防护措施可以被隐蔽地绕过。本研究揭示了基于计算图的LLM格式中存在的严重安全漏洞,表明广泛使用的部署流程可能容易受到隐蔽后门的攻击。我们提出了ShadowLogic,这是一种通过向白盒LLM的计算图表示中注入“解除审查向量”来创建后门的方法。我们设定了一个触发短语,当其添加到输入LLM的提示词开头时,会应用解除审查向量并移除模型中的内容生成防护措施。我们将触发逻辑直接嵌入到计算图中,以检测提示词中的触发短语。为了逃避对后门的检测,我们在图结构中对该逻辑进行混淆,使其类似于标准的模型函数。该方法只需对模型参数进行极少的修改,使得植入后门的模型看起来是良性的,同时在被激活时仍能生成未经审查的响应。我们使用ONNX操作计算图,在Phi-3和Llama 3.2中成功实现了ShadowLogic。植入解除审查向量后,对后续恶意查询的攻击成功率达到了60%以上。

英文摘要:

Large language models (LLMs) are widely deployed across various applications, often with safeguards to prevent the generation of harmful or restricted content. However, these safeguards can be covertly bypassed through adversarial modifications to the computational graph of a model. This work highlights a critical security vulnerability in computational graph-based LLM formats, demonstrating that widely used deployment pipelines may be susceptible to obscured backdoors. We introduce ShadowLogic, a method for creating a backdoor in a white-box LLM by injecting an uncensoring vector into its computational graph representation. We set a trigger phrase that, when added to the beginning of a prompt into the LLM, applies the uncensoring vector and removes the content generation safeguards in the model. We embed trigger logic directly into the computational graph which detects the trigger phrase in a prompt. To evade detection of our backdoor, we obfuscate this logic within the graph structure, making it similar to standard model functions. Our method requires minimal alterations to model parameters, making backdoored models appear benign while retaining the ability to generate uncensored responses when activated. We successfully implement ShadowLogic in Phi-3 and Llama 3.2, using ONNX for manipulating computational graphs. Implanting the uncensoring vector achieved a >60% attack success rate for further malicious queries.

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

↑