提出新型黑盒攻击,用树搜索生成隐蔽指令操控工具调用的AI代理。
Invisible Threats from Model Context Protocol: Generating Stealthy Injection Payload via Tree-based Adaptive Search
- 将注入指令生成建模为树状搜索,通过粗到精框架优化攻击路径。
- 在无防御场景下攻击成功率超95%,查询次数仅为前代方法的十分之一。
- 可对抗多种防御机制,适合研究大模型安全与对抗攻击的学者。
模型上下文协议(MCP)的进展使大语言模型能便捷调用外部工具,催生了强大的工具增强型智能体。然而,这一能力也带来了未被充分探索的攻击面,尤其是对工具响应的恶意操纵。现有针对MCP的间接提示注入技术存在部署成本高、语义连贯性差或依赖白盒信息的问题,且易被新防御手段检测。本文提出树结构注入指令生成(TIP),一种新型黑盒攻击方法,能在防御环境下可靠控制MCP启用的智能体。技术上,将指令生成视为树状搜索问题,由攻击者大模型在提出的粗到精优化框架下引导搜索。为稳定学习并避免局部最优,引入路径感知反馈机制,仅向攻击模型传递高质量历史轨迹。同时通过显式依赖可观测防御信号并动态重分配探索预算,增强对防御变换的鲁棒性。在四个主流大模型上的实验表明,TIP在无防御设置下攻击成功率超过95%,所需查询次数比先前自适应攻击少一个数量级;面对四种代表性防御策略,仍保持超过50%的有效性,显著优于当前最先进攻击。在真实MCP系统中实现该攻击后,结果揭示了部署中存在一种隐蔽但实际的威胁路径。文章还讨论了缓解此类安全漏洞的潜在方案。
原文摘要 · Abstract (English)
Recent advances in the Model Context Protocol (MCP) have enabled large language models (LLMs) to invoke external tools with unprecedented ease. This creates a new class of powerful and tool augmented agents. Unfortunately, this capability also introduces an under explored attack surface, specifically the malicious manipulation of tool responses. Existing techniques for indirect prompt injection that target MCP suffer from high deployment costs, weak semantic coherence, or heavy white box requirements. Furthermore, they are often easily detected by recently proposed defenses. In this paper, we propose Tree structured Injection for Payloads (TIP), a novel black-box attack which generates natural payloads to reliably seize control of MCP enabled agents even under defense. Technically, We cast payload generation as a tree structured search problem and guide the search with an attacker LLM operating under our proposed coarse-to-fine optimization framework. To stabilize learning and avoid local optima, we introduce a path-aware feedback mechanism that surfaces only high quality historical trajectories to the attacker model. The framework is further hardened against defensive transformations by explicitly conditioning the search on observable defense signals and dynamically reallocating the exploration budget. Extensive experiments on four mainstream LLMs show that TIP attains over 95% attack success in undefended settings while requiring an order of magnitude fewer queries than prior adaptive attacks. Against four representative defense approaches, TIP preserves more than 50% effectiveness and significantly outperforms the state-of-the-art attacks. By implementing the attack on real world MCP systems, our results expose an invisible but practical threat vector in MCP deployments. We also discuss potential mitigation approaches to address this critical security gap.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。