小漏洞能沉大船:探索源代码模型的可迁移漏洞
A Small Leak Sinks All: Exploring the Transferable Vulnerability of Source Code Models
AI总结:
本研究针对源代码模型(SCM)未被充分探索的可迁移漏洞,提出无需依赖受害者的对抗样本生成方法HABITAT,揭示传统SCM与LLM4Code的漏洞相关性,所构建对抗样本对LLM4Code攻击成功率达64%,优于现有方法15%以上。
摘要:
源代码模型(SCM)从源代码中学习合适的嵌入,在各类软件工程或安全任务中展现出显著成效。近年来大语言模型(LLM)的爆发式发展拓展了SCM家族,带来了革新开发工作流的代码大语言模型(LLM4Code)。研究SCM的各类漏洞是AI驱动软件生态系统安全与可信的基石,但其中最基础的可迁移漏洞仍未得到充分探索。现有研究既未提供无需访问SCM下游分类器的实用方法来生成有效的对抗样本以用于对抗防御,也未关注现代软件开发平台和云原生集成开发环境中广泛使用的LLM4Code。因此,本工作系统研究了传统SCM与LLM4Code的内在漏洞可迁移性,并提出了一种无需依赖受害者的对抗样本生成方法。我们设计了HABITAT,它包含定制的扰动插入机制和分层强化学习框架,无需访问SCM的下游分类器即可自适应选择最优扰动。此外,我们对SCM漏洞进行了内在可迁移性分析,揭示了传统SCM与LLM4Code之间潜在的漏洞相关性,以及支配无需依赖受害者的迁移攻击成功率的基本因素。这些关于SCM漏洞的发现强调了未来开发鲁棒防御的关键焦点。实验评估表明,基于传统SCM构建的对抗样本对LLM4Code的攻击成功率高达64%,比现有最先进方法高出15%以上。
英文摘要:
Source Code Model learn the proper embeddings from source codes, demonstrating significant success in various software engineering or security tasks. The recent explosive development of LLM extends the family of SCMs,bringing LLMs for code that revolutionize development workflows. Investigating different kinds of SCM vulnerability is the cornerstone for the security and trustworthiness of AI-powered software ecosystems, however, the fundamental one, transferable vulnerability, remains critically underexplored. Existing studies neither offer practical ways, i.e. require access to the downstream classifier of SCMs, to produce effective adversarial samples for adversarial defense, nor give heed to the widely used LLM4Code in modern software development platforms and cloud-based integrated development environments. Therefore, this work systematically studies the intrinsic vulnerability transferability of both traditional SCMs and LLM4Code, and proposes a victim-agnostic approach to generate practical adversarial samples. We design HABITAT, consisting of a tailored perturbation-inserting mechanism and a hierarchical Reinforcement Learning framework that adaptively selects optimal perturbations without requiring any access to the downstream classifier of SCMs. Furthermore, an intrinsic transferability analysis of SCM vulnerabilities is conducted, revealing the potential vulnerability correlation between traditional SCMs and LLM4Code, together with fundamental factors that govern the success rate of victim-agnostic transfer attacks. These findings of SCM vulnerabilities underscore the critical focal points for developing robust defenses in the future. Experimental evaluation demonstrates that our constructed adversarial examples crafted based on traditional SCMs achieve up to 64% success rates against LLM4Code, surpassing the state-of-the-art by over 15%.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。