GM

gh05tcrew/metasploitmcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

750 stars 213 forks 품질 74 트렌드 21Apache-2.0

메타스플로이트용 MCP 서버

개요

Metasploit Framework 통합을 위한 모델 컨텍스트 프로토콜(MCP) 서버입니다. https://github.com/user-attachments/assets/39b19fb5-8397-4ccd-b896-d1797ec185e1 이 MCP 서버는 Claude와 같은 대형 언어 모델과 Metasploit Framework 침투 테스트 플랫폼 간의 다리 역할을 합니다. AI 어시스턴트가 표준화된 도구를 통해 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

  1. Clone this repository
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. 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:

{
GitHub에서 전체 README 보기

설치

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" } } } }