
gh05tcrew/metasploitmcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Metasploit用MCPサーバー
概要
Metasploit Framework統合のためのモデルコンテキストプロトコル(MCP)サーバーです。 https://github.com/user-attachments/assets/39b19fb5-8397-4ccd-b896-d1797ec185e1 このMCPサーバーは、Claudeのような大規模言語モデルとMetasploit Frameworkのペネトレーションテストプラットフォームをつなぐ架け橋を提供します。AIアシスタントが標準化されたツールを通じてMetasploitの機能に動的にアクセスし制御できるようになり、複雑なセキュリティテストワークフローへの自然言語インターフェースを可能にします。 - : 利用可能なMetasploitエクスプロイトモジュールの検索およびリスト- : オプションのプラットフォームおよびアーキテクチャフィルタリング機能を備えた利用可能なMetasploitペイロードモジュールの検索およびリスト - : ターゲットに対して先にチェックを実行するオプションを持つエクスプロイトを設定し実行 - : カスタムオプションを持つ任意のMetasploit補助モジュールを実行する - : 既存セッションに対してエクスプロイテーション後のモジュールを実行する - : Metasploit RPCを用いてペイロードファイルを生成(ローカルでファイルを保存) - : 詳細な情報を含む現在のMetasploitセッションを表示する - :...
概要(AI 翻訳)
Metasploit Framework統合のためのモデルコンテキストプロトコル(MCP)サーバーです。
https://github.com/user-attachments/assets/39b19fb5-8397-4ccd-b896-d1797ec185e1
説明
このMCPサーバーは、Claudeのような大規模言語モデルとMetasploit Frameworkのペネトレーションテストプラットフォームをつなぐ架け橋を提供します。AIアシスタントが標準化されたツールを通じてMetasploitの機能に動的にアクセスし制御できるようになり、複雑なセキュリティテストワークフローへの自然言語インターフェースを可能にします。
特徴
モジュール情報
- list_exploits:利用可能なMetasploitエクスプロイトモジュールの検索およびリスト
- list_payloads:オプションのプラットフォームおよびアーキテクチャフィルタリング付き、利用可能なMetasploitペイロードモジュールの検索・リスト
エクスプロイテーションワークフロー
- run_exploit:ターゲットに対してエクスプロイトを設定し実行し、先にチェックを実行するオプションを付与します
- run_auxiliary_module:カスタムオプションで任意のMetasploit補助モジュールを動かす
- run_post_module:既存セッションに対してポストエクスプロイテーションモジュールを実行します
ペイロード生成
- generate_payload:Metasploit RPCを使ってペイロードファイルを生成(ローカルにファイルを保存)
セッションマネジメント
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Metasploit MCP Server
A Model Context Protocol (MCP) server for Metasploit Framework integration.
https://github.com/user-attachments/assets/39b19fb5-8397-4ccd-b896-d1797ec185e1
Description
This MCP server provides a bridge between large language models like Claude and the Metasploit Framework penetration testing platform. It allows AI assistants to dynamically access and control Metasploit functionality through standardized tools, enabling a natural language interface to complex security testing workflows.
Features
Module Information
- list_exploits: Search and list available Metasploit exploit modules
- list_payloads: Search and list available Metasploit payload modules with optional platform and architecture filtering
Exploitation Workflow
- run_exploit: Configure and execute an exploit against a target with options to run checks first
- run_auxiliary_module: Run any Metasploit auxiliary module with custom options
- run_post_module: Execute post-exploitation modules against existing sessions
Payload Generation
- generate_payload: Generate payload files using Metasploit RPC (saves files locally)
Session Management
- list_active_sessions: Show current Metasploit sessions with detailed information
- send_session_command: Run a command in an active shell or Meterpreter session
- terminate_session: Forcefully end an active session
Handler Management
- list_listeners: Show all active handlers and background jobs
- start_listener: Create a new multi/handler to receive connections
- stop_job: Terminate any running job or handler
Prerequisites
- Metasploit Framework installed and msfrpcd running
- Python 3.10 or higher
- Required Python packages (see requirements.txt)
Installation
- Clone this repository
- Install dependencies:
pip install -r requirements.txt - Configure environment variables (optional):
MSF_PASSWORD=yourpassword MSF_SERVER=127.0.0.1 MSF_PORT=55553 MSF_SSL=false PAYLOAD_SAVE_DIR=/path/to/save/payloads # Optional: Where to save generated payloads
Usage
Start the Metasploit RPC service:
msfrpcd -P yourpassword -S -a 127.0.0.1 -p 55553
Transport Options
The server supports two transport methods:
- HTTP/SSE (Server-Sent Events): Default mode for interoperability with most MCP clients
- STDIO (Standard Input/Output): Used with Claude Desktop and similar direct pipe connections
You can explicitly select the transport mode using the --transport flag:
# Run with HTTP/SSE transport (default)
python MetasploitMCP.py --transport http
# Run with STDIO transport
python MetasploitMCP.py --transport stdio
Additional options for HTTP mode:
python MetasploitMCP.py --transport http --host 0.0.0.0 --port 8085
Claude Desktop Integration
For Claude Desktop integration, configure claude_desktop_config.json:
{
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"metasploit": {
"command": "uv",
"args": [
"--directory",
"C:\\path\\to\\MetasploitMCP",
"run",
"MetasploitMCP.py",
"--transport",
"stdio"
],
"env": {
"MSF_PASSWORD": "yourpassword"
}
}
}
}