arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.02857cs.CRcs.SE
收藏

MOSAIC:大语言模型编码代理中知识引导的命令行命令组合攻击

MOSAIC: Knowledge-Guided CLI Command Composition Attack in LLM Coding Agents

Sun Yat-sen University(中山大学);Shandong University(山东大学);Peking University(北京大学);Hong Kong University of Science and Technology(香港科技大学)

Jiangrong Wu, Huaijin Wang, Yihao Zhang, Yuhong Nan, Shuai Wang

AI总结:

研究大语言模型编码代理中CLI命令组合风险,提出知识引导框架MOSAIC,从漏洞等提取命令状态行为总结成攻击路径,实例化开发者工作流程,通过多实验得高攻击成功率。

摘要:

大语言模型编码代理通过发出常规CLI命令完成开发任务,命令组合存在被忽视的隐患。现有攻防侧重指令层,本文发现CLI命令构成危险状态关系的风险。提出MOSAIC框架,从漏洞等提取命令行为总结成攻击路径,实例化工作流程用于黑盒代理评估,在多实验中获高成功率。

英文摘要:

LLM coding agents increasingly complete development tasks by issuing ordinary CLI commands. Following the Unix design, these commands cooperate through shared operating-system state: one command may write state that a later command reads. While this composition is benign and intended, it creates an overlooked exploit surface. Existing attacks and defenses mainly target the instruction layer, where malicious intent appears as hostile text. In contrast, we observe that individually benign commands can form a dangerous producer-consumer state relation across the command trace, exposing what we call CLI command-composition risk (CCR). Given this new attack surface, it is critical to systematically uncover and characterize the impact of CCR in real-world coding agents. However, systematically understanding this risk is quite challenging, because naive command enumeration and end-to-end LLM generation produce mostly invalid workflows. We present MOSAIC, a knowledge-guided framework that distills validated command-state behaviors from CVEs, advisories, and researcher PoCs into reusable summaries, composes them into exploit paths, and instantiates them as realistic developer workflows for black-box agent evaluation. Across five real-world CLI coding agents and five backend LLMs over 2,525 trials, MOSAIC achieves a 96.59% attack success rate under benign developer tasks.

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

↑