针对代码补全模型的 LLM 辅助易触发后门攻击:注入伪装漏洞以对抗强检测
An LLM-Assisted Easy-to-Trigger Backdoor Attack on Code Completion Models: Injecting Disguised Vulnerabilities against Strong Detection
AI总结:
提出 LLM 辅助框架 CodeBreaker,通过保持功能不变的恶意载荷转换,在代码补全模型中植入易触发后门并规避强漏洞检测。
摘要:
大语言模型(LLM)已经改变了代码补全任务,通过提供基于上下文的建议来提高软件工程中开发者的生产力。由于用户经常针对特定应用微调这些模型,投毒和后门攻击可能会隐蔽地改变模型输出。为应对这一关键安全挑战,我们提出 CodeBreaker,这是一个开创性的、由 LLM 辅助的针对代码补全模型的后门攻击框架。不同于近期将恶意载荷嵌入代码中可检测或不相关部分(例如注释)的攻击,CodeBreaker 利用 LLM(例如 GPT-4)进行复杂的载荷转换(同时不影响功能),确保用于微调的投毒数据和生成的代码都能逃避强漏洞检测。CodeBreaker 的突出之处在于其对漏洞的全面覆盖,使其成为首个提供如此广泛评估集合的框架。我们大量的实验评估和用户研究突显了 CodeBreaker 在各种设置下的强劲攻击性能,验证了其相对于现有方法的优越性。通过以最小转换将恶意载荷直接集成到源代码中,CodeBreaker 挑战了当前安全措施,强调了为代码补全建立更鲁棒防御的迫切需求。
英文摘要:
Large Language Models (LLMs) have transformed code completion tasks, providing context-based suggestions to boost developer productivity in software engineering. As users often fine-tune these models for specific applications, poisoning and backdoor attacks can covertly alter the model outputs. To address this critical security challenge, we introduce CodeBreaker, a pioneering LLM-assisted backdoor attack framework on code completion models. Unlike recent attacks that embed malicious payloads in detectable or irrelevant sections of the code (e.g., comments), CodeBreaker leverages LLMs (e.g., GPT-4) for sophisticated payload transformation (without affecting functionalities), ensuring that both the poisoned data for fine-tuning and generated code can evade strong vulnerability detection. CodeBreaker stands out with its comprehensive coverage of vulnerabilities, making it the first to provide such an extensive set for evaluation. Our extensive experimental evaluations and user studies underline the strong attack performance of CodeBreaker across various settings, validating its superiority over existing approaches. By integrating malicious payloads directly into the source code with minimal transformation, CodeBreaker challenges current security measures, underscoring the critical need for more robust defenses for code completion.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。