arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.12194cs.CR
收藏

MalTool:针对LLM代理的恶意工具攻击

MalTool: Malicious Tool Attacks on LLM Agents

Duke University(杜克大学);UC Berkeley(加州大学伯克利分校)

Yuepeng Hu, Yuqi Jia, Mengyuan Li, Dawn Song, Neil Gong

AI总结:

研究提出MalTool框架,系统分析恶意工具代码实现,展示恶意行为分类及生成方法,揭示现有检测方法对恶意工具的局限性。

摘要:

在恶意工具攻击中,攻击者将恶意工具上传至分发平台;一旦用户误装该工具且LLM代理在任务执行中选择该工具,将威胁用户安全与隐私。以往研究侧重于操纵工具名称和描述以增加用户安装和LLM代理选择的可能性。然而,成功攻击还需在工具代码实现中嵌入恶意行为,此领域研究较少。本文通过提出MalTool框架,系统研究恶意工具代码实现,基于保密性-完整性-可用性三元组构建恶意行为分类。为研究攻击者利用编码LLM自动生成恶意工具的风险,开发MalTool框架,可合成展示指定恶意行为的独立工具或嵌入在无害实现中的工具。为确保功能正确性和结构多样性,MalTool利用自动化验证器验证生成工具是否展示预期恶意行为并足够不同,迭代优化直至成功。评估表明,即使编码LLM安全对齐,MalTool也高度有效。使用MalTool构建了包含1300个独立恶意工具和5727个包含恶意行为的真实工具数据集。进一步显示现有检测方法,包括传统恶意软件检测方法和针对LLM代理设置的方法,对恶意工具检测效果有限,凸显亟需新防御机制的迫切需求。

英文摘要:

In a malicious tool attack, an attacker uploads a malicious tool to a distribution platform; once a user inadvertently installs the tool and the LLM agent selects it during task execution, the tool can compromise the user's security and privacy. Prior work focuses on manipulating tool names and descriptions to increase the likelihood of installation by users and selection by LLM agents. However, a successful attack also requires embedding malicious behaviors in the tool's code implementation, which remains largely unexplored. In this work, we bridge this gap by presenting the first systematic study of malicious tool code implementations. We first propose a taxonomy of malicious tool behaviors based on the confidentiality-integrity-availability triad, tailored to LLM-agent settings. To investigate the severity of the risks posed by attackers exploiting coding LLMs to automatically generate malicious tools, we develop MalTool, a coding-LLM-based framework that synthesizes tools exhibiting specified malicious behaviors, either as standalone tools or embedded within otherwise benign implementations. To ensure functional correctness and structural diversity, MalTool leverages an automated verifier that validates whether generated tools exhibit the intended malicious behaviors and differ sufficiently from previously generated instances, iteratively refining generations until success. Our evaluation demonstrates that MalTool is highly effective even when coding LLMs are safety-aligned. Using MalTool, we construct two datasets of malicious tools: 1,300 standalone malicious tools and 5,727 real-world tools with embedded malicious behaviors. We further show that existing detection methods, including conventional malware detection approaches and methods tailored to the LLM-agent setting, exhibit limited effectiveness at detecting the malicious tools, highlighting an urgent need for new defenses.

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

↑