Join our Newsletter — 33% off our NHI Course
Home› Guides› Ghidra for Beginners: A First Look at Reverse…
Guide Incident Response & Forensics

Ghidra for Beginners: A First Look at Reverse Engineering Software

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 2 December 2026 10 min read
On this page

Ghidra is a free tool, released by the US National Security Agency, that turns finished programs back into readable code.

This guide is for anyone curious about how security teams look inside suspicious software, such as students, new analysts and IT staff. You do not need to read code to follow it.

In short

  • Programs are shipped as machine code, which people find very hard to read. Ghidra turns it back into something closer to readable code.
  • Its two main views are a disassembler, which lists the computer's low-level steps, and a decompiler, which rebuilds a readable guess at the code.
  • The NSA released Ghidra to the public at the RSA Conference in 2019, and it is free and open source.
  • Defenders use it to work out what suspicious software does, but only in a safe, separate lab.

What you will learn

  • Explain what Ghidra is and who made it.
  • Describe the difference between a disassembler and a decompiler.
  • Spot the useful clues an analyst pulls out with Ghidra.
  • Check that analysis happens in a safe, separate setup.
The computer's own language (machine code)
the numbers a processor runs, which people find very hard to read.
Working backwards (reverse engineering)
finding out how finished software works without its original code.
Step lister (disassembler)
a tool that turns machine code into a list of short, low-level instructions.

What is Ghidra?

Think of a translator handed a letter in a code only machines speak. First they write out each symbol, one by one. Then they rewrite the whole letter in plain sentences, making their best guess at the meaning.

Ghidra does this for software. It is a reverse engineering tool: it helps people work out how a finished program works when they do not have its original code. Our Reverse Engineering for Beginners guide explains the idea itself.

It was built by the NSA's Research Directorate [1]. Its features include disassembly, assembly, decompilation, graphing and scripting [1]. It runs on Windows, macOS and Linux, and is free under an open-source licence called Apache 2.0 [1].

Where the comparison stops working: a translator works from words that once had a clear meaning. A decompiler rebuilds code that the original author never wrote in that form. Names, notes and layout are lost, so the result is a careful guess.

Why does it matter?

When a suspicious file turns up, someone has to find out what it does. The NSA says Ghidra has been used to analyse harmful code, and that it is now a staple of university courses [1][2].

If you are new to security work

What could happen: you open a suspicious file on your normal work laptop to "have a quick look".

Check this: ask where your team analyses files, and use only that separate setup.

Next: Malware Sandboxes for Beginners

If you are a student

What could happen: you download practice samples without knowing whether they are safe or legal to study.

Check this: start with your own small programs or course material, in a practice computer kept apart from your own.

Next: Malware Analysis for Beginners

If you manage a security team

What could happen: analysts run an old copy of Ghidra or extensions nobody has checked.

Check this: keep Ghidra updated, and read its security advisories.

Next: Ghidra for Malware Analysis Guide

What does it look like?

Ghidra shows the same program in more than one view. Here is a made-up, simplified pair of views for one small part of a program.

Example only. All values are made up.

Disassembly view                      (1)
  00000000  PUSH   EXAMPLE
  00000004  CALL   FUN_00000000
  00000008  CMP    EXAMPLE, 0

Decompiled view                       (2)
  void FUN_00000000(void) {           (3)
    if (file_exists("config-FAKE.txt")) {
      connect("update.example.invalid");   (4)
    }
  }
  1. Low-level steps, one per line, each at a numbered place in the program.
  2. The decompiler's readable guess at the same steps.
  3. The original name is lost, so Ghidra makes up a label. Analysts rename these as they learn more.
  4. In a real file, this line would contain the web address the program contacts. That is a clue defenders can watch for.

Why this is risky: people sometimes run a suspicious program "just to see", which can harm the computer and the network.

The safer way: Ghidra reads a program without running it. Even so, keep suspicious files inside a separate practice computer with no route to work systems.

How does it work?

  1. Load the file. The analyst opens a program file in a Ghidra project. Ghidra supports many kinds of processor and program file [1].
  2. Let Ghidra map it. Ghidra works through the file and marks where pieces of code and data start.
  3. Read the steps. The disassembler view lists the low-level instructions the processor would run.
  4. Read the guess. The decompiler view rebuilds those steps as something closer to normal code, which is quicker to read.
  5. Name and note. The analyst renames parts, adds notes and follows links between parts. Scripts in Java or Python can automate repeated work [1].
  6. Share the findings. Web addresses, file names and behaviours go into a report, so others can detect the same software.
Diagram titled From program file to findings. Four boxes in a row joined by arrows. Box 1, Program file: machine code that people find very hard to read. Box 2, Disassembler: lists the low-level steps, one per line. Box 3, Decompiler: rebuilds a readable guess at the code. Box 4, shown in green, Findings: web addresses, file names and behaviours for the defence team. A note underneath says Ghidra reads the file without running it, and the work should still happen in a separate practice computer.
Figure 1. Ghidra turns machine code into steps, then into a readable guess, so analysts can pull out findings.

Ghidra was released to the public at the RSA Conference in 2019 [2]. The NSA says it saw hundreds of thousands of downloads in the days after, and over one million public downloads in four years [2].

To install a current release, the project lists a 64-bit Java Development Kit as a requirement [1]. It also warns that some past versions have known security flaws, so users should check its security advisories [1].

A worked example

Farah Achterberg is six months into her first job as a security analyst at a mid-sized logistics firm. A colleague reports a strange email attachment that the email filter let through.

Her lead, who is experienced with Ghidra, asks Farah to sit with her for the analysis. They use the team's practice computer, a virtual machine (a computer simulated inside another computer) with no link to the company network.

The lead first runs the file through the team's sandbox, a closed space that watches what a program does. That shows it tries to reach a web address. Then she opens the file in Ghidra to see why.

In the decompiler view, Farah sees a short piece of code that checks for a file. If the file is missing, the code contacts an address and asks for more instructions. The function names are meaningless labels, so the lead renames them as they go: "check_marker", "fetch_next_step".

They write down three clues: the web address, the file name it checks for and the way it disguises its traffic. Farah adds them to the team's watch list. The network team blocks the address and searches past logs for it. They find no other device in the records available that contacted it.

Farah learns two lessons. Ghidra gives a guess, so findings are checked against what the sandbox saw. And the analysis stays inside the practice computer from start to finish.

Myths and mistakes

What people thinkWhat is true
A decompiler gives back the original code.It gives a readable guess. Original names and notes are usually lost.
Ghidra is a hacking tool.It is a reverse engineering tool. The NSA describes using it to analyse harmful code, and many universities teach with it.
Ghidra runs the program, so it is dangerous.Ghidra mainly reads files without running them. Suspicious files still belong in a separate practice computer.
Any old copy will do.The project warns some past versions have known flaws. Keep it updated.
Studying any software is fine because it is for learning.Licences and laws can limit reverse engineering. Check before you study software you did not write.

What can I do this week?

  • Read the project's own page to see what Ghidra does and what it needs.
  • Set up a practice virtual machine, kept apart from your main computer, before you install it.
  • Practise on a tiny program you wrote or one from course material.
  • Compare the disassembler and decompiler views of the same part.
  • Find out your team's rules for handling suspicious files.

Checklist

  • I got Ghidra from the official project page.
  • My copy is the current release, and I check the security advisories.
  • I use a separate practice computer with no route to work systems.
  • I never run suspicious files on my normal computer.
  • I treat decompiler output as a guess and check it.
  • I write findings down so others can detect the same software.
  • I check licences and rules before studying software I did not write.

Common questions

Is Ghidra really free?

Yes. Ghidra is free and open source under the Apache 2.0 licence, and its code is public on GitHub. It was made by the NSA's Research Directorate and released to the public in 2019. People outside the NSA can suggest fixes and improvements.

What is the difference between a disassembler and a decompiler?

A disassembler lists the computer's low-level steps, one short instruction per line. A decompiler goes further and rebuilds those steps as something close to normal code. Ghidra offers both views, and analysts often switch between them.

Do I need to know programming to use Ghidra?

Some programming helps a lot. You can open Ghidra and explore without it, but making sense of the views takes practice. Many people start by writing a tiny program, then looking at it in Ghidra to see how their own code changes.

Is it legal to reverse engineer software?

Sometimes. The answer depends on the software, its licence and where you are. Studying your own programs or training material is a safe start. For other software, check the licence and local law, or ask your employer. This is general information, not legal advice.

Why would the NSA give away a tool?

The NSA says releasing Ghidra "evened out the cybersecurity playing field" and fits its aim of sharing technology that makes the nation safer. Since release, it has been used in college courses, by technology firms and by people checking devices such as routers.

Where next?

Ready for the detail? Read the practitioner guide: Ghidra for Malware Analysis Guide. It goes further into building a safe analysis lab, scripting and batch analysis, and turning findings into detection rules.

Also useful:

Related NHI Mgmt Group resources: AI-assisted reverse engineering for defenders, Malware for Beginners and Famous Malware Outbreaks for Beginners.

Key terms

Ghidra
A free, open-source reverse engineering tool released by the US National Security Agency.
Reverse engineering
Working out how finished software works without its original code.
Machine code
The low-level instructions a processor runs directly.
Disassembler
A tool that turns machine code into a list of short, low-level instructions.
Decompiler
A tool that rebuilds machine code into a readable guess at the original code.
Virtual machine
A computer simulated inside another computer, often used to keep risky work apart.
Indicator of compromise
A clue, such as a web address or file name, that suggests a system may have been attacked.

Sources and further reading

  1. National Security Agency, "Ghidra" repository and README, GitHub. https://github.com/NationalSecurityAgency/ghidra (accessed 2 Dec 2026).
  2. National Security Agency, "Four Years Later: The Impacts of Ghidra's Public Release", 6 March 2023. https://www.nsa.gov/Press-Room/News-Highlights/Article/Article/3319971/four-years-later-the-impacts-of-ghidras-public-release/ (accessed 2 Dec 2026).

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.