Skip to main content
Glama

mythic-mcp

Mythic C2 프레임워크를 MCP 서버로 노출하여 LLM(Claude 등)이 대화형으로 에이전트를 운영하고, 작업을 발행하며, 플랫폼 데이터를 조회할 수 있도록 합니다.

기능

  • 에이전트 관리 — 활성 콜백을 전체 세부 정보와 함께 나열, 개별 에이전트 검사, 에이전트 종료, 수면 타이머 변경

  • 작업 실행 — 셸 명령, 파일 읽기/다운로드/업로드, mimikatz, make_token, 모든 Mythic 명령을 위한 일반 디스패처

  • 플랫폼 데이터 — 자격 증명 저장소, 아티팩트 로그, 이벤트 로그, 파일 브라우저, 페이로드 목록, C2 프로필 상태

  • 구조화된 응답 — 모든 도구는 신뢰할 수 있는 LLM 파싱을 위해 {"status":"ok","data":...} 또는 {"status":"error","message":...}를 반환합니다.

  • 내장 프롬프트 — start_pentest 및 start_recon 프롬프트 템플릿

Related MCP server: caldera-mcp

요구 사항

  • Python 3.10+

  • uv 패키지 관리자

  • 실행 중인 Mythic 서버 (v3.x+)

설치

git clone <this-repo>
cd mythic-mcp
uv sync

실행

위치 인수

uv run main.py <username> <password> [host] [port]
uv run main.py mythic_admin mythic_admin_password localhost 7443

환경 변수

export MYTHIC_USERNAME=mythic_admin
export MYTHIC_PASSWORD=mythic_admin_password
export MYTHIC_HOST=localhost
export MYTHIC_PORT=7443
uv run main.py

TLS 없이

uv run main.py mythic_admin password localhost 7443 --no-ssl

서버가 출력 없이 조용히 시작되면 정상 작동 중입니다. MCP 메시지를 위해 stdio를 기다립니다.

Claude Desktop에 연결

설정 파일 찾기:

OS

경로

Linux

~/.config/Claude/claude_desktop_config.json

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

먼저 uv 경로를 확인하세요:

which uv

mcpServers 아래에 항목을 추가하세요:

{
  "mcpServers": {
    "mythic_mcp": {
      "command": "/home/user/.local/bin/uv",
      "args": [
        "--directory",
        "/path/to/mythic-mcp",
        "run",
        "main.py"
      ],
      "env": {
        "MYTHIC_USERNAME": "mythic_admin",
        "MYTHIC_PASSWORD": "mythic_admin_password",
        "MYTHIC_HOST": "localhost",
        "MYTHIC_PORT": "7443"
      }
    }
  }
}

Claude Desktop을 완전히 종료하고 다시 실행하세요. 서버가 연결되면 채팅 UI의 도구 아이콘에 등록된 모든 도구가 표시됩니다.

도구

에이전트 / 콜백 관리

도구

설명

get_all_agents()

모든 활성 콜백을 전체 세부 정보(OS, 아키텍처, PID, IP, 수면, 프로세스, 페이로드 유형 등)와 함께 나열

get_agent_details(agent_id)

표시 ID로 단일 에이전트의 전체 세부 정보

kill_agent(agent_id)

Mythic에서 에이전트를 비활성으로 표시

set_sleep(agent_id, interval, jitter)

수면 간격(초) 및 지터(%) 변경

작업 실행

도구

설명

run_shell_command(agent_id, command_line)

에이전트의 기본 인터프리터를 통해 셸 명령 실행

read_file(agent_id, file_path)

대상에서 파일 읽기 (cat 사용)

download_file(agent_id, file_path)

파일을 다운로드하고 base64로 반환

upload_file(agent_id, file_name, remote_path, content_b64)

base64로 인코딩된 파일을 대상에 업로드

run_as_user(agent_id, username, password)

make_token — 다른 사용자로 네트워크 호출을 위한 인증

execute_mimikatz(agent_id, mimikatz_arguments)

mimikatz 실행 (예: sekurlsa::logonpasswords)

execute_command(agent_id, command_name, parameters)

일반 디스패처 — 이름으로 모든 Mythic 명령

플랫폼 데이터

도구

설명

get_credentials()

Mythic 자격 증명 저장소의 모든 자격 증명

get_artifacts(limit)

아티팩트 로그 (파일, 레지스트리 키, 생성된 프로세스)

get_event_log(limit)

작업 이벤트 로그

browse_files(agent_id, path)

대상 디렉토리의 파일 브라우저 항목

list_payloads()

빌드 상태 및 C2 프로필을 포함한 삭제되지 않은 모든 페이로드

list_c2_profiles()

실행 상태를 포함한 모든 C2 프로필

프롬프트

프롬프트

설명

start_pentest(threat_actor, objective)

Claude가 특정 위협 행위자를 목표를 향해 모방하도록 설정

start_recon()

Claude가 모든 활성 에이전트에서 초기 정찰을 수행하도록 설정

Claude에서의 사용 예시

Use the start_recon prompt.
List all active agents, then run whoami on agent 1.
Download /etc/passwd from agent 2 and show me its contents.
Run mimikatz sekurlsa::logonpasswords on agent 3.
Use execute_command to run 'ps' on agent 1 with parameters {"host": "."}.

아키텍처

Claude Desktop
     │  MCP stdio
     ▼
main.py  (FastMCP tools + prompts)
     │
     ▼
lib/mythic_api.py  (MythicAPI class)
     ├─ mythic Python library  →  Mythic GraphQL/REST API
     └─ httpx (raw GraphQL)   →  Mythic GraphQL endpoint

모든 작업 호출은 60초 타임아웃으로 asyncio.wait_for를 사용합니다. GraphQL 요청은 Mythic의 자체 서명 인증서를 처리하기 위해 TLS 검증을 건너뜁니다 (verify=False).

환경 변수 참조

변수

기본값

설명

MYTHIC_USERNAME

—

Mythic 운영자 사용자 이름 (필수)

MYTHIC_PASSWORD

—

Mythic 운영자 비밀번호 (필수)

MYTHIC_HOST

localhost

Mythic 서버 호스트명 또는 IP

MYTHIC_PORT

7443

Mythic 서버 포트

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers