HD

harishsg993010/damn-vulnerable-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

1362 stars 187 forks 品質 57 トレンド 24

くそ、脆弱なMCPサーバーですね

概要

教育目的で意図的に脆弱に設計されたモデルコンテキストプロトコル(MCP)の実装。 Damn Vulnerable Model Context Protocol(DVMCP)は、MCP実装におけるセキュリティ脆弱性を示す教育プロジェクトです。このプロジェクトには、異なる脆弱性や攻撃ベクトルを示す難易度が上がる10のチャレンジが含まれています。 このプロジェクトは、セキュリティ研究者、開発者、AI安全専門家がMCP実装における潜在的なセキュリティ問題とそれを軽減する方法を学ぶことを目的としています。 モデルコンテキストプロトコル(MCP)は、アプリケーションが大規模言語モデル(LLM)に対して構造化された方法でコンテキストを提供できるようにする標準化されたプロトコルです。これはコンテキスト提供と実際のLLMの相互作用を分離し、アプリケーションがリソース、ツール、プロンプトをLLMに公開できるようにします。

概要(AI 翻訳)

教育目的で意図的に脆弱に設計されたモデルコンテキストプロトコル(MCP)の実装。

概要

Damn Vulnerable Model Context Protocol(DVMCP)は、MCP実装におけるセキュリティ脆弱性を示す教育プロジェクトです。このプロジェクトには、異なる脆弱性や攻撃ベクトルを示す難易度が上がる10のチャレンジが含まれています。

このプロジェクトは、セキュリティ研究者、開発者、AI安全専門家がMCP実装における潜在的なセキュリティ問題とそれを軽減する方法を学ぶことを目的としています。

MCPとは何か?

モデルコンテキストプロトコル(MCP)は、アプリケーションが大規模言語モデル(LLM)に対して構造化された方法でコンテキストを提供できるようにする標準化されたプロトコルです。これはコンテキスト提供と実際のLLMの相互作用を分離し、アプリケーションがリソース、ツール、プロンプトをLLMに公開できるようにします。

おすすめMCPクライアント

CLINE - VSCode 拡張 ClineとMCPサーバーを接続するには、こちらの「Connecting to a Remote Server - Cline」を参照してください

クイックスタート

リポジトリをクローンしたら、以下のコマンドを実行します。

免責事項

Windows環境では安定していません。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Damn Vulnerable Model Context Protocol (DVMCP)

A deliberately vulnerable implementation of the Model Context Protocol (MCP) for educational purposes.

Overview

The Damn Vulnerable Model Context Protocol (DVMCP) is an educational project designed to demonstrate security vulnerabilities in MCP implementations. It contains 10 challenges of increasing difficulty that showcase different types of vulnerabilities and attack vectors.

This project is intended for security researchers, developers, and AI safety professionals to learn about potential security issues in MCP implementations and how to mitigate them.

What is MCP?

The Model Context Protocol (MCP) is a standardized protocol that allows applications to provide context for Large Language Models (LLMs) in a structured way. It separates the concerns of providing context from the actual LLM interaction, enabling applications to expose resources, tools, and prompts to LLMs.

CLINE - VSCode Extension
Refer to this Connecting to a Remote Server - Cline for connecting Cline with MCP server

Quick Start

Once you have cloned the repository, run the following commands:

docker build -t dvmcp .
docker run -p 9001-9010:9001-9010 dvmcp

Disclaimer

It’s not stable in a Windows environment. If you don’t want to use Docker then please use Linux environment. I recommend Docker to run the LAB and I am 100% percent sure it works well in the Docker environment

Security Risks

While MCP provides many benefits, it also introduces new security considerations. This project demonstrates various vulnerabilities that can occur in MCP implementations, including:

  1. Prompt Injection: Manipulating LLM behavior through malicious inputs
  2. Tool Poisoning: Hiding malicious instructions in tool descriptions
  3. Excessive Permissions: Exploiting overly permissive tool access
  4. Rug Pull Attacks: Exploiting tool definition mutations
  5. Tool Shadowing: Overriding legitimate tools with malicious ones
  6. Indirect Prompt Injection: Injecting instructions through data sources
  7. Token Theft: Exploiting insecure token storage
  8. Malicious Code Execution: Executing arbitrary code through vulnerable tools
  9. Remote Access Control: Gaining unauthorized system access
  10. Multi-Vector Attacks: Combining multiple vulnerabilities

Project Structure

damn-vulnerable-MCP-server/
├── README.md                 # Project overview
├── requirements.txt          # Python dependencies
├── challenges/               # Challenge implementations
│   ├── easy/                 # Easy difficulty challenges (1-3)
│   │   ├── challenge1/       # Basic Prompt Injection
│   │   ├── challenge2/       # Tool Poisoning
│   │   └── challenge3/       # Excessive Permission Scope
│   ├── medium/               # Medium difficulty challenges (4-7)
GitHub で README 全文を見る

インストール

docker run -p 9001-9010:9001-9010 dvmcp
MCP 初心者?mcpskill.org のガイドから始めましょう →