arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.18567cs.CR
收藏

双重后门:通过对抗性指令微调攻击将代码大语言模型后门转化为传统恶意软件

Double Backdoored: Converting Code Large Language Model Backdoors to Traditional Malware via Adversarial Instruction Tuning Attacks

Md Imran Hossen, Sai Venkatesh Chilukoti, Liqun Shan, Sheng Chen, Yinzhi Cao, Xiali Hei

AI总结:

本研究提出MalInstructCoder框架,通过自动化数据投毒和对抗性指令微调攻击(干净提示投毒攻击和后门攻击),揭示了Code LLM在编程任务中的网络安全漏洞,实验表明仅投毒0.5%-1%数据即可使攻击成功率高达86%,凸显了构建防御机制的紧迫性。

摘要:

专为编程任务设计的指令微调大语言模型正越来越多地被用作AI编程助手。然而,由于该领域研究有限,这些模型被广泛集成后所引发的网络安全漏洞与影响尚未被完全理解。本研究探索了将后门从AI/ML领域转化为传统计算机恶意软件的新技术,揭示了AI与网络/软件安全的关键交叉点。为探索这一交叉点,我们提出了MalInstructCoder,这是一个旨在全面评估指令微调Code LLM网络安全漏洞的框架。MalInstructCoder引入了一个自动化数据投毒管道,将恶意代码片段注入良性代码中,在保持功能有效性的同时投毒指令微调数据。该框架提出了两种具有现实安全影响的实用对抗性指令微调攻击:干净提示投毒攻击和后门攻击。这些攻击旨在操纵Code LLM在特定攻击场景下生成包含恶意或有害功能的代码,同时保留其预期功能。我们对涉及三种最先进Code LLM(CodeLlama、DeepSeek-Coder和StarCoder2)的代码特定指令微调过程的可利用性进行了全面调查。研究结果表明,这些模型极易受到我们的攻击。具体而言,仅投毒1%(162个样本)的指令微调数据集,干净提示投毒攻击的ASR@1就达到了75%至86%以上。同样,在0.5%的投毒率下,后门攻击的ASR@1达到76%至86%。我们的研究揭示了指令微调Code LLM带来的关键网络安全风险,并强调了迫切需要稳健的防御机制。

英文摘要:

Instruction-tuned Large Language Models designed for coding tasks are increasingly employed as AI coding assistants. However, the cybersecurity vulnerabilities and implications arising from the widespread integration of these models are not yet fully understood due to limited research in this domain. This work investigates novel techniques for transitioning backdoors from the AI/ML domain to traditional computer malware, shedding light on the critical intersection of AI and cyber/software security. To explore this intersection, we present MalInstructCoder, a framework designed to comprehensively assess the cybersecurity vulnerabilities of instruction-tuned Code LLMs. MalInstructCoder introduces an automated data poisoning pipeline to inject malicious code snippets into benign code, poisoning instruction fine-tuning data while maintaining functional validity. It presents two practical adversarial instruction tuning attacks with real-world security implications: the clean prompt poisoning attack and the backdoor attack. These attacks aim to manipulate Code LLMs to generate code incorporating malicious or harmful functionality under specific attack scenarios while preserving intended functionality. We conduct a comprehensive investigation into the exploitability of the code-specific instruction tuning process involving three state-of-the-art Code LLMs: CodeLlama, DeepSeek-Coder, and StarCoder2. Our findings reveal that these models are highly vulnerable to our attacks. Specifically, the clean prompt poisoning attack achieves the ASR@1 ranging from over 75% to 86% by poisoning only 1% (162 samples) of the instruction fine-tuning dataset. Similarly, the backdoor attack achieves the ASR@1 ranging from 76% to 86% with a 0.5% poisoning rate. Our study sheds light on the critical cybersecurity risks posed by instruction-tuned Code LLMs and highlights the urgent need for robust defense mechanisms.

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

↑