arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2512.21236cs.CRcs.AIcs.SE
收藏

为LLM突破限制而探索句子配对:恶意代码生成的测试框架

Casting a SPELL: Sentence Pairing Exploration for LLM Limitation-breaking

Nanyang Technological University(南洋理工大学);National University of Singapore(国立新加坡大学)

Yifan Huang, Xiaojun Jia, Wenbo Guo, Yuqiang Sun, Yihao Huang, Chong Wang, Yang Liu

AI总结:

SPELL框架通过智能句子配对探索LLM在恶意代码生成中的安全漏洞,有效提升对抗测试效果。

摘要:

大型语言模型(LLM)通过人工智能辅助编程工具革新了软件开发,使具备有限编程能力的开发者能够创建复杂应用。然而,这种可及性也延伸到了恶意行为者,他们可能利用这些强大工具生成有害软件。现有禁锢突破研究主要集中在一般对抗场景,对恶意代码生成作为禁锢突破目标的探索有限。为填补这一空白,我们提出了SPELL,一个专门用于评估恶意代码生成中安全对齐弱点的综合测试框架。我们的框架采用时间分割选择策略,通过智能结合先前知识数据集中的句子,系统性地构建禁锢突破提示,平衡探索新攻击模式与利用成功技术。在三个高级代码模型(GPT-4.1、Claude-3.5和Qwen2.5-Coder)上的广泛评估显示,SPELL的有效性,分别在八个恶意代码类别中达到83.75%、19.38%和68.12%的攻击成功率。生成的提示成功在现实中的AI开发工具如Cursor中产生恶意代码,输出被最先进的检测系统确认为恶意,超过73%的准确率。这些发现揭示了当前LLM实现中的重大安全漏洞,并为改进代码生成应用中的AI安全对齐提供了有价值的见解。

英文摘要:

Large language models (LLMs) have revolutionized software development through AI-assisted coding tools, enabling developers with limited programming expertise to create sophisticated applications. However, this accessibility extends to malicious actors who may exploit these powerful tools to generate harmful software. Existing jailbreaking research primarily focuses on general attack scenarios against LLMs, with limited exploration of malicious code generation as a jailbreak target. To address this gap, we propose SPELL, a comprehensive testing framework specifically designed to evaluate the weakness of security alignment in malicious code generation. Our framework employs a time-division selection strategy that systematically constructs jailbreaking prompts by intelligently combining sentences from a prior knowledge dataset, balancing exploration of novel attack patterns with exploitation of successful techniques. Extensive evaluation across three advanced code models (GPT-4.1, Claude-3.5, and Qwen2.5-Coder) demonstrates SPELL's effectiveness, achieving attack success rates of 83.75%, 19.38%, and 68.12% respectively across eight malicious code categories. The generated prompts successfully produce malicious code in real-world AI development tools such as Cursor, with outputs confirmed as malicious by state-of-the-art detection systems at rates exceeding 73%. These findings reveal significant security gaps in current LLM implementations and provide valuable insights for improving AI safety alignment in code generation applications.

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

↑