# Gepetto：调用大模型辅助逆向的 IDA 插件

> IDA Pro 插件，把 Hex-Rays 伪代码发送给使用者选定的托管或本地大模型，用于解释函数、添加注释或提出新的变量名与函数名，由使用者勾选后再应用。IDA 内的对话控制台还允许模型调用工具，读取反汇编、反编译结果、交叉引用、字符串和类型，对数据库进行重命名和注释，并运行 Python。README 提醒这些通用模型很可能出错，要求使用者审慎对待每一个结果。

- 类型：集成
- 目标：二进制
- 类别：独立智能体工作流
- 关联：独立智能体集成
- 来源复核于：2026-10-19
- 收录于：2026-10-19
- 原始资源：<https://github.com/JusticeRage/Gepetto>
- 一手来源：<https://github.com/JusticeRage/Gepetto/blob/f98e4c12decf86eae76ece9d6955bb6dfe472190/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/gepetto/>
- 记录 JSON：<https://awesomerea.org/resources/gepetto/record.json>
- 英文版：[English](https://awesomerea.org/resources/gepetto/index.md)

## 使用条件与局限

- 所审阅的 main 提交位于 2025-11-19 发布的 v1.5.1 之后 38 个提交，而 ida-plugin.json 与 pyproject.toml 仍标注 1.5.0 版。README 要求 IDA Pro 7.6 或更高版本并配备 Hex-Rays 反编译器。可通过 Hex-Rays 的 hcli 插件命令安装，或把 gepetto.py 与 gepetto 文件夹复制到 IDA 插件目录，再把 requirements.txt 安装到 IDA 使用的 Python 中；pyproject.toml 要求 Python 3.10+。
- 每次请求都会把当前函数的伪代码发送给所选服务商，在对话控制台中还会发送工具返回的全部内容。内置服务商包括 Anthropic、OpenAI、Gemini、Azure OpenAI、Groq、Together、Novita AI、Kluster.ai、DeepSeek 和 OpenRouter，需使用者自备 API 密钥，README 提示这些调用通常需要付费；也可使用本地 Ollama 或 LM Studio 模型。其他服务商可以作为 Python 文件或入口点软件包加载，README 提醒它们会在 IDA 启动时执行任意代码。
- 在 IDA 输入栏选择 Gepetto 即进入对话控制台，模型可调用 22 个工具：读取反汇编、字节、伪代码、交叉引用、导入表、符号、字符串、结构体和搜索结果；声明 C 类型；重命名函数、全局变量和局部变量；设置注释；以及 run_python，它在 IDA 内执行模型给出的 Python 代码，不经确认。其系统提示要求模型直接执行所请求的修改，无需询问。“解释”“注释”和“自动重命名”菜单操作只处理单个函数，自动重命名会列出建议名称供使用者勾选后应用；README 未介绍的“生成 C 代码”和“生成 Python 代码”两项操作会把模型改写的函数代码保存为文件。
- 仓库测试使用 pytest 和 Hex-Rays 的 idapro 库，并以仓库自带的 manalyze.exe（作者的 PE 分析工具 Manalyze 的构建产物）为测试样本；仓库未提供 CI 工作流。README 中的前后对比截图，以及先请求解释再重命名效果更好的观察，均为作者所述。
- LICENSE 与 ida-plugin.json 标明采用 GPL-3.0；IDA Pro、Hex-Rays 反编译器和模型服务各有其许可与条款。README 感谢 Kaspersky 提供最初资助，并称 HarfangLab 为当前支持方。

## 一手来源

1. <https://github.com/JusticeRage/Gepetto/blob/f98e4c12decf86eae76ece9d6955bb6dfe472190/README.md>
2. <https://github.com/JusticeRage/Gepetto/blob/f98e4c12decf86eae76ece9d6955bb6dfe472190/ida-plugin.json>
3. <https://github.com/JusticeRage/Gepetto/blob/f98e4c12decf86eae76ece9d6955bb6dfe472190/pyproject.toml>
4. <https://github.com/JusticeRage/Gepetto/blob/f98e4c12decf86eae76ece9d6955bb6dfe472190/gepetto/config.ini>
5. <https://github.com/JusticeRage/Gepetto/blob/f98e4c12decf86eae76ece9d6955bb6dfe472190/gepetto/ida/cli.py>
6. <https://github.com/JusticeRage/Gepetto/blob/f98e4c12decf86eae76ece9d6955bb6dfe472190/gepetto/ida/tools/tools.py>
7. <https://github.com/JusticeRage/Gepetto/blob/f98e4c12decf86eae76ece9d6955bb6dfe472190/gepetto/ida/tools/run_python.py>
8. <https://github.com/JusticeRage/Gepetto/blob/f98e4c12decf86eae76ece9d6955bb6dfe472190/gepetto/ida/handlers.py>
9. <https://github.com/JusticeRage/Gepetto/blob/f98e4c12decf86eae76ece9d6955bb6dfe472190/tests/conftest.py>
10. <https://github.com/JusticeRage/Gepetto/blob/f98e4c12decf86eae76ece9d6955bb6dfe472190/LICENSE>
11. <https://github.com/JusticeRage/Gepetto/releases/tag/v1.5.1>

## 同分区更多条目：智能体与 MCP

- [GhidrAssistMCP Ghidra 原生 MCP 扩展](https://awesomerea.org/zh/resources/ghidrassistmcp/index.md) · 集成
- [Android Reverse Engineering Skill 安卓反编译智能体技能](https://awesomerea.org/zh/resources/android-reverse-engineering-skill/index.md) · 集成
- [Reverify：用确定性工具核验模型二进制分析断言](https://awesomerea.org/zh/resources/reverify-claim-verifier/index.md) · 集成
- [DecompAI：在 Kali 容器中分析二进制的对话智能体](https://awesomerea.org/zh/resources/decompai/index.md) · 集成
- [Kong：基于 Ghidra 的大模型去符号二进制分析流水线](https://awesomerea.org/zh/resources/kong-agentic-reverse-engineer/index.md) · 集成
- [Co-op Anything：为单人游戏加入合作模式的智能体手册](https://awesomerea.org/zh/resources/coop-anything/index.md) · 集成

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
