{"id":13422853,"url":"https://github.com/JusticeRage/Gepetto","last_synced_at":"2025-03-15T12:30:54.779Z","repository":{"id":64239042,"uuid":"574156195","full_name":"JusticeRage/Gepetto","owner":"JusticeRage","description":"IDA plugin which queries language models to speed up reverse-engineering","archived":false,"fork":false,"pushed_at":"2025-02-25T22:33:01.000Z","size":425,"stargazers_count":3022,"open_issues_count":11,"forks_count":280,"subscribers_count":49,"default_branch":"main","last_synced_at":"2025-03-13T10:56:53.505Z","etag":null,"topics":["gpt-35-turbo","gpt-4-turbo","ida-pro","openai","python","reverse-engineering"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JusticeRage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-04T15:48:48.000Z","updated_at":"2025-03-13T09:52:04.000Z","dependencies_parsed_at":"2023-11-09T23:06:44.987Z","dependency_job_id":"25908299-08eb-471f-b811-f97d9a3133a4","html_url":"https://github.com/JusticeRage/Gepetto","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JusticeRage%2FGepetto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JusticeRage%2FGepetto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JusticeRage%2FGepetto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JusticeRage%2FGepetto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JusticeRage","download_url":"https://codeload.github.com/JusticeRage/Gepetto/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243731070,"owners_count":20338765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gpt-35-turbo","gpt-4-turbo","ida-pro","openai","python","reverse-engineering"],"created_at":"2024-07-30T23:00:58.943Z","updated_at":"2025-03-15T12:30:54.774Z","avatar_url":"https://github.com/JusticeRage.png","language":"Python","funding_links":[],"categories":["Reverse Engineering","IDA Plugins","精选开源项目合集","杀毒免杀、逆向工程","Python","逆向破解","Tools"],"sub_categories":["GPT插件","网络服务_其他","Reverse Engineering"],"readme":"# Gepetto\r\n\r\nGepetto is a Python plugin which uses various large language models to provide meaning to functions \r\ndecompiled by IDA Pro (≥ 7.4). It can leverage them to explain what a function does, and to automatically \r\nrename its variables. Here is a simple example of what results it can provide in mere seconds:\r\n\r\n![](https://github.com/JusticeRage/Gepetto/blob/main/readme/comparison.png?raw=true)\r\n\r\n## Setup\r\n\r\nSimply drop this script (`gepetto.py`, as well as the `gepetto/` folder) into your IDA plugins folder (`$IDAUSR/plugins`). \r\nBy default, on Windows, this should be `%AppData%\\Hex-Rays\\IDA Pro\\plugins` (you may need to create it).\r\n\r\nYou will need to add the required packages to IDA's Python installation for the script to work.\r\nFind which interpreter IDA is using by checking the following registry key: \r\n`Computer\\HKEY_CURRENT_USER\\Software\\Hex-Rays\\IDA` (default on Windows: `%LOCALAPPDATA%\\Programs\\Python\\Python39`).\r\nFinally, with the corresponding interpreter, simply run: \r\n\r\n```\r\n[/path/to/python] -m pip install -r requirements.txt\r\n```\r\n\r\n⚠️ You will also need to edit the configuration file (found as `gepetto/config.ini`) and add your own API keys. For \r\nOpenAI, it can be found on [this page](https://beta.openai.com/account/api-keys).\r\nPlease note that API queries are usually not free (although not very expensive) and you will need to set up a payment \r\nmethod with the corresponding provider.\r\n\r\n## Supported models\r\n\r\n- [OpenAI](https://playground.openai.com/)\r\n  - gpt-3.5-turbo-0125\r\n  - gpt-4-turbo\r\n  - gpt-4o (recommended for beginners)\r\n- [Ollama](https://ollama.com/)\r\n  - Any local model exposed through Ollama (will not appear if Ollama is not running)\r\n- [Groq](https://console.groq.com/playground)\r\n  - llama-3.1-70b-versatile\r\n  - llama-3.2-90b-text-preview\r\n  - mixtral-8x7b-32768\r\n- [Together](https://api.together.ai/)\r\n  - mistralai/Mixtral-8x22B-Instruct-v0.1 (does not support renaming variables)\r\n- [Novita AI](https://novita.ai/)\r\n  - deepseek/deepseek-r1\r\n  - deepseek/deepseek-v3\r\n  - meta-llama/llama-3.3-70b-instruct\r\n  - meta-llama/llama-3.1-70b-instruct\r\n  - meta-llama/llama-3.1-405b-instruct\r\n- [LM Studio](https://lmstudio.ai/)\r\n  - Any local model exposed through LM Studio (will not appear if LM Studio Developer server is not running)\r\n\r\nAdding support for additional models shouldn't be too difficult, provided whatever provider you're considering exposes\r\nan API similar to OpenAI's. Look into the `gepetto/models` folder for inspiration, or open an issue if you can't figure\r\nit out.\r\n\r\n## Usage\r\n\r\nOnce the plugin is installed properly, you should be able to invoke it from the context menu of IDA's pseudocode window,\r\nas shown in the screenshot below:\r\n\r\n![](https://github.com/JusticeRage/Gepetto/blob/main/readme/usage.png?raw=true)\r\n\r\nSwitch between models supported by Gepetto from the Edit \u003e Gepetto menu:\r\n\r\n![](https://github.com/JusticeRage/Gepetto/blob/main/readme/select_model.png?raw=true)\r\n\r\nGepetto also provides a CLI interface you can use to ask questions to the LLM directly from IDA. Make sure to select\r\n`Gepetto` in the input bar:\r\n\r\n![](https://github.com/JusticeRage/Gepetto/blob/main/readme/cli.png?raw=true)\r\n\r\n### Hotkeys\r\n\r\nThe following hotkeys are available:\r\n\r\n- Ask the model to explain the function: `Ctrl` + `Alt` + `G`\r\n- Request better names for the function's variables: `Ctrl` + `Alt` + `R`\r\n\r\nInitial testing shows that asking for better names works better if you ask for an explanation of the function first – I\r\nassume because the model then uses its own comment to make more accurate suggestions.\r\nThere is an element of randomness to the AI's replies. If for some reason the initial response you get doesn't suit you,\r\nyou can always run the command again.\r\n\r\n## Limitations\r\n\r\n- The plugin requires access to the HexRays decompiler to function.\r\n- All supported LLMs are general-purpose and may very well get things wrong! Always be \r\n  critical of results returned!\r\n\r\n## Translations\r\n\r\nYou can change Gepetto's language by editing the locale in the configuration. For instance, to use the plugin\r\nin French, you would simply add:\r\n\r\n```ini\r\n[Gepetto]\r\nLANGUAGE = \"fr_FR\"\r\n```\r\n\r\nThe chosen locale must match the folder names in `gepetto/locales`. If the desired language isn't available,\r\nyou can contribute to the project by adding it yourself! Create a new folder for the desired locale\r\n(ex: `gepetto/locales/de_DE/LC_MESSAGES/`), and open a new pull request with the updated `.po` file, which you can\r\ncreate by copying and editing `gepetto/locales/gepetto.pot` (replace all the lines starting with `msgstr` with the\r\nlocalized version).  \r\n\r\n## Acknowledgements\r\n\r\n- [OpenAI](https://openai.com), for making these incredible models, obviously\r\n- [Hex Rays](https://hex-rays.com/), the makers of IDA for their lightning fast support\r\n- [Kaspersky](https://kaspersky.com), for initially funding this project\r\n- [HarfangLab](https://harfanglab.io/), the current backer making this work possible\r\n- [@vanhauser-thc](https://github.com/vanhauser-thc) for contributing ideas of additional models and providers to support via his [fork](https://github.com/vanhauser-thc/gepetto/)\r\n- Everyone who contributed translations: @seifreed, @kot-igor, @ruzgarkanar, @orangetw\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJusticeRage%2FGepetto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJusticeRage%2FGepetto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJusticeRage%2FGepetto/lists"}