arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.21818cs.SEcs.MA
收藏

分析基于大语言模型的多智能体系统在软件开发中的代码注入攻击

Analyzing Code Injection Attacks on LLM-based Multi-Agent Systems in Software Development

Loyola Marymount University(洛约拉马利蒙特大学);University of Colorado Colorado Springs(科罗拉多大学科泉分校)

Brian Bowers, Smita Khapre, Jugal Kalita

AI总结:

本文研究了基于大语言模型的多智能体系统在软件开发中的代码注入攻击问题,提出了一种更健壮的架构,并通过添加安全分析代理提升了系统的安全性和效率。

摘要:

代理AI和多代理系统即将在行业和社会中占据主导地位。受目标驱动的自主性驱动,它们代表了一种强大的生成AI形式,标志着从被动内容生成向主动多任务能力的转变。作为典范,我们提出了一种多代理系统架构,用于软件工程过程的实现阶段。我们还提出了针对所提系统的全面威胁模型。我们证明,尽管此类系统可以生成代码相当准确,但它们容易受到攻击,包括代码注入。由于其自主设计和缺乏人类在环,这些系统无法自行识别和响应攻击。本文分析了多代理系统的脆弱性,并得出结论, coder-reviewer-tester 架构比 coder 和 coder-tester 架构更健壮,但编写代码的效率较低。我们发现,通过添加一个安全分析代理,可以减轻效率损失,同时实现甚至更好的健壮性。最后,我们证明安全分析代理容易受到高级代码注入攻击,显示通过在注入代码中嵌入有毒的少量示例,可以将攻击成功率从0%提高到71.95%。

英文摘要:

Agentic AI and Multi-Agent Systems are poised to dominate industry and society imminently. Powered by goal-driven autonomy, they represent a powerful form of generative AI, marking a transition from reactive content generation into proactive multitasking capabilities. As an exemplar, we propose an architecture of a multi-agent system for the implementation phase of the software engineering process. We also present a comprehensive threat model for the proposed system. We demonstrate that while such systems can generate code quite accurately, they are vulnerable to attacks, including code injection. Due to their autonomous design and lack of humans in the loop, these systems cannot identify and respond to attacks by themselves. This paper analyzes the vulnerability of multi-agent systems and concludes that the coder-reviewer-tester architecture is more resilient than both the coder and coder-tester architectures, but is less efficient at writing code. We find that by adding a security analysis agent, we mitigate the loss in efficiency while achieving even better resiliency. We conclude by demonstrating that the security analysis agent is vulnerable to advanced code injection attacks, showing that embedding poisonous few-shot examples in the injected code can increase the attack success rate from 0% to 71.95%.

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

↑