ghidra-builder icon indicating copy to clipboard operation
ghidra-builder copied to clipboard

Docker image for building ghidra RE framework from source

About

Common docker image for building software reverse engineering (SRE) framework Ghidra from Github's or private fork's source.

Using

Clone the repository:

git clone https://github.com/dukebarman/ghidra-builder
cd ghidra-builder

Create a docker image (if your user is in docker group, you may execute commands without sudo):

sudo docker-tpl/build

Run the build script from the working directory:

cd workdir
sudo ../docker-tpl/run ./build_ghidra.sh

It will clone a ghidra repository to the current directory and copy build to out dir:

ls    
build_ghidra.sh  ghidra out

At the next time, update this ghidra repo, checkout needed commit or patch:

cd workdir/ghidra
git pull

And for testing other branches, for example, with new debugger feature, you may make checkout:

cd workdir/ghidra # if you didn't make it earlier
git checkout debugger

After building a few files don't have executable flag:

chmod +x ./GPL/DemanglerGnu/os/linux64/demangler_gnu
chmod +x ./GPL/CabExtract/os/linux64/cabextract
chmod +x ./Ghidra/Features/Decompiler/os/linux64/decompile
chmod +x ./support/launch.sh
chmod +x ghidraRun

Or copy and use set_exec_flag.sh script to unzipped ghidra folder.

Testing

The Developers've added scripts for testing so you may uncomment Tests section in build_ghidra.sh.