MCP陷阱实验室:在多向攻击下暴露MCP工具服务器安全漏洞的开发人员陷阱
MCP Pitfall Lab: Exposing Developer Pitfalls in MCP Tool Server Security under Multi-Vector Attacks
AI总结:
本文提出MCP Pitfall Lab框架,通过可复现的场景验证开发人员陷阱,评估MCP工具服务器在多向攻击下的安全性和修复效果。
摘要:
模型上下文协议(MCP)越来越多地用于集成工具的LLM代理,但其多层设计和第三方服务器生态系统扩展了工具元数据、不可信输出、跨工具流、多模态输入和供应链向量的风险。现有MCP基准主要测量对恶意输入的鲁棒性,但提供有限的修复指导。我们提出了MCP Pitfall Lab,一种协议感知的安全测试框架,将开发人员陷阱作为可复现的场景进行操作化,并通过MCP跟踪和客观验证者(而非代理自报)验证结果。我们实例化了三个工作流程挑战(电子邮件、文档、加密)与六个服务器变体(基线和加固)并建模了三种攻击家族:工具元数据中毒、傀儡服务器和多模态图像到工具链,在统一的、跟踪导向的评估中。在对六个变体的Tier-1静态分析(36个二元标签)中,我们的分析器在四个静态可检查的陷阱类别(P1、P2、P5、P6)上实现了F1=1.0,并将跨工具转发和图像到工具泄漏(P3、P4)标记为跟踪/数据流依赖。应用推荐的加固措施消除了所有Tier-1发现(29到0)并降低了框架风险分数(10.0到0.0),平均成本为27行代码(LOC)。最后,在初步的19次运行数据集(电子邮件系统挑战)中,代理叙述在63.2%的运行中与跟踪证据不一致,100%的sink-action运行中如此,这促使基于跟踪的审计和回归测试。总体而言,Pitfall Lab使MCP工具服务器在现实多向条件下的实用、端到端评估和加固成为可能。
英文摘要:
Model Context Protocol (MCP) enables tool-integrated LLM agents, but its third-party tool-server ecosystem expands software supply-chain risk across tool metadata, untrusted outputs, cross-tool flows, multi-modal inputs, and privileged sink actions. Existing MCP benchmarks mainly measure robustness to malicious inputs, offering limited support for dependency vetting, semantic metadata auditing, and hardening regression. We present MCP Pitfall Lab, a protocol-aware security testing framework that models developer pitfalls as reproducible scenarios and validates outcomes using MCP traces and objective validators rather than agent self-report. We also introduce Semantic MCP-Bill-of-Material(MCP-BOM), representing that augments component inventory with security-relevant tool semantics, including descriptions, schemas, high-risk parameters, source/sink roles, trust boundaries, policy hooks, audit support, and trace provenance. Across 2,579 validator-completed runs over four models, Pitfall Lab observes 31.9% overall attack success rate(ASR), with multi-modal injection strongest at 38.7%. Semantic static fields detect pitfalls involving policy-bearing tool descriptions, permissive schemas, missing audit support, and absent server-side validation with F1=0.727, while BOM-backed findings drop from 27 to 16 after hardening. Decomposed risk metrics show Control Coverage increasing from 0.173 to 0.697 and Residual Risk decreasing from 15.31 to 6.09. A trace-linked case study further demonstrates that cross-tool forwarding and image-to-tool leakage require runtime provenance rather than static manifest fields alone. Overall, Pitfall Lab reframes MCP tool servers as AI software-supply-chain dependencies and provides BOM-backed artifacts for review, hardening, and trace-grounded regression testing
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。