OpenAI Integration for Ghidra
Get Function Summaries from ChatGTP
This plugin requires Kotlin language support in Ghidra, so make sure that you have it installed: https://github.com/GhidraJupyter/ghidra-jupyter-kotlin/releases
Grab the latest release of this Plugin from the releases page and install it in Ghidra.
Configure your API Key via
Edit -> Tool Options -> OpenAI
Right Click in the Decompiler, and select
Get and apply Function Summary via OpenAI
You can easily change the model used for the completions and its parameters via
Edit -> Tool Options -> OpenAI -> Model menu.
The decompiled text will be appended to the prompt and will be sent as a completion request to the OpenAI API.
Potential Future Work
No promises that I will ever implement them, but I’ll gladly provide advice if you want to try:
- Dedicated Dialog that previews the function summary and allows retrying before applying
- Allow a custom prompt to be specified for a specific program via the
Options for $programmenu
- Request better variable or function names like https://github.com/JusticeRage/Gepetto does