Join our Newsletter — 33% off our NHI Course
Home› Guides› Reverse Engineering for Beginners: How Defenders Read Software…
Guide Incident Response & Forensics

Reverse Engineering for Beginners: How Defenders Read Software Without Its Code

PDF for newsletter subscribers · free to read online

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

Reverse engineering is working out how finished software works when you do not have its original code.

This guide is for students, career changers and anyone curious about how security teams look inside programs. You do not need to code to follow it. If your business relies on software from a supplier, reverse engineering is one way experts check what that software really does.

In short

  • Programs are usually shipped as machine code, which people cannot easily read.
  • Reverse engineers use tools that turn machine code back into something closer to human-readable steps.
  • Defenders use it to study harmful software, find weak spots and keep old systems working.
  • It needs an isolated test computer, permission and a check of the law where you live.

What you will learn

  • Explain what reverse engineering is in one sentence.
  • Describe the difference between source code and machine code.
  • Spot the legal and safety checks that come before any analysis.
  • Choose a safe first step if you want to learn the skill.
The recipe (source code)
the instructions a programmer writes, in words people can read.
The baked cake (machine code)
the finished program the computer runs, stored as numbers.
Taking apart (reverse engineering)
working backwards from the finished program to understand how it works.

What is reverse engineering?

Think of tasting a cake and working out its recipe. You cannot see the recipe card, so you study the slices, the layers and the flavours instead.

Software is made in a similar way. A programmer writes source code, a set of instructions in a language people can read. A tool called a compiler then turns that source code into machine code, the numbers a computer runs. Most apps you install arrive as machine code only.

Reverse engineering works backwards. A specialist uses tools to turn the machine code into a form people can study, then works out what each part does.

Where the comparison stops working: a cake can only tell you so much. A program can be studied line by line, and some tools can rebuild a rough version of the recipe. That rough version is a guess, though, so names and comments from the original are usually gone.

Why does it matter?

Defenders often face software they did not write and cannot get the code for. Reverse engineering is how they find out what it actually does.

If you are a student thinking about a security career

What could happen: you hear "reverse engineering" in job adverts and assume it is out of reach.

Check this: start with how computers run programs, then try a free tool on practice files.

Next: Malware Analysis for Beginners

If you run a business on older software

What could happen: a supplier closes, and nobody knows what their program sends or stores.

Check this: list software with no supplier support and ask your IT provider how it is checked.

Next: Asset Inventory for Beginners

If you manage a security team

What could happen: staff analyse a suspicious file on a normal work laptop and spread it.

Check this: agree written rules for where analysis happens and who approves it.

Next: Malware Analysis for Beginners

What does it look like?

Here is a made-up view of one small part of a program, shown three ways. No real program is shown.

Example only. All values are made up.

Raw bytes:      00 00 FA KE 00 00 EX AM          (1)
Disassembly:    compare  value, 0000              (2)
                jump-if-equal  show_EXAMPLE_error
Decompiled:     if (licence_code == 0000) {       (3)
                    show_error("EXAMPLE");
                }
Analyst note:   "checks licence code, see FAKE-01" (4)
  1. In a real file, this line would contain the program's machine code as plain numbers.
  2. A disassembler turns those numbers into short instructions people can read slowly.
  3. A decompiler guesses a rougher, friendlier version that looks more like the original source code.
  4. The analyst writes down what each part seems to do. This note is what the work produces.

Why this is risky: if the file is harmful, opening or running it on an everyday computer can infect it. Taking apart software you have no right to study may also break the law or a licence.

The safer way: work on an isolated test computer that holds nothing important, and get written permission first. Most of this work only reads the file without running it.

How does it work?

Every project is different, but most follow the same broad steps.

  1. Agree the reason and the rules. The team writes down why the file is being studied and who has approved it. Laws differ by country, so they check what is allowed.
  2. Set up a safe place. The file goes onto an isolated test computer, cut off from the work network.
  3. Look at the outside. The analyst notes the file type, any readable text inside it and its fingerprint (a short code made from its contents).
  4. Open it in a tool. A disassembler and decompiler turn the machine code into readable instructions. One free example is Ghidra, made and maintained by the US National Security Agency. It can disassemble, decompile and draw diagrams of how code connects.[1]
  5. Work out the story. The analyst follows the important parts, such as what the program sends, saves or checks, and gives them clear names.
  6. Write it up. The findings become a short report with actions, such as blocking a web address or fixing a weak spot.
Diagram titled From recipe to cake and back. Top row, left to right, labelled How software is made: source code that people write, a compiler, and machine code the computer runs. Bottom row, left to right, labelled How reverse engineering works: machine code, a disassembler that shows readable instructions, a decompiler that gives a rough rebuilt version, and an analyst's notes. A green bar says the rebuilt version is a careful guess, not the original code.
Figure 1. Building software goes one way. Reverse engineering works back the other way, and the result is a careful guess.
Before and after diagram titled Where to do the work. Left panel, labelled Risky: the file is opened on an everyday work laptop, the laptop is on the office network, nobody approved the work, and no notes are kept. Right panel, labelled Safer: the file is opened on an isolated test computer, the test computer is cut off from work systems, the work is approved in writing, and findings are written up. A green bar says permission, isolation and notes come before any tool.
Figure 2. The safety checks come before the tools.

The law sets limits on taking software apart. In the UK, for example, decompiling is allowed only in narrow cases. The main one is making another program work with it, when the information is not already available.[2] In the US, a separate law limits getting around copy protection, with exemptions reviewed every three years.[3] This page is not legal advice. Ask your employer or a lawyer before you study software you do not own.

A worked example

Kemal Jensen is a junior analyst at a small IT support firm. One customer is Thistle Brewery, a fictional business that prints its labels with an old program. The company that made the program closed years ago.

The brewery's manager, Fen Strand, asks a simple question. "Is this program still safe to use?" Nobody has the source code, so Kemal's team lead, Wren Bergmann, suggests a short look inside.

First, Wren checks the brewery's licence and gets Fen's written approval for the work. Kemal copies the program onto an isolated test laptop with no work data on it.

Kemal remembers the cake and its missing recipe. He cannot read the program's code directly, so he opens it in a free decompiler. He looks for web addresses and anything to do with updates.

He finds that the program checks for updates at a web address, shown here as updates.example.invalid. Wren looks it up. The web address is no longer registered, so a stranger could buy it and offer a harmful "update".

Kemal writes a one-page note in plain words. The brewery blocks that web address on its network and turns off the update check. Fen also adds "replace the label program" to next year's budget.

Kemal did not run the program on any work computer, and he kept his notes in the customer's file.

Myths and mistakes

What people thinkWhat is true
Reverse engineering is only for hackers.Defenders use it to study harmful software, check suppliers' programs and keep old systems working.
A decompiler gives you the original code back.It gives a rebuilt guess. Names, comments and layout are usually lost.
If I own a copy, I can take it apart however I like.Laws and licences set limits that differ by country.[2] Check before you start.
It is fine to open a suspicious file on my own laptop.Use an isolated test computer that holds nothing important.
You need to be a genius at maths to learn it.Patience, curiosity and good notes matter more at the start.

What can I do this week?

  • Read about how a computer turns source code into a program it can run.
  • Install a free tool, such as Ghidra, on a spare or virtual computer, not your main one.
  • Practise on small programs you wrote yourself or on files made for learning.
  • If you lead a team, write down who may approve reverse engineering work and where it happens.

Checklist

  • There is a written reason and approval for the work.
  • The licence and local law have been checked.
  • Analysis happens on an isolated test computer.
  • Suspicious files are stored and moved in a way that stops them running by accident.
  • Tools come from their official sources and are kept up to date.
  • Findings are written up in plain words with clear actions.
  • Sensitive findings, such as a new weak spot, are shared only with people who need them.

Common questions

Is reverse engineering legal?

Sometimes. It depends on where you are, what you study and why. Many countries allow it in limited cases, such as making programs work together. Licences can add their own terms. This is not legal advice, so check with your employer or a lawyer before studying software you do not own.

Is reverse engineering the same as malware analysis?

No, but they overlap. Malware analysis is the study of harmful software. Reverse engineering is one of its deepest methods. It is also used on normal software, for example to check a supplier's program or read an old file format. See Malware Analysis for Beginners.

Do I need to know programming first?

Yes, some basic programming helps a lot. Knowing how a simple program is written makes its machine code far easier to follow. Many people learn one easy language, then the basics of how processors run instructions, before they open a disassembler.

What tools do reverse engineers use?

Mainly disassemblers and decompilers. They also use test computers that can be reset. Ghidra is a free example, made by the US National Security Agency for Windows, macOS and Linux. Several paid and free tools do similar jobs, and the skill matters more than the tool.

Can reverse engineering help after a cyber attack?

Yes. When a team finds an unknown harmful file, reverse engineering can show what it did, what it contacted and how to spot it elsewhere. Those findings help the team clean up and block the same attack next time.

Where next?

Ready for the detail? Read the practitioner guide: Ghidra for Malware Analysis Guide. It goes further into setting up the tool safely, how defenders use it on real cases and how findings feed detection rules.

Also useful:

Related NHI Mgmt Group resources: Binary Software Composition Analysis Guide · Indicators of Compromise for Beginners · Cybersecurity Careers Guide

Key terms

Reverse engineering
Working backwards from finished software to understand how it works.
Disassembler
A tool that turns machine code into short instructions people can read.
Decompiler
A tool that rebuilds a rough, readable version of a program's source code.
Static analysis
Studying a program without running it.
Dynamic analysis
Running a program in a safe test space and watching what it does.
Obfuscation
Deliberately making code hard to read, to slow down anyone studying it.
Ghidra
A free reverse engineering tool made by the US National Security Agency.

Sources and further reading

  1. Ghidra Software Reverse Engineering Framework (project page). National Security Agency, GitHub. https://github.com/NationalSecurityAgency/ghidra, accessed 28 Nov 2026.
  2. Copyright, Designs and Patents Act 1988, section 50B: Decompilation. legislation.gov.uk, UK Government. https://www.legislation.gov.uk/ukpga/1988/48/section/50B, accessed 28 Nov 2026.
  3. Section 1201 rulemaking. U.S. Copyright Office. https://www.copyright.gov/1201/, accessed 28 Nov 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.