arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2601.01241cs.CRcs.SE
收藏

MCP-SandboxScan:基于WASM的MCP工具安全执行与运行时分析

MCP-SandboxScan: WASM-based Secure Execution and Runtime Analysis for MCP Tools

University of Glasgow(格拉斯哥大学);Aarhus University(奥胡斯大学)

Zhuoran Tan, Run Hao, Jeremy Singer, Yutian Tang, Christos Anagnostopoulos

AI总结:

本文提出MCP-SandboxScan框架,通过WASM环境执行工具并提取运行时证据,结合语义分析识别MCP工具的风险,验证其在跨语言项目、 evasion基准和100个仓库中的有效性。

摘要:

工具增强型大语言模型(LLM)代理创建了新的供应链漏洞:MCP工具像第三方包一样安装,但其输出可能进入代理的推理上下文。这导致了confused-deputy风险,即攻击者控制的输入导致原本无害的工具行使合法权限,如文件、环境变量或网络操作,并将敏感或指令类内容反映到LLM可见的字段中。我们提出了SandScope,一个MCP-aware审计框架,结合运行时见证检测与语义工具配置文件。SandScope在WebAssembly System Interface(WASI)下执行可移植工具或驱动未修改的MCP服务器通过标准输入输出(stdio),提取LLM可见的sink,并报告可审计的源到sink见证,同时分别记录网络意图和出站证据。其语义层从工具/列表元数据和静态注册中恢复声明的能力,以表征执行不完整时的攻击面。我们评估了SandScope在受控的跨语言项目、规避基准和100个仓库MCP语料库中的表现。SandScope完成了35个仓库的浅层动态扫描,并通过更广泛的语义配置文件扫描,恢复了71个仓库中1,127个工具的元数据,包括886个具有安全敏感声明能力的工具。通过针对35个动态扫描仓库的模式引导探索扫描,重新执行了33个并观察到12个源到sink见证。这些结果表明,SandScope通过受控执行、MCP-aware sink提取、运行时见证报告和语义能力配置文件,为MCP工具风险提供了实用且可审计的证据。

英文摘要:

Tool-augmented Large Language Model (LLM) agents create a new supply-chain surface: Model Context Protocol (MCP) tools are installed like third-party packages, yet their outputs can enter the agent's reasoning context. This enables confused-deputy risks in which attacker-controlled inputs cause otherwise benign tools to exercise legitimate authority over files, environment variables, or network-facing operations and reflect sensitive or instruction-like content into LLM-visible fields. We present SandScope, an MCP-aware audit framework that combines runtime witness detection with semantic tool profiling. SandScope executes portable tools under WebAssembly System Interface (WASI) or drives unmodified MCP servers over standard input/output (stdio), extracts LLM-visible sinks from tool results and prompt/message fields, and reports auditable source-to-sink witnesses from environment, file, and tool-input sources while separately recording network-intent and egress evidence. Its semantic layer recovers declared capabilities from tools/list metadata and static registrations to characterize attack surface when execution is incomplete. We evaluate SandScope on controlled cross-language subjects, an evasion benchmark, and a 100-repository MCP corpus. SandScope completes shallow dynamic scans for 35 repositories and, through a broader semantic profiling pass, recovers metadata for 1,127 tools across 71 repositories, including 886 tools with security-sensitive declared capabilities. A schema-guided exploration pass over the 35 dynamically scanned repositories re-executes 33 and observes source-to-sink witnesses in 12. These results show that SandScope provides practical, auditable evidence for MCP tool risk through controlled execution, MCP-aware sink extraction, runtime witness reporting, and semantic capability profiling.

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

↑