macOS红队任务服务器

Hermes Mythic MCP是一个暴露Hermes Mythic C2任务的服务器,用于自主侦察和macOS红队操作,提供上下文枚举、进程/应用列表、权限检查和文件操作等功能。

  • by null-event
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 null-event/hermes_mythic_mcp

使用说明

赫尔墨斯神话MCP

这是一个MCP服务器,它公开了Hermes Mythic C2任务,用于自主侦察和macOS红队行动。所包含的工具侧重于macOS Hermes代理操作,如上下文枚举、进程/应用程序列表、权限检查和文件操作。

需求

  • uv 和 python3
  • 安装了Hermes代理配置文件的可访问Mythic服务器的凭据
  • MCP客户端(如TRAE、Claude Desktop等)

TRAE/光标/克劳德/等配置

{
  "mcpServers": {
    "hermes_mythic_mcp": {
      "command": "/Users/<you>/.local/bin/uv",
      "args": [
        "--directory",
        "/full/path/to/hermes_mythic_mcp/",
        "run",
        "main.py",
        "<mythic_admin>",
        "<mythic_password>",
        "<mythic_host>",
        "<mythic_port>"
      ]
    }
  }
}

提示

  • start_pentest(threat_actor, objective)
  • start_recon()

这些提示为LLM添加了上下文,并在 main.py.

可用工具

所有工具定义见 main.py 并通过以下方式呼叫Mythic lib/mythic_api.py.

  • get_all_payloads --列出Mythic中注册的所有有效载荷
  • get_all_agents --列出当前活动的回调/代理
  • read_file(agent_id, file_path) -通过Mythic API读取目标上的文件
  • run_shell_command(agent_id, command_line) --执行shell命令
  • upload_file(agent_id, file_name, remote_path, content) --上传文件(base64内容)
  • get_env(agent_id, command) --返回会话的环境变量
  • fda_check(agent_id, command) --检查完整磁盘访问权限(FDA)
  • accessibility_check(agent_id, command) --使用AXIsProcessTrusted()确定辅助功能权限
  • get_execution_context(agent_id, command) --读取环境变量以确定有效负载执行上下文
  • ifconfig(agent_id, command) --枚举IP地址信息
  • list_apps(agent_id, command) --使用NSApplication列出正在运行的应用程序。运行应用程序
  • list_processes(agent_id, command) --枚举正在运行的进程
  • take_screenshot(agent_id, command) --截图(需要屏幕录制权限)
  • tcc_folder_checker(agent_id, command) --使用mdquery探测TCC保护的文件夹
  • whoami(agent_id, command) --报告当前用户上下文

笔记:

  • 大多数工具都期望 agent_id 以及a command string(通常是一个简单的标签,如 "env" 或 "ps").

典型侦察工作流程

  1. get_all_agents --识别活动代理ID
  2. whoami 和 get_execution_context --建立用户和主机应用程序
  3. get_env 和 ifconfig --收集环境和网络上下文
  4. list_processes 和 list_apps --库存流程和应用程序
  5. fda_check, accessibility_check, tcc_folder_checker --验证TCC权限和文件夹访问权限

数据处理

工具输出以纯文本或类似JSON的字符串形式返回,用分隔符包裹,便于MCP客户端解析。

致谢