MCP安全漏洞实验平台

一个交互式教育资源,用于学习模型上下文协议(MCP)安全漏洞、攻击向量和防御最佳实践。

  • by amoranio
  • HTML
  • 本地部署
  • 更新于
在 GitHub 查看 amoranio/badMCP

使用说明

badMCP - MCP Security Exploitation Lab

An interactive educational resource for learning about Model Context Protocol (MCP) security vulnerabilities, attack vectors, and defensive best practices.

Overview

MCP enables AI assistants to connect to external data sources and tools. This creates unique security challenges because MCP tools receive inputs that may be influenced by untrusted content processed by AI models. badMCP teaches you to recognize and prevent these vulnerabilities through:

  • Side-by-side comparisons of vulnerable vs. secure code
  • Real-world attack scenarios and threat modeling
  • Interactive quizzes to test your knowledge
  • A comprehensive security best practices checklist

Vulnerability Topics Covered

  • Path Traversal - Preventing unauthorized file access
  • Command Injection - Safe execution of system commands
  • Credential Exposure - Proper secrets management
  • Tool Description Injection - Defending against malicious MCP servers
  • Response Injection - Handling untrusted tool outputs
  • Verbose Error Disclosure - Secure error handling

Usage

Open index.html in a browser to explore the lab locally, or deploy to any static hosting service.

Disclaimer

This lab is for educational purposes only. Use the vulnerable code examples only in isolated test environments.