ghidraRunStarts the Ghidra GUI (ghidraRun.bat on Windows). Requires a supported JDK (21 for current releases).
The NSA’s open-source reverse-engineering suite with a powerful decompiler; scriptable headless analysis from the command line.
brew install --cask ghidraghidraRunStarts the Ghidra GUI (ghidraRun.bat on Windows). Requires a supported JDK (21 for current releases).
<ghidra>/support/analyzeHeadless <project_dir> <project> -import <binary>Headless mode: creates a project, imports a binary and runs auto-analysis without the GUI.
Example
analyzeHeadless ~/ghidra_projects demo -import ./malware.binanalyzeHeadless <project_dir> <project> -import <dir> -recursiveImports and analyses every file under a directory.
Example
analyzeHeadless ~/ghidra_projects firmware -import ./extracted -recursiveanalyzeHeadless <project_dir> <project> -process <file> -noanalysisOpens an existing program in a project without reanalysing it.
Example
analyzeHeadless ~/ghidra_projects demo -process malware.bin -noanalysisanalyzeHeadless <project_dir> <project> -import <binary> -postScript <script>Runs a script after analysis — useful for batch decompilation or IOC extraction.
Example
analyzeHeadless ~/ghidra_projects demo -import a.out -postScript ExportDecompiled.javaanalyzeHeadless … -scriptPath <dir>Adds a directory of your own scripts.
Example
analyzeHeadless ~/ghidra_projects demo -process a.out -scriptPath ~/ghidra_scripts -postScript FindCrypto.pyanalyzeHeadless … -deleteProjectRemoves the temporary project afterwards.
Example
analyzeHeadless /tmp gh -import sample.exe -postScript Dump.java -deleteProjectanalyzeHeadless … -processor <lang>Forces a processor for raw firmware with no headers.
Example
analyzeHeadless /tmp gh -import fw.bin -processor ARM:LE:32:v7analyzeHeadless … -log <file> -scriptlog <file>Writes analysis and script logs to files.
Example
analyzeHeadless /tmp gh -import a.out -log ghidra.log -scriptlog script.logGGo to an address or label.
LRename the selected function, variable or label.
Ctrl-LRetype a variable in the decompiler.
Ctrl-Shift-FFind references to the selected item.
Search → For StringsLists defined and undefined strings, a quick way to find interesting code.
Window → Function GraphShows the control-flow graph of the current function.
A complete command-line reverse-engineering framework: disassemble, debug, patch and analyse binaries for many architectures.
The GNU Debugger: set breakpoints, step through code, inspect memory and registers. Pair with GEF or pwndbg for exploit development.
Displays information about object files: headers, sections, symbols and disassembly. Part of GNU binutils.
Decodes Android APKs to near-original resources and smali code, and rebuilds them after modification.