Skip to content

Export Assembly or C from Ghidra

License

Notifications You must be signed in to change notification settings

YaronKoresh/ghidra-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ghidra installation:

RetDec (by Avast) installation:

  • Install Graphviz.
  • Put a "retdec" directory, inside Ghidra root folder, and fill it with a copy of RetDec decompiler.
  • Extract UPX Packer & put the main executable inside retdec/bin folder.

Radare2 installation:

  • Put a "radare2" directory, inside Ghidra root folder, and fill it with a copy of Radare2 software.

Nasm installation:

  • Put a "nasm" directory, inside Ghidra root folder, and fill it with a copy of NASM assembler.

Emscripten installation:

  • Put a "emsdk" directory, inside Ghidra root folder, and fill it with a copy of Emscripten C-to-Javascript converter. You do not need to install Emscripten manually. My batch scripts are doing it automatically.

Linkers installation:

  • Put a "linker" directory, inside Ghidra root folder, and fill it with a copy of "linkers.zip".

Python scripts installation:

  • Put any *.py script, inside: "Ghidra/Features/Python/ghidra_scripts" (inside Ghidra root folder).
  • You will see these *.py scripts, through the "code browser" tool, from "scripts" window of Ghidra.

Batch scripts installation:

  • Put any *.bat script, inside Ghidra root folder.

Finally, using the new reversing toolset:

  1. Import your software, with all its local/system direct/indirect dependencies (can be done automatically, during import, using "options" button).
  2. Inside "scripts" window, double click on the name of the needed python script.
  3. Go into the root folder, to see the results.
  4. Use any batch script to manipulate the results, according to your needs.