Zurück zum Ranking

JusticeRage/Gepetto

Python

IDA plugin which queries language models to speed up reverse-engineering

ida-proreverse-engineeringopenaipythongpt-5-api
Sterne-Wachstum
Sterne
3.4k
Forks
328
Wochenwachstum
Issues
10
2k2.5k3k
Dez. 2022Feb. 2024Mai 2025Juli 2026
ArtefaktePyPIpip install gepetto
README

Gepetto

Gepetto is a Python plugin which uses various large language models to provide meaning to functions decompiled by IDA Pro (≥ 7.6). It can leverage them to explain what a function does, and to automatically rename its variables. Here is a simple example of what results it can provide in mere seconds:

Setup

The easiest way to install Gepetto is using the Hex-Rays CLI tool (hcli):

pip install ida-hcli
hcli plugin install gepetto

This will automatically install the plugin to your IDA user directory.

Manual Installation

Alternatively, you can manually install the plugin:

  1. Drop this script (gepetto.py, as well as the gepetto/ folder) into your IDA plugins folder ($IDAUSR/plugins).
  2. The plugins directory location depends on your system:
    • Windows: %APPDATA%\Hex-Rays\IDA Pro\plugins\
    • macOS: ~/Library/Application Support/IDA Pro/plugins/
    • Linux: ~/.idapro/plugins/
  3. Install the required packages to IDA's Python installation. Find which interpreter IDA is using by checking the following registry key: Computer\HKEY_CURRENT_USER\Software\Hex-Rays\IDA (default on Windows: %LOCALAPPDATA%\Programs\Python\Python39).
  4. With the corresponding interpreter, simply run:
    [/path/to/python] -m pip install -r requirements.txt
    

⚠️ You will also need to edit the configuration file (found as gepetto/config.ini) and add your own API keys. For OpenAI, it can be found on this page. Please note that API queries are usually not free (although not very expensive) and you will need to set up a payment method with the corresponding provider.

Supported models

  • Anthropic
    • claude-opus-4-7
    • claude-sonnet-4-6
    • claude-haiku-4-5
  • OpenAI
    • gpt-5
    • gpt-5-mini
    • gpt-5-nano
    • gpt-4-turbo
    • gpt-4o
    • o4-mini
    • gpt-4.1
    • o3
    • o3-pro
  • Google Gemini
    • gemini-2.0-flash
    • gemini-2.5-pro
    • gemini-2.5-flash
    • gemini-2.5-flash-lite-preview-06-17
  • Azure OpenAI
    • gpt-35-turbo
    • gpt-35-turbo-1106
    • gpt-35-turbo-16k
    • gpt-4-turbo
    • gpt-4-turbo-2024-0409-gs
  • Ollama
    • Any local model exposed through Ollama (will not appear if Ollama is not running)
  • Groq
    • llama-3.1-70b-versatile
    • llama-3.2-90b-text-preview
    • mixtral-8x7b-32768
  • Together
    • mistralai/Mixtral-8x22B-Instruct-v0.1 (does not support renaming variables)
  • Novita AI
    • deepseek/deepseek-r1
    • deepseek/deepseek-v3
    • meta-llama/llama-3.3-70b-instruct
    • meta-llama/llama-3.1-70b-instruct
    • meta-llama/llama-3.1-405b-instruct
  • Kluster.ai
    • deepseek-ai/DeepSeek-R1
    • deepseek-ai/DeepSeek-V3-0324
    • google/gemma-3-27b-it
    • klusterai/Meta-Llama-3.1-8B-Instruct-Turbo
    • klusterai/Meta-Llama-3.1-405B-Instruct-Turbo
    • klusterai/Meta-Llama-3.3-70B-Instruct-Turbo
    • meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8
    • meta-llama/Llama-4-Scout-17B-16E-Instruct
    • Qwen/Qwen2.5-VL-7B-Instruct
  • LM Studio
    • Any local model exposed through LM Studio (will not appear if LM Studio Developer server is not running) Adding support for additional models shouldn't be too difficult, provided whatever provider you're considering exposes an API similar to OpenAI's. Look into the gepetto/models folder for inspiration, or open an issue if you can't figure it out.

Usage

Once the plugin is installed properly, you should be able to invoke it from the context menu of IDA's pseudocode window, as shown in the screenshot below:

Switch between models supported by Gepetto from the Edit > Gepetto menu:

Gepetto also provides a CLI interface you can use to ask questions to the LLM directly from IDA. Make sure to select Gepetto in the input bar:

Hotkeys

The following hotkeys are available:

  • Ask the model to explain the function: Ctrl + Alt + G
  • Ask the model to add comments to the code: Ctrl + Alt + K
  • Request better names for the function's variables: Ctrl + Alt + R

Initial testing shows that asking for better names works better if you ask for an explanation of the function first – I assume because the model then uses its own comment to make more accurate suggestions. There is an element of randomness to the AI's replies. If for some reason the initial response you get doesn't suit you, you can always run the command again.

Limitations

  • The plugin requires access to the HexRays decompiler to function.
  • All supported LLMs are general-purpose and may very well get things wrong! Always be critical of results returned!

Translations

You can change Gepetto's language by editing the locale in the configuration. For instance, to use the plugin in French, you would simply add:

[Gepetto]
LANGUAGE = "fr_FR"

The chosen locale must match the folder names in gepetto/locales. If the desired language isn't available, you can contribute to the project by adding it yourself! Create a new folder for the desired locale (ex: gepetto/locales/de_DE/LC_MESSAGES/), and open a new pull request with the updated .po file, which you can create by copying and editing gepetto/locales/gepetto.pot (replace all the lines starting with msgstr with the localized version).

Acknowledgements

  • OpenAI, for making these incredible models, obviously
  • Hex Rays, the makers of IDA for their lightning fast support
  • Kaspersky, for initially funding this project
  • HarfangLab, the current backer making this work possible
  • @vanhauser-thc for contributing ideas of additional models and providers to support via his fork
  • Everyone who contributed translations: @seifreed, @kot-igor, @ruzgarkanar, @orangetw
Ähnliche Repositories
pwndbg/pwndbg

Exploit Development and Reverse Engineering with GDB & LLDB Made Easy

PythonPyPIMIT Licensepythongdb
pwndbg.re
10.7k1.2k
mrexodia/ida-pro-mcp

AI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.

PythonPyPIMIT Licenseida-pluginida-pro
plugins.hex-rays.com/mrexodia/ida-pro-mcp
10.6k1.2k
hugsy/gef

GEF (GDB Enhanced Features) - a modern experience for GDB with advanced debugging capabilities for exploit devs & reverse engineers on Linux

PythonPyPIMIT Licensepythonexploit
hugsy.github.io/gef
8.3k829
google/bindiff

Quickly find differences and similarities in disassembled code

JavaMavenApache License 2.0bindiffbinexport
zynamics.com/bindiff.html
3.1k235
decompiler-explorer/decompiler-explorer

Decompiler Explorer! Compare tools on the forefront of static analysis, now in your web browser!

PythonPyPIMIT Licenseangrdecompiler
dogbolt.org
2.6k226
gaasedelen/lighthouse

A Coverage Explorer for Reverse Engineers

PythonPyPIMIT Licenseida-proidapython
2.6k334
mandiant/flare-ida

IDA Pro utilities from FLARE team

PythonPyPIApache License 2.0idafireeye-flare
2.5k471
bootleg/ret-sync

ret-sync is a set of plugins that helps to synchronize a debugging session (WinDbg/GDB/LLDB/OllyDbg2/x64dbg) with IDA/Ghidra/Binary Ninja disassemblers.

CGNU General Public License v3.0reverse-engineeringdebugger
2.4k304
keystone-engine/keypatch

Multi-architecture assembler for IDA Pro. Powered by Keystone Engine.

PythonPyPIGNU General Public License v2.0ida-proassembler
keystone-engine.org/keypatch
1.9k383
REDasmOrg/REDasm

The OpenSource Disassembler

C++GNU General Public License v3.0cplusplusqt5
redasm.io
1.6k142
mytechnotalent/Hacking-Windows

A FREE Windows C development course where we will learn the Win32API and reverse engineer each step utilizing IDA Free in both an x86 and x64 environment.

CApache License 2.0hackingwindows
1.6k143
gaasedelen/tenet

A Trace Explorer for Reverse Engineers

PythonPyPIMIT Licensereverse-engineeringida-pro
1.5k167