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.


翻译:模型上下文协议(MCP)标准化了大语言模型与外部工具及数据源的连接方式,在加速集成的同时引入了新的攻击向量。尽管MCP的采用日益广泛,现有安全研究多依据可观察的攻击效果进行分类,掩盖了攻击在不同MCP服务器组件间的行为模式,且忽视了多组件攻击链。同时,现有防御机制在面对多组件攻击或未知恶意行为时效果有限。本文提出以组件为中心的视角来理解和检测恶意MCP服务器。首先,我们构建了首个基于组件的114个恶意MCP服务器概念验证数据集,其中攻击通过操控MCP组件及其组合实现。我们在两个MCP宿主和五个大语言模型上评估了这些攻击的有效性,发现:(1)组件位置影响攻击成功率;(2)多组件组合通过分散恶意逻辑通常优于单组件攻击。其次,我们提出并实现了Connor——一种面向恶意MCP服务器的两阶段行为偏离检测器。该检测器首先执行预执行分析,检测恶意shell命令并提取各工具的功能意图;随后在运行过程中逐步执行执行中分析,追踪各工具的行为轨迹并检测其与功能意图的偏离。在我们构建的数据集上评估表明,Connor的F1分数达94.6%,相比现有最优方法提升8.9%至59.6%。在真实环境检测中,Connor识别出两个恶意服务器。

0
下载
关闭预览

相关内容

大语言模型越狱攻击:模型、根因及其攻防演化
专知会员服务
22+阅读 · 2025年4月28日
基于深度学习的入侵检测系统:综述
专知会员服务
15+阅读 · 2025年4月11日
通信网络中大型语言模型的后门攻击的综述
专知会员服务
30+阅读 · 2023年9月5日
专知会员服务
19+阅读 · 2021年6月10日
专知会员服务
56+阅读 · 2020年12月28日
异质信息网络分析与应用综述,软件学报-北京邮电大学
网络安全态势感知浅析
计算机与网络安全
18+阅读 · 2017年10月13日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
5+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关VIP内容
大语言模型越狱攻击:模型、根因及其攻防演化
专知会员服务
22+阅读 · 2025年4月28日
基于深度学习的入侵检测系统:综述
专知会员服务
15+阅读 · 2025年4月11日
通信网络中大型语言模型的后门攻击的综述
专知会员服务
30+阅读 · 2023年9月5日
专知会员服务
19+阅读 · 2021年6月10日
专知会员服务
56+阅读 · 2020年12月28日
异质信息网络分析与应用综述,软件学报-北京邮电大学
相关资讯
网络安全态势感知浅析
计算机与网络安全
18+阅读 · 2017年10月13日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员