Forsworns / GhidrAI

Equip Ghidra with LLM
https://forsworns.github.io/zh/blogs/20240220/
MIT License
1 stars 0 forks source link
dashscope ghidra-plugin llm reverse-engineering

GhidrAI

License

GhidrAI is a Ghidra extension which uses Alibaba Cloud LLM services explain what a function does, and to automatically rename its variables. Most importantly, these services are free :)

Requirements

The GhidrAI is verified on Ghidra 10.4. Note: Ghidra 10.4 requires JDK 17 64-bit.

Building GhidrAI

Use the following steps to build GhidrAI for your environment:

This command builds GhidrAI. If successful, you will find a new directory in your GhidrAI source directory named dist containing your GhidrAI extension (.zip). Please open a new issue if you experience any issues. (Please provide the log file at ~/.ghidra/.ghidra_${VERSION}/application.log.)

Installing GhidrAI

Use the following steps to install your GhidrAI extension in Ghidra:

OR

You can extract your GhidrAI extension (.zip) directly to <absolute path to Ghidra install>\Ghidra\Extensions and Ghidra will prompt you to configure GhidrAI the next time it is started.

Using GhidrAI

Select the function and right click the mouse, you can find the option in the menu.

Right click to reqeuest LLM service.

Click Tools > GhidrAI, and you can find the configruation dialog. For more detailed information, refer data/README.md.

Configuration dialog.

GhidrAI also provides an automatic analyzer, you can find it in Analysis > Auto Analyze ... or Analysis > One Shot.

Automatic analyzer

One shot analysis

Acknowledgment

This project refers to the Ghidrathon plugin, which provides out-of-box Python3 integrations for Ghidra. My original idea is to utilize Ghidrathon to run LLMs locally. But directly requesting services such as Alibaba Cloud DashScope saves my time.

And apparently the idea is from Gepetto.