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

从组件操控到系统妥协:理解并检测恶意MCP服务器

From Component Manipulation to System Compromise: Understanding and Detecting Malicious MCP Servers

Fudan University(复旦大学)

Yiheng Huang, Zhijia Zhao, Bihuan Chen, Susheng Wu, Zhuotong Zhou, Yiheng Cao, Xin Hu, Xin Peng

AI总结:

本文提出了一种以组件为中心的方法来理解和检测恶意MCP服务器,构建了首个包含114个恶意MCP服务器的组件中心POC数据集,并提出了 Connor 检测器,实现了94.6%的F1分数,有效识别了恶意服务器。

摘要:

模型上下文协议(MCP)标准化工会大型语言模型(LLM)连接到外部工具和数据源,使集成更快但引入了新的攻击向量。尽管MCP的采用率不断提高,现有MCP安全研究根据可观察效果分类攻击,模糊了攻击在不同MCP服务器组件中的行为,并忽视了多组件攻击链。同时,现有防御措施在面对多组件攻击或之前未知的恶意行为时效果较差。本文提出了一种以组件为中心的视角来理解和检测恶意MCP服务器。首先,我们构建了首个组件中心的POC数据集,包含114个恶意MCP服务器,其中攻击是通过操控MCP组件及其组合实现的。我们评估了这些攻击在两个MCP主机和五个LLM上的有效性,并发现(1)组件位置影响攻击成功率;(2)多组件组合通常比单组件攻击更有效,通过分布恶意逻辑。其次,我们提出并实现了 Connor,一个用于恶意MCP服务器的两阶段行为偏差检测器。它首先进行预执行分析以检测恶意shell命令并提取每个工具的功能意图,然后进行逐步执行分析以追踪每个工具的行为轨迹并检测其与功能意图的偏差。在我们精心整理的数据集上的评估表明,Connor实现了94.6%的F1分数,比当前最佳方法高出8.9%至59.6%。在现实世界检测中,Connor识别出两个恶意服务器。

英文摘要:

The model context protocol (MCP) standardizes how LLMs connect to external tools and data sources, enabling faster integration but introducing new attack vectors. Despite the growing adoption of MCP, existing MCP security studies classify attacks by their observable effects, obscuring how attacks behave across different MCP server components and overlooking multi-component attack chains. Meanwhile, existing defenses are less effective when facing multi-component attacks or previously unknown malicious behaviors. This work presents a component-centric perspective for understanding and detecting malicious MCP servers. First, we build the first component-centric PoC dataset of 114 malicious MCP servers where attacks are achieved as manipulation over MCP components and their compositions. We evaluate these attacks' effectiveness across two MCP hosts and five LLMs, and uncover that (1) component position shapes attack success rate; and (2) multi-component compositions often outperform single-component attacks by distributing malicious logic. Second, we propose and implement Connor, a two-stage behavioral deviation detector for malicious MCP servers. It first performs pre-execution analysis to detect malicious shell commands and extract each tool's function intent, and then conducts step-wise in-execution analysis to trace each tool's behavioral trajectories and detect deviations from its function intent. Evaluation on our curated dataset indicates that Connor achieves an F1-score of 94.6%, outperforming the state of the art by 8.9% to 59.6%. In real-world detection, Connor identifies two malicious servers.

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

↑