Skip to content
Back to search

wpegpt-analyzer

SkillWorks with Claude CodeGitHub

驱动 IDA 配合 WPeGPT 插件对二进制可执行文件(PE/ELF)进行自动化逆向分析,输出包含程序用途、网络 IoC、可疑函数及漏洞评估的结构化报告。

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/wpeace-hch--wpegpt-analyzer/badge.svg)](/listings/wpeace-hch--wpegpt-analyzer)

HTML

<a href="/listings/wpeace-hch--wpegpt-analyzer"><img src="/api/listings/wpeace-hch--wpegpt-analyzer/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 133 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: wpegpt-analyzer
  3. description: 驱动 IDA 配合 WPeGPT 插件对二进制可执行文件(PE/ELF)进行自动化逆向分析,输出包含程序用途、网络 IoC、可疑函数及漏洞评估的结构化报告。
  4. ---
  5. # wpegpt-analyzer
  6. 驱动 IDA 配合 WPeGPT AI 插件,对二进制可执行文件进行自动化逆向分析。支持 PE 和 ELF 格式,提供三种分析模式:light(轻量分析)、full(深度分析)、vuln(漏洞评估)。
  7. ## 何时使用
  8. 当用户要求以下操作时使用此技能:
  9. - 分析二进制可执行文件(`.exe`、`.dll`、`.elf` 等)
  10. - 了解一个程序的功能和用途
  11. - 进行逆向工程或恶意软件分析
  12. - 从二进制文件中提取网络 IoC(入侵指标)
  13. - 检查二进制文件是否存在漏洞或安全问题
  14. ## 何时不使用
  15. - 静态文件查看(使用通用文件读取工具即可)
  16. - 非二进制可执行文件分析
  17. ## 分析模式
  18. | 模式 | 触发关键词 | 适用场景 |
  19. |------|-----------|----------|
  20. | `light`(默认) | 分析、看一下、了解用途、有什么功能、逆向、analyze | 轻量分析:程序用途、网络地址、可疑函数(约 2-5 分钟) |
  21. | `full` | 深度分析、全面分析、详细分析、deep analysis | 全量分析:所有函数的完整功能分析(约 10-30 分钟) |
  22. | `vuln` | 漏洞、漏洞分析、找漏洞、安全检查、安全审计、vuln、exp | 漏洞评估:高危函数、漏洞类型、风险等级(约 5-20 分钟) |
  23. 根据用户请求的语义自动选择模式。用户仅说"分析一下"或普通描述时,默认使用 `light` 模式。
  24. ## 操作步骤
  25. ### 1. 检查配置
  26. 读取 `./config/config.ini`。如果文件不存在或 `ida_dir` 为空,询问用户 IDA 的安装路径,然后创建该文件:
  27. ```ini
  28. [paths]
  29. ida_dir=<用户提供>
  30. python_path=<可选,Python 已在系统 PATH 中时可留空>
  31. ```
  32. 在继续之前验证以下依赖:
  33. - `<ida_dir>\ida.exe` 必须存在
  34. - `<ida_dir>\plugins\WPeGPT.py` 必须存在
  35. - `<ida_dir>\plugins\WPeGPT_Config\config.py` 必须存在
  36. - `<ida_dir>\plugins\WPeGPT_Config\wpe_ai_controller.py` 必须存在
  37. - Python 可用(已在 `./config/config.ini` 配置 `python_path` 路径或在系统 PATH 中)
  38. 任一依赖缺失时,停止分析并报告缺失项。
  39. ### 2. 确认文件路径
  40. 确认用户指定的待分析二进制文件存在。如果不存在,询问用户正确路径。
  41. ### 3. 执行分析
  42. 运行 PowerShell 分析脚本:
  43. ```bash
  44. powershell -NoProfile -File "./scripts/wpegpt_analyze.ps1" -BinaryPath "<binary_path>" -Mode "<mode>"
  45. ```
  46. 模式可选:`light`(默认)、`full`、`vuln`。
  47. **重要:** 始终使用 `powershell -NoProfile -File` 调用 `.ps1` 脚本。**不要**使用 `cmd.exe /c` 调用 `.bat` 脚本,在该环境下输出会被截断。
  48. 脚本将自动完成以下步骤:
  49. 1. 解析配置文件并验证所有依赖
  50. 2. 检测 32 位或 64 位架构(PE 头 Machine Type 或 ELF class)
  51. 3. 选择对应的 IDA 可执行文件(`ida.exe` 或 `ida64.exe`)
  52. 4. 以无头模式(`-A`)启动 IDA,WPeGPT 插件自动加载
  53. 5. 轮询等待 WPeServer TCP 端口文件就绪
  54. 6. 运行 `wpe_ai_controller.py` 通过 TCP 驱动分析
  55. 7. 分析完成后自动退出
  56. ### 4. 输出结果
  57. 报告保存在二进制文件同级目录下:`<binary_dir>/<文件名>_WPeAI_Results/`
  58. 读取生成的 Markdown 报告,向用户总结:
  59. - **程序用途**:AI 综合判定的程序分类和行为特征
  60. - **网络 IoC**:IP、域名、URL、端口(如有网络行为)
  61. - **可疑函数**:数量及关键信息
  62. - **完整报告路径**:`.md` 和 `.json` 报告的位置
  63. `vuln` 模式下,重点突出发现的漏洞类型、风险等级和潜在利用点。
  64. ## 配置
  65. `./config/config.ini`:
  66. ```ini
  67. [paths]
  68. ; IDA 安装目录(必填)
  69. ida_dir=
  70. ; Python 可执行文件路径(可选,Python 已在 PATH 中时可留空)
  71. python_path=
  72. ```
  73. IDA 进行分析时使用的 AI 模型和 API 密钥在 `<ida_dir>\plugins\WPeGPT_Config\config.py` 中配置(不在本技能管理范围内)。
  74. ## 文件结构
  75. ```
  76. wpegpt-analyzer/
  77. ├── SKILL.md # 本文件
  78. ├── config/
  79. │ └── config.ini # 技能配置文件
  80. └── scripts/
  81. ├── wpegpt_analyze.ps1 # PowerShell 启动脚本(推荐)
  82. └── wpegpt_analyze.bat # Batch 启动脚本(备用,仅本地终端使用)
  83. ```
  84. 外部依赖(位于 IDA 安装目录的 plugins 子目录):
  85. ```
  86. <ida_dir>/plugins/
  87. ├── WPeGPT.py # IDA 插件(含 WPeServer TCP 服务)
  88. └── WPeGPT_Config/
  89. ├── config.py # WPeGPT 使用的 AI 模型 / API 配置文件
  90. └── wpe_ai_controller.py # 外部 AI 控制器(驱动 IDA 进行自动化分析)
  91. ```
  92. ## 注意事项
  93. - **非交互模式**:分析流程全自动运行,所有配置必须提前写入 `config.ini`。首次运行时由本技能的"步骤 1"负责交互式创建配置文件。
  94. - **无头模式**:IDA 以最小化方式启动(`-A` 标志)。WPeGPT 插件自动启动 WPeServer,控制器通过 TCP 与其通信。
  95. - **耗时参考**:light 模式约 2-5 分钟,full/vuln 模式约 5-30 分钟(取决于二进制文件大小)。
  96. - **API 密钥**:AI 分析依赖 `WPeGPT_Config/config.py` 中配置的有效 API 凭证。
  97. - **环境清理**:每次运行前自动清理 `%TEMP%` 下的旧端口文件。
README.md · README · 106 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # WPeGPT-Analyzer
  2. 一个可移植的 **SKILL 技能**,驱动 IDA 配合 [WPeGPT](https://github.com/WPeace-HcH/WPeGPT) AI 插件,对二进制可执行文件进行全自动的逆向分析。支持 PE 和 ELF 格式,提供三种分析模式。
  3. > 可被任何支持 SKILL 机制的 AI Agent 加载使用。
  4. ## 功能
  5. 自动启动 IDA 并利用 WPeGPT 插件驱动 AI 进行分析。输出结构化报告,包括:
  6. - **程序用途** — AI 综合判定的程序分类和行为特征
  7. - **网络 IoC** — IP、域名、URL、端口(检测到网络行为时)
  8. - **可疑函数** — 按可疑度排序的函数列表及关键发现
  9. - **漏洞评估** — 带风险等级的漏洞分析(vuln 模式)
  10. ## 分析模式
  11. | 模式 | 说明 | 耗时 |
  12. |------|------|------|
  13. | `light`(默认) | 全局扫描 + 关键路径函数分析 | 2~5 分钟 |
  14. | `full` | 全局扫描 + 关键路径 + 全量函数分析 | 10~30 分钟 |
  15. | `vuln` | 关键路径函数漏洞分析 | 5~20 分钟 |
  16. ## 前置条件
  17. - **IDA**(推荐 7.6+),已安装 WPeGPT 插件并能够正常使用
  18. - **Python 3**,已安装 `openai` 和 `httpx` 包
  19. - **WPeGPT** — 本技能能力的主要驱动 IDA 插件([安装指南](https://github.com/WPeace-HcH/WPeGPT))
  20. - **Windows** — 目前支持 Windows 环境(PowerShell 或 Batch)
  21. ## 快速开始
  22. ### 1. 在 IDA 中安装 WPeGPT
  23. 将 [WPeGPT 插件](https://github.com/WPeace-HcH/WPeGPT) 安装到 IDA 的 `plugins/` 目录:
  24. ```
  25. <ida_dir>/plugins/
  26. ├── WPeGPT.py
  27. └── WPeGPT_Config/
  28. ├── config.py
  29. └── wpe_ai_controller.py
  30. ```
  31. 在 `config.py` 中配置 WPeGPT 所使用的 AI 模型及 API 密钥。
  32. ### 2. 配置 SKILL
  33. SKILL 运行时将会进行自检配置信息并询问路径,你也可以提前手工在 `/config/config.ini` 文件中填写你的路径:
  34. ```ini
  35. [paths]
  36. ida_dir=path\to\IDA
  37. python_path=path\to\python.exe
  38. ```
  39. ### 3. 加载技能
  40. 将此项目添加到你的 AI Agent 的 Skill 目录。使用时会自动:
  41. 1. 验证依赖
  42. 2. 检测二进制架构
  43. 3. 启动 IDA 并运行分析
  44. 4. 读取并总结报告
  45. 你可以直接说:*"使用 wpegpt 技能分析 C:\samples\malware.exe"*、*"帮我大致分析 C:\samples\malware.exe"*、*"深度分析 suspicious.dll"* 或 *"检查 target.exe 的漏洞"*。(经测试 Agent 调用 SKILL 会出现不主动调用的情况,最好主动告知 AI 使用技能或 "/wpegpt-analyzer" 直接调用)
  46. 报告将保存到 `<binary_dir>/<filename>_WPeAI_Results/`。
  47. ## 工作原理
  48. ```
  49. ┌─────────────────────────────────────────────────────┐
  50. │ 调用方 │
  51. │ ┌───────────────────────────────────────────────┐ │
  52. │ │ wpegpt_analyze │ │
  53. │ │ 1. 检测二进制文件架构(PE/ELF,32/64位) │ │
  54. │ │ 2. 启动 IDA + WPeGPT │ │
  55. │ │ 3. 轮询 WPeServer TCP 端口 │ │
  56. │ │ 4. 运行 wpe_ai_controller │ │
  57. │ └──────────────────────┬────────────────────────┘ │
  58. └─────────────────────────┼───────────────────────────┘
  59. │
  60. ┌──────────▼──────────┐
  61. │ WPeServer (TCP) │ ← 嵌入 IDA 内部
  62. └──────────┬──────────┘
  63. │
  64. ┌──────────▼──────────┐
  65. │ wpe_ai_controller │ ← 外部驱动
  66. └──────────┬──────────┘
  67. │
  68. ┌──────────▼──────────┐
  69. │ AI Model │ ← DeepSeek / GPT 等
  70. └─────────────────────┘
  71. ```
  72. ## 项目结构
  73. ```
  74. wpegpt-analyzer/
  75. ├── SKILL.md # 技能定义
  76. ├── config/
  77. │ └── config.ini.example # 配置模板(可复制为 config.ini 并配置使用)
  78. └── scripts/
  79. ├── wpegpt_analyze.ps1 # PowerShell 启动脚本
  80. └── wpegpt_analyze.bat # Batch 启动脚本(备用)
  81. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.