A plugin that brings the power of ChatGPT to Ghidra!
The plugin is available as a release and you can build it locally by cloning this repository.
- Download the latest release from this repository. The release version must match your Ghidra version.
- Copy or move the archive to the
GHIDRA_INSTALL_DIR/Extensions/Ghidra
directory - In the Project window of Ghidra: File > Install Extension > Enable the GhidraChatGPT extension
- Restart Ghidra
- In the CodeBrowser window of Ghidra: File > Configure > Plugin icon in the top right > Enable the GhidraChatGPT plugin
The plugin can be built with or without docker. If it is built without docker then you need to manually resolve the dependencies such as gradle and java. The plugin is automatically added to the Ghidra Extension directory in both cases.
- Clone this repository
- Build using docker:
./build.sh -p YOUR_GHIDRA_INSTALL_DIR -d
or without:./build.sh -p YOUR_GHIDRA_INSTALL_DIR
- In the Project window of Ghidra: File > Install Extension > Enable the GhidraChatGPT extension
- Restart Ghidra
- In the CodeBrowser window of Ghidra: File > Configure > Plugin icon in the top right > Enable the GhidraChatGPT plugin
The plugin's features and settings can be accessed via the Tools
menu in the Ghidra CodeBrowser window.
The following options can be set via environment variables or via the settings in the Tools
menu:
OPENAI_TOKEN
: set this to your OpenAI token e.g.export OPENAI_TOKEN=YOUR_OPENAI_TOKEN
or the plugin will ask for your OpenAI token.
Identify Function (Tools > GhidraChatGPT > Identify Function)
Attempts to identify the purpose of the current function and potential open source references with the help of ChatGPT. The response from ChatGPT will be added as a comment above the function.
Find Vulnerabilities (Tools > GhidraChatGPT > Find Vulnerabilities)
Attempts to discover all potential vulnerabilities in the current function with the help of ChatGPT. The response from ChatGPT will be added as a comment above the function.
Beautify Function (Tools > GhidraChatGPT > Beautify Function)
Attempts to beautify the current function by identifying and applying more meaningful variable and function names with the help of ChatGPT.
Update OpenAI Token (Tools > GhidraChatGPT > Settings > Update OpenAI Token)
This will update the currently used Open AI Token for the ChatGPT requests
Update OpenAI Model (Tools > GhidraChatGPT > Model)
This will update the model used for the ChatGPT requests
All the currently released ChatGPT projects for the inspiration