Token导航 LogoToken导航TokenDH.com
Reversecore MCP logo
安全风控stdio官方级别未说明来源级核验

Reversecore MCP

MCP Server

Reversecore_MCP是一款企业级AI逆向工程服务器,支持通过自然语言命令进行全面的二进制分析,适用于恶意软件分析、固件安全研究和漏洞检测。

工具数

32

提示词数

0

GitHub Stars

59

资源数

0
逆向工程PythonCursorCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

sjkim1127

提供方

sjkim1127

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -r requirements-dev.txt

详细介绍

Reversecore_MCP

Icon

![License: MIT](https://opensource.org/licenses/MIT) ](https://www.python.org/downloads/) ![FastMCP](https://github.com/jlowin/fastmcp) ](https://www.docker.com/) ![Tests](tests/) ![Coverage](htmlcov/)

![Watch the Demo](https://youtu.be/wJGW2bp3c5A)

🇰🇷 韩语(Korean)

用于人工智能驱动的逆向工程的企业级MCP(模型上下文协议)服务器。使人工智能代理能够通过自然语言命令执行全面的二进制分析。

📋 先决条件

Ghidra(反编译所需)

高级反编译功能需要Ghidra。安装脚本会自动将Ghidra安装到 /Tools 目录。

选项1:自动安装(推荐)

# Windows (PowerShell)
.\scripts\install-ghidra.ps1

# With custom version/path (optional)
.\scripts\install-ghidra.ps1 -Version "11.4.3" -InstallDir "C:\CustomPath"
# Linux/macOS
chmod +x ./scripts/install-ghidra.sh
./scripts/install-ghidra.sh

# With custom version/path (optional)
./scripts/install-ghidra.sh -v 11.4.3 -d /custom/path

脚本的作用:

  • 从GitHub下载Ghidra 11.4.3(约400MB)
  • 摘录至 `

/Tools/ghidra_11.4.3_PUBLIC_YYYYMMDD`

  • 集合 GHIDRA_INSTALL_DIR 环境变量
  • 更新项目 .env 文件

选项2:手动安装

  1. 下载: Ghidra 11.4.3
  2. 提取 到 `

/Tools/` 或任何目录

  1. 设置环境变量:
   # Linux/macOS (~/.bashrc or ~/.zshrc)
   export GHIDRA_INSTALL_DIR=/path/to/ghidra_11.4.3_PUBLIC_YYYYMMDD

   # Windows (PowerShell - permanent)
   [Environment]::SetEnvironmentVariable("GHIDRA_INSTALL_DIR", "C:\path\to\ghidra", "User")

或添加到 .env 文件(复制自 .env.example)

⚠️ 备注:Ghidra需要JDK 17+。下载自 艾多普蒂姆 如果需要的话。

🚀 快速开始

Docker(推荐)

# Auto-detect architecture (Intel/AMD or Apple Silicon)
./scripts/run-docker.sh

# Or manually:
# Intel/AMD
docker compose --profile x86 up -d

# Apple Silicon (M1/M2/M3/M4)
docker compose --profile arm64 up -d

MCP客户端配置(游标AI)

第一步:构建Docker镜像

统一的Dockerfile会自动检测您的系统架构:

# Automatic architecture detection (works for all platforms)
docker build -t reversecore-mcp:latest .

# Or use the convenience script
./scripts/run-docker.sh

步骤2:配置MCP客户端

添加 ~/.cursor/mcp.json:

🍎 macOS (All Processors)

{
  "mcpServers": {
    "reversecore": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "/Users/YOUR_USERNAME/Reversecore_Workspace:/app/workspace",
        "-e", "REVERSECORE_WORKSPACE=/app/workspace",
        "-e", "MCP_TRANSPORT=stdio",
        "reversecore-mcp:latest"
      ]
    }
  }
}

🐧 Linux

{
  "mcpServers": {
    "reversecore": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "/path/to/workspace:/app/workspace",
        "-e", "REVERSECORE_WORKSPACE=/app/workspace",
        "-e", "MCP_TRANSPORT=stdio",
        "reversecore-mcp:latest"
      ]
    }
  }
}

🪟 Windows

{
  "mcpServers": {
    "reversecore": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "C:/Reversecore_Workspace:/app/workspace",
        "-e", "REVERSECORE_WORKSPACE=/app/workspace",
        "-e", "MCP_TRANSPORT=stdio",
        "reversecore-mcp:latest"
      ]
    }
  }
}
⚠️ 重要提示:Docker中的文件路径使用 MCP服务器在Docker容器内运行。当使用分析工具时, 仅使用文件名,而不是完整的本地路径. | ❌ 错了|✅ 正确| |----------|-----------| | run_file("/Users/john/Reversecore_Workspace/sample.exe") | run_file("sample.exe") | 为什么? 您的本地路径(例如。, /Users/.../Reversecore_Workspace/)安装到 /app/workspace/ 在容器内。工具会自动在工作区目录中查找文件。 提示: 使用 list_workspace() 查看工作区中的所有可用文件。

✨ 主要特点

🔍 静态分析

全面的文件分析和元数据提取:

  • 文件类型检测:识别二进制格式、体系结构和编译器信息(run_file)
  • 串提取:提取具有可配置限制的ASCII/Unicode字符串(run_strings)
  • 固件分析:深度扫描嵌入式文件和签名(run_binwalk)
  • 二进制解析:使用LIEF解析PE/ELF/Mach-O头文件和部分(parse_binary_with_lief)

⚙️ 拆卸和反编译

使用智能工具进行多架构二进制分析:

  • 雷达2集成:具有连接池的完整r2命令访问权限(run_radare2, Radare2_disassemble)
  • Ghidra反编译:使用16GB JVM堆进行企业级反编译(smart_decompile, get_pseudo_code)
  • 多架构支持:x86、x86-64、ARM、ARM64、MIPS、通过Capstone的PowerPC(disassemble_with_capstone)
  • 智能回退:自动Ghidra优先,r2回退策略以获得最佳结果

🧬 高级分析

深入的代码分析和行为理解:

  • 交叉参考分析:跟踪函数调用、数据引用和控制流(analyze_xrefs)
  • 结构恢复:根据指针算法和内存访问模式推断数据结构(recover_structures)
  • 仿真:用于动态行为分析的基于ESIL的代码仿真(emulate_machine_code)
  • 二进制比较:区分二进制文件和匹配库函数(diff_binaries, match_libraries)

🦠 恶意软件分析与防御

用于威胁检测和缓解的专用工具:

  • 休眠威胁检测:查找隐藏的后门、孤立函数和逻辑炸弹(dormant_detector)
  • IOC提取:自动提取IP、URL、域、电子邮件、哈希和加密地址(extract_iocs)
  • YARA扫描:使用自定义规则进行基于模式的恶意软件检测(run_yara)
  • 适应性疫苗:生成防御措施(YARA规则、二进制补丁、NOP注入)(adaptive_vaccine)
  • 漏洞猎人:检测危险的API模式并利用路径(vulnerability_hunter)

📊 服务器运行状况和监控

用于企业环境的内置可观察性工具:

  • 健康检查:监控正常运行时间、内存使用情况和操作状态(get_server_health)
  • 性能指标:跟踪工具执行时间、错误率和调用次数(get_tool_metrics)
  • 自动恢复:针对瞬态故障的指数回退自动重试机制

🖥️ Web仪表板(新)

无LLM的二进制分析可视化界面:

# Start server in HTTP mode
MCP_TRANSPORT=http MCP_API_KEY=your-secret-key python server.py

# Access dashboard
open http://localhost:8000/dashboard/

特征:

  • 概述:包含上传统计信息的文件列表
  • 分析:函数列表,反汇编查看器
  • 国际奥委会:提取的URL、IP、电子邮件、字符串

安全:

  • 通过HTML净化保护XSS
  • 路径遍历预防
  • API密钥身份验证(可选)

📝 报告生成(v3.1)

生成具有准确时间戳的专业恶意软件分析报告:

  • 一次性提交:使用单个命令生成标准化的JSON报告(generate_malware_submission)
  • 会话跟踪:使用自动持续时间计算开始/结束分析会话(start_analysis_session, end_analysis_session)
  • IOC收藏:在分析过程中收集和组织指标(add_session_ioc)
  • MITRE ATT&CK 地图:使用适当的框架参考来记录技术(add_session_mitre)
  • 电子邮件投递:使用SMTP支持直接向安全团队发送报告(send_report_email)
  • 多个模板:全面分析、快速分诊、国际奥委会总结、执行简报
# Example 1: One-Shot JSON Submission
generate_malware_submission(
    file_path="wannacry.exe",
    analyst_name="Hunter",
    tags="ransomware,critical"
)

# Example 2: Interactive Session Workflow
get_system_time()
start_analysis_session(sample_path="malware.exe")
add_session_ioc("ips", "192.168.1.100")
add_session_mitre("T1059.001", "PowerShell", "Execution")
end_analysis_session(summary="Ransomware detected")
create_analysis_report(template_type="full_analysis")
send_report_email(to="security-team@company.com")

⚡ 性能和可靠性(v3.1)

  • 资源管理:

- 僵尸杀手:保证子流程终止 try...finally 块 - 内存保护:严格限制2MB strings 输出以防止OOM - 碰撞隔离:LIEF解析器在隔离进程中运行,以安全地处理分段错误

  • 优化:

- 动态超时:随文件大小自动缩放(基本+2s/MB,最大+600s) - Ghidra JVM:现代系统的16GB堆(24-32GB RAM) - 水槽意识修剪:39个用于智能路径优先级排序的危险接收器API - 轨迹深度优化:从3个减少到2个,以加快执行路径分析

  • 基础设施:

- 无状态报告:无全局状态突变的时区感知报告 - 稳健的检索:装饰器现在可以正确传播异常以进行自动恢复 - 配置驱动:验证限制与中央配置同步

🛠️ 核心工具

类别工具
文件操作list_workspace, get_file_info
静态分析run_file, run_strings, run_binwalk
反汇编run_radare2, Radare2_disassemble, disassemble_with_capstone
反编译smart_decompile, get_pseudo_code
高级分析analyze_xrefs, recover_structures, emulate_machine_code
二进制解析parse_binary_with_lief
二进制比较diff_binaries, match_libraries
恶意软件分析dormant_detector, extract_iocs, run_yara, adaptive_vaccine, vulnerability_hunter
报告生成get_system_time, set_timezone, start_analysis_session, add_session_ioc, add_session_mitre, end_analysis_session, create_analysis_report, send_report_email, generate_malware_submission
服务器管理get_server_health, get_tool_metrics

📊 分析工作流

📥 Upload → 🔍 Triage → 🔗 X-Refs → 🏗️ Structures → 📝 Decompile → 🛡️ Defense

使用内置提示进行引导分析:

  • full_analysis_mode -全面的恶意软件分析 6阶段专家推理 证据分类
  • basic_analysis_mode -快速分诊,快速进行初步评估
  • game_analysis_mode -带有作弊检测指导的游戏客户端分析
  • firmware_analysis_mode -以嵌入式系统为重点的物联网/固件安全分析
  • report_generation_mode -使用MITRE ATT&CK映射的专业报告生成工作流程
💡 人工智能推理增强分析提示使用专家角色启动、思维链检查点、结构化推理阶段和证据分类(观察/推断/可能)来最大限度地提高人工智能分析能力,并确保完整的文档记录。

🏗️ 建筑

reversecore_mcp/
├── core/                           # Infrastructure & Services
│   ├── config.py                   # Configuration management
│   ├── ghidra.py, ghidra_manager.py, ghidra_helper.py  # Ghidra integration (16GB JVM)
│   ├── r2_helpers.py, r2_pool.py   # Radare2 connection pooling
│   ├── security.py                 # Path validation & input sanitization
│   ├── result.py                   # ToolSuccess/ToolError response models
│   ├── metrics.py                  # Tool execution metrics
│   ├── report_generator.py         # Report generation service
│   ├── plugin.py                   # Plugin interface for extensibility
│   ├── decorators.py               # @log_execution, @track_metrics
│   ├── error_handling.py           # @handle_tool_errors decorator
│   ├── logging_config.py           # Structured logging setup
│   ├── memory.py                   # AI memory store (async SQLite)
│   ├── mitre_mapper.py             # MITRE ATT&CK framework mapping
│   ├── resource_manager.py         # Subprocess lifecycle management
│   └── validators.py               # Input validation
│
├── tools/                          # MCP Tool Implementations
│   ├── analysis/                   # Basic analysis tools
│   │   ├── static_analysis.py      # file, strings, binwalk
│   │   ├── lief_tools.py           # PE/ELF/Mach-O parsing
│   │   ├── diff_tools.py           # Binary comparison
│   │   └── signature_tools.py      # YARA scanning
│   │
│   ├── radare2/                    # Radare2 integration
│   │   ├── r2_analysis.py          # Core r2 analysis
│   │   ├── radare2_mcp_tools.py    # Advanced r2 tools (CFG, ESIL)
│   │   └── r2_session.py           # Session management
│   │
│   ├── ghidra/                     # Ghidra decompilation
│   │   ├── decompilation.py        # smart_decompile, pseudo-code
│   │   └── ghidra_tools.py         # Structure/Enum management
│   │
│   ├── malware/                    # Malware analysis & defense
│   │   ├── dormant_detector.py     # Hidden threat detection
│   │   ├── adaptive_vaccine.py     # Defense generation
│   │   ├── vulnerability_hunter.py # Vulnerability detection
│   │   ├── ioc_tools.py            # IOC extraction
│   │   └── yara_tools.py           # YARA rule management
│   │
│   ├── common/                     # Cross-cutting concerns
│   │   ├── file_operations.py      # Workspace file management
│   │   ├── server_tools.py         # Health checks, metrics
│   │   └── memory_tools.py         # AI memory operations
│   │
│   └── report/                     # Report generation (v3.1)
│       ├── report_tools.py         # Core report engine
│       ├── report_mcp_tools.py     # MCP tool registration
│       ├── session.py              # Analysis session tracking
│       └── email.py                # SMTP integration
│
├── prompts.py                      # AI reasoning prompts (5 modes)
├── resources.py                    # Dynamic MCP resources (reversecore:// URIs)
└── server.py                       # FastMCP server initialization & HTTP setup

🐳 Docker部署

多架构支持

统一 Dockerfile 自动检测您的系统架构:

架构自动检测支持
x86_64(英特尔/AMD)全力支持
ARM64(苹果硅M1-M4)全力支持

运行命令

# Using convenience script (auto-detects architecture)
./scripts/run-docker.sh              # Start
./scripts/run-docker.sh stop         # Stop
./scripts/run-docker.sh logs         # View logs
./scripts/run-docker.sh shell        # Shell access

# Manual Docker build (works for all architectures)
docker build -t reversecore-mcp:latest .

# Or using Docker Compose
docker compose up -d

环境变量

变量默认值描述
“MCP_TRANSPORT”“http”传输模式(“stdio”或“http”)
\REVERSECORE_WORKSPACE\\/app/WORKSPACE\分析工作空间路径
\LOGLEVEL \\INFO \日志记录级别
\GHIDRA_INSTALL_DIR\\/opt/GHIDRA\GHIDRA安装路径

🔒 安全

  • 无外壳注射:所有子流程调用都使用列表参数
  • 路径验证:工作区限制文件访问
  • 输入净化:所有参数均已验证
  • 速率限制:可配置的请求限制(HTTP模式)
  • CI检查Bandit(静态分析)、pip审计(依赖漏洞)、Gitleaks(机密)

🧪 发展

# Install dependencies
pip install -r requirements-dev.txt

# Run tests
pytest tests/ -v

# Run with coverage
pytest tests/ --cov=reversecore_mcp --cov-fail-under=54

# Code quality
ruff check reversecore_mcp/
black reversecore_mcp/

测试状态

  • 通过700+测试 (单元+集成)
  • 📊 55%的覆盖率 (CI中强制执行的最低54%)
  • ⏱️ Bandit安全扫描、pip审计依赖性检查、pytest

📚 API 参考

工具响应格式

所有工具返回结构化的“ToolResult”:

{
  "status": "success",
  "data": "...",
  "metadata": { "bytes_read": 1024 }
}
{
  "status": "error",
  "error_code": "VALIDATION_ERROR",
  "message": "File not found",
  "hint": "Check file path"
}

常见错误代码

代码描述
\VALIDATION_ERROR\输入参数无效
“超时”操作超出时间限制
“PARSE_ERROR”解析工具输出失败
\TOOL_NOT_FOUND\缺少必需的CLI工具

💻 系统要求

组件最小值推荐
中央处理器4芯8+芯
随机存取存储器16gb32Gb
存储512 GB SSD1 TB NVMe
操作系统Linux/macOSDocker环境

🤝 贡献

  1. 分叉存储库
  2. 创建要素分支
  3. 通过测试进行更改
  4. 运行“pytest”和“ruff check”\`
  5. 提交拉取请求

📄 许可证

MIT许可证-请参阅 许可证 了解详情。

🔗 链接

目录标签

目录标签

逆向工程PythonCursor本地部署二进制分析恶意软件分析固件安全漏洞检测

支持客户端

Cursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

session

工具数量(toolCount,工具数)

32

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiosession部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP