Invisible Threats from Model Context Protocol: Generating Stealthy Injection Payload via Tree-based Adaptive Search

📄 arXiv: 2603.24203v1 📥 PDF

作者: Yulin Shen, Xudong Pan, Geng Hong, Min Yang

分类: cs.CR, cs.AI

发布日期: 2026-03-25


💡 一句话要点

提出TIP方法以解决MCP系统中的隐性攻击问题

🎯 匹配领域: 支柱一:机器人控制 (Robot Control) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 模型上下文协议 黑盒攻击 树结构搜索 负载生成 网络安全 恶意操控 攻击防御 大型语言模型

📋 核心要点

  1. 现有间接提示注入技术在MCP系统中存在高成本、语义不一致及易被检测等问题,攻击面尚未得到充分探索。
  2. 本文提出TIP方法,通过树结构搜索生成自然负载,利用粗到细的优化框架来控制MCP代理。
  3. TIP在四种主流LLMs上实现了95%以上的攻击成功率,且在面对防御时仍保持50%以上的有效性,显著优于现有方法。

📝 摘要(中文)

近年来,模型上下文协议(MCP)的进展使得大型语言模型(LLMs)能够轻松调用外部工具,形成了一类强大的工具增强代理。然而,这种能力也带来了新的攻击面,尤其是对工具响应的恶意操控。现有的间接提示注入技术存在高部署成本、语义一致性差或重白盒要求等问题,且容易被新提出的防御方法检测到。本文提出了一种新的黑盒攻击方法——树结构注入负载(TIP),能够生成自然负载,可靠地控制MCP启用的代理,即使在防御下也能有效实施。通过将负载生成视为树结构搜索问题,并在粗到细的优化框架下引导搜索,TIP在四种主流LLMs上实现了超过95%的攻击成功率,并且所需查询次数比以往自适应攻击少一个数量级。对四种代表性防御方法的实验表明,TIP保持了超过50%的有效性,并显著优于现有最先进的攻击方法。

🔬 方法详解

问题定义:本文旨在解决MCP系统中恶意操控工具响应的攻击问题。现有方法在部署成本、语义一致性和防御检测方面存在显著不足。

核心思路:TIP方法通过将负载生成视为树结构搜索问题,利用攻击者LLM在粗到细的优化框架下进行引导,旨在生成自然且有效的攻击负载。

技术框架:TIP的整体架构包括树结构搜索、攻击者LLM、路径感知反馈机制和动态探索预算分配。首先,通过树结构进行搜索,然后利用反馈机制稳定学习,最后根据防御信号调整搜索策略。

关键创新:TIP的主要创新在于引入路径感知反馈机制,仅向攻击模型提供高质量的历史轨迹,从而避免局部最优,并在动态条件下优化搜索过程。

关键设计:在TIP中,关键参数包括树结构的深度和宽度、反馈机制的设计,以及探索预算的动态分配策略,这些设计使得TIP在防御环境中仍能保持高效的攻击能力。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

TIP在四种主流LLMs上实现了超过95%的攻击成功率,且所需查询次数比以往自适应攻击少一个数量级。在面对四种代表性防御方法时,TIP仍保持超过50%的有效性,显著优于现有最先进的攻击技术,展示了其强大的攻击能力和实用性。

🎯 应用场景

该研究的潜在应用领域包括网络安全、恶意软件检测和智能代理系统的安全防护。TIP方法能够帮助安全研究人员识别和修复MCP系统中的安全漏洞,从而提升整体系统的安全性和可靠性。未来,随着MCP技术的广泛应用,TIP的研究成果将对保护用户数据和隐私产生深远影响。

📄 摘要(原文)

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.