Ghidra-ChatGPT is a specialized Ghidra plugin designed to utilize the machine learning capabilities of OpenAI's GPT for semantic analysis of decompiled functions. This provides a nuanced understanding of codebase functionality.
- Ghidra, version
>= 10.1.5
(Official Site) - API key for OpenAI's GPT, obtainable from OpenAI API
- Acquire Script: Download the Python script Ghidra-ChatGPT.py.
- Invoke Script Manager: Within Ghidra, go to
Window
>Script Manager
. - Instantiate New Script: Click
New
, selectPython
as the language, and designate the script name asGhidra-ChatGPT.py
. - Incorporate Code: Copy the code from Ghidra-ChatGPT.py into the editor. Substitute
API_KEY = ''
with the acquired OpenAI API key. - Persist Script: Save the script by clicking the
Save
button. - Activate in Tools Menu: In the Script Manager, locate your newly saved script and tick the 'In Tools Menu' checkbox.
To invoke Ghidra-ChatGPT, adhere to one of the following procedures:
-
Keyboard Shortcut: Execute
Ctrl + Alt + G
(modifiable within the script).- OR -
-
Menu Navigation: Traverse to
Tools -> Ghidra-ChatGPT
.
Upon activation, the plugin will conduct semantic analysis on the selected function and output the findings to the Ghidra console.
- Original script by evyatar9
- Port to Python 3 executed by wowitsjack
To contribute to the Ghidra-ChatGPT project, kindly submit pull requests or report issues through the Ghidra-ChatGPT GitHub repository.