Contents
Ghidra lets you open an executable without its source code and turn the machine code back into a readable form. For practice, use a small program that you wrote and compiled yourself, so you can check the results against the source.
This review is for people who have written simple programs in a language such as C and want to see what they look like after compilation. After reading it, you can do the following:
- Install and start Ghidra
- Import a program you compiled and run auto-analysis on it
- Compare the decompiler output with your original source code
What Ghidra is for
Ghidra is a reverse engineering framework created by the Research Directorate of the US National Security Agency (NSA) and released as open source. The official README lists disassembly, assembly, decompilation, graphing, and scripting among its features. It analyzes compiled code for Windows, macOS, and Linux, and supports many processor instruction sets and executable formats.
You usually work in the GUI, but there is also a headless mode for batch analysis from the command line. You can write your own scripts and extensions in Java or Python.
Requirements
The Getting Started document (as of Ghidra 12.2) lists these requirements:
| Item | Requirement |
|---|---|
| Operating system | Windows 10 (build 1809 or later), Linux, macOS 10.13 or later. 32-bit systems are deprecated |
| Java | JDK 25 (64-bit). Adoptium Temurin and Amazon Corretto are listed as free LTS builds |
| Memory and disk | 4 GB RAM, 1 GB for the Ghidra binaries |
| Python 3 | 3.9 to 3.15, needed for the debugger and PyGhidra |
Try it safely with your own program
- Install JDK 25 (64-bit).
- On the official releases page, open “Assets” and download the file named
ghidra_<version>_PUBLIC_<date>.zip. The “Source Code” files are not the release. - Extract the zip file anywhere you like. There is no installer, and you don’t need administrator rights. Don’t extract it on top of an older installation.
- In the extracted folder, run
ghidraRun.baton Windows or./ghidraRunon Linux and macOS. If Ghidra can’t find a JDK, it asks you for the JDK folder. - Write a small program for practice, such as a C program that prints a string, and compile it.
- In Ghidra, choose and create a project.
- Choose and import the compiled file. The default file format is usually fine.
- Open the imported file. The CodeBrowser tool starts and asks whether to run auto-analysis. Let it run.
- In the Symbol Tree, select a function such as
main. The Decompiler window shows C-like output. Compare it with your source.
When you are comfortable, move on to material that explicitly allows analysis, such as CTF practice challenges.
Main windows and features
By default, the CodeBrowser shows these windows:
| Window | What it shows |
|---|---|
| Listing | Disassembled instructions and data |
| Decompiler | The selected function as C-like code |
| Symbol Tree | Functions, labels, and other symbols |
| Program Tree | The sections in the file |
| Data Type Manager | Data types such as structures |
You can run auto-analysis again later from . Ghidra can also search for strings in the program, which helps you find where a message is displayed.
Cautions
- Before you analyze software made by someone else, read its terms of use and license agreement. Some products forbid reverse engineering, and copyright and other laws may also apply. If you are not sure, stick to your own programs and material that allows analysis.
- When you analyze an executable from an unknown source, use an environment separate from your everyday computer so you don’t run it by mistake.
- The official README warns that some versions of Ghidra have known vulnerabilities. Check the official security advisories and use a recent version.
- Download Ghidra only from the official GitHub releases page.
- On macOS, Gatekeeper may quarantine Ghidra’s unsigned native components on first launch. The Known Issues section of Getting Started explains how to avoid this.
Read next
Sources
- Official repository README (installation)github.com/NationalSecurityAgency/ghidra/blob/master/README.md
- Getting Started (platforms, requirements, running Ghidra)github.com/NationalSecurityAgency/ghidra/blob/master/GhidraDocs/GettingStarted.md
- Release: Ghidra 12.2github.com/NationalSecurityAgency/ghidra/releases/tag/Ghidra_12.2_build
- Introduction to Ghidra Student Guidegithub.com/NationalSecurityAgency/ghidra/blob/master/GhidraDocs/GhidraClass/Beginner/Introduction_to_Ghidra_Student_Guide.html
- Security advisoriesgithub.com/NationalSecurityAgency/ghidra/security/advisories
- License (Apache License 2.0)github.com/NationalSecurityAgency/ghidra/blob/master/LICENSE
Checked on 2026-10-24
Similar tools
MobSF
Impact Local onlyA mobile app security tool that analyzes Android and iOS apps and lists risky permissions, settings, and code issues. You use it from a web browser.
- Purpose
- Audit
- Type
- Web service
- Difficulty
- Intermediate
- License
- CopyleftGPL-3.0
- Category
- Reverse engineering / Vulnerability scanning
Wireshark
Impact Reaches othersA packet analyzer that records network traffic and breaks each packet down by protocol so you can read it.
- Purpose
- Learning
- Type
- Desktop app
- Difficulty
- Beginner
- License
- CopyleftGPL-2.0
- Category
- Network / Forensics