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

通过供应链模型代码后门进行本地LLM微调中的秘密窃取攻击

Secret Stealing Attacks on Local LLM Fine-Tuning through Supply-Chain Model Code Backdoors

Nanjing University(南京大学)

Zi Li, Tian Zhou, Wenze Li, Jingyu Hua, Yunlong Mao, Sheng Zhong

AI总结:

研究揭示本地微调数据中敏感信息泄露风险,提出通过供应链代码后门实现主动执行劫持,引入确定性全链记忆机制,实现高精度秘密窃取,实验表明方法在不干扰主要任务的前提下达到98%以上的ASR。

摘要:

本地微调数据通常包含敏感信息如API密钥、个人身份和财务记录。尽管'本地离线微调'常被视为隐私边界,但我们发现被篡改的模型代码足以窃取这些信息。当前被动的预训练权重污染攻击在自然语言上有效,但因依赖概率语义前缀无法捕捉稀疏高熵目标。为弥合这一差距,我们识别并利用了一个被忽视的供应链向量——伪装成标准架构定义的模型代码——实现从被动权重污染到主动执行劫持的范式转变。我们引入了一种确定性的全链记忆机制:通过在线张量规则匹配锁定动态计算流中的令牌级秘密,并利用值梯度解耦 stealthily 注入攻击梯度,克服梯度淹没以迫使模型记忆。此外,我们首次实现了通过黑盒查询进行可验证的秘密窃取,精确区分真实泄露与幻觉。实验表明,我们的方法在不损害主要任务的情况下实现了超过98%的严格ASR,并能有效绕过DP-SGD、语义审核和代码审核等防御措施。

英文摘要:

Local fine-tuning datasets routinely contain sensitive secrets such as API keys, personal identifiers, and financial records. Although "local offline fine-tuning" is often viewed as a privacy boundary, we reveal that compromised model code is sufficient to steal them. Current passive pretrained-weight poisoning attacks, while effective for natural language, fundamentally fail to capture such sparse high-entropy targets due to their reliance on probabilistic semantic prefixes. To bridge this gap, we identify and exploit a practical but overlooked supply-chain vector -- malicious model code camouflaged as standard architectural definitions to realize a paradigm shift from passive weight poisoning to active execution hijacking. We introduce a deterministic full-chain memorization mechanism: it locks onto token-level secrets in dynamic computation flows via online tensor-rule matching, and leverages value-gradient decoupling to stealthily inject attack gradients, overcoming gradient drowning to force model memorization. Furthermore, we achieve, for the first time, attacker-verifiable secret stealing through black-box queries that precisely distinguishes true leakage from hallucination. Our attack achieves over 98% Strict ASR in the default LoRA setting with limited primary-task utility degradation and effectively evades defense measures including semantic safety filtering, code auditing, and perplexity-based detection.

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

↑