This is a Ghidra plugin that provides some functions to an OpenAI assistant.
Credit to reverse-engineering-assistant for the inspiration to move from Ghidra scripts to a full-on Ghidra Module.
Be careful; you can blow through a few dollars worth of OpenAI API credits pretty quickly with this.
The current "tools" exposed to the LLM are here.
Here's an example of renaming a function:
User experience is pretty lacking right now. I suggest you install GhidraDev and then open the GhidraLlmIntegration
project in Eclipse.
After that, copy GhidraLlmIntegration\src\main\java\ghidrallmintegration\GhidraLlmIntegrationConfigurationExample.java
and create GhidraLlmIntegrationConfiguration.java
. Generate an API key in the OpenAI control panel and store it in apiKey
.
Then, "Run" the project from Eclipse and select the "Ghidra" run configuration. Once Ghidra starts, select the program you want to analyze and open the CodeBrowser. When that window loads, go to File -> Configure and click the Configure
hyperlink under the "Examples" section. The GhidraLlmIntegrationPlugin
entry will probably not be checked. Check its box and it ok, then close. the chat window should appear, then you can start conversing with the LLM.
Check Eclipse's console output for errors/logs. Feel free to report and/or contribute fixes for any issues.