人工智能黑客
AI 安全资源
CHECKLIST

MCP 服务器渗透测试清单

模型上下文协议 (MCP) 服务器的全面渗透测试清单。使用它在部署前系统地评估 MCP 服务器安全性。

1 侦察

  • 识别 MCP 服务器端点和公开的工具
  • 枚举可用的 MCP 资源、提示和工具
  • 地图工具参数和预期输入类型
  • 检查服务器元数据中的版本泄露情况
  • 查看 MCP 服务器配置文件和文档
  • 识别第三方依赖项及其版本

2 身份验证和授权

  • 测试对 MCP 工具的未经身份验证的访问
  • 尝试通过格式错误的令牌绕过身份验证
  • 测试跨工具的权限提升
  • 验证工具级授权是否已强制执行
  • 检查资源访问中的 IDOR 漏洞
  • 测试会话/cookie 处理和重放攻击
  • Verify OAuth issuer binding — a provider that ignores its configured issuer lets a compromised server advertise its own token endpoint and harvest client secrets (FastMCP advisories, November 2026)
  • Trigger a 3xx redirect from the MCP endpoint and confirm no Authorization header follows it — the mcp-go client forwarded OAuth bearer tokens to any redirect target (GO-2026-6911)
  • Confirm per-client session isolation on shared transports — the MCP TypeScript SDK returned wrong-client responses on a shared transport (CVE-2026-111770, fixed in 1.32.0/2.3.0)

3 工具注射测试

  • 将恶意参数注入工具调用中
  • 通过工具参数测试 eval() 注入
  • 尝试通过工具输入进行命令注入
  • 测试文件访问工具中的路径遍历
  • 验证输入长度限制和边界检查
  • 通过工具 URL 参数测试 SSRF
  • 检查工具查询中的 NoSQL/SQL 注入

4 通过 MCP 资源即时注入

  • 在 MCP 资源内容中嵌入注入有效负载
  • 通过第三方数据源进行间接注入测试
  • 尝试通过工具描述进行系统提示提取
  • 测试工具描述注入(中毒工具文档)
  • 验证资源提示清理

5 数据暴露测试

  • 检查 MCP 工具响应中的敏感数据
  • 通过返回参数验证数据泄露
  • 测试泄露内部信息的详细错误消息
  • 检查日志记录和监控数据暴露
  • 通过定时侧通道测试数据泄漏

6 供应链安全

  • 验证 MCP 服务器包签名
  • 检查已知 CVE 的服务器依赖关系
  • 检查MCP服务器代码中的后门
  • 验证更新机制安全性
  • 根据最小权限检查工具权限
AH
AI Hacking Team

The AI Hacking team researches and documents AI/LLM security vulnerabilities, red teaming techniques, and defensive strategies. Our guides are based on real-world pentesting experience and continuous monitoring of the AI security landscape.

Stay Ahead of AI Security

Get the latest AI/LLM security research, OWASP updates, and new vulnerabilities delivered straight to your inbox.