Reverse Engineering: How Analysts Work Out What Software Does
A program can work perfectly while its inner workings remain a mystery. When the author's source code—the instructions they wrote—is missing, an analyst has to work backward from the finished file.
Reverse engineering means studying an existing program to understand how it works. An analyst can inspect its files and instructions or observe its behavior while it runs. This can help investigate suspicious downloads, examine software weaknesses or make sense of an unfamiliar system.
Source code doesn't have to be missing. Engineers can also study available source to reconstruct a system's design. A Carnegie Mellon Software Engineering Institute research project did this using code written in the Java programming language.
Find Bugs by Throwing Junk at Your Code
A Network Address Is a Clue
Suppose an analyst finds a network address inside suspected malware, software designed to cause harm.
Inspecting the file without running it is static analysis. The analyst can study instructions, file structure and strings: sequences of readable text, such as messages or filenames.
The stored address doesn't show that a connection occurred. The analyst needs to trace where the program uses it and what makes that code run.
FIRST, an international organization of security and incident-response teams, describes how static inspection, behavior observation and code analysis contribute different evidence in its Malware Analysis Framework.
Reading a Program After Compilation
For compiled software, a tool called a compiler turns source code into instructions the computer can execute. It can rearrange operations or remove unused parts, so the finished instructions may differ greatly from the source. The GDB debugging manual explains these changes.
A disassembler turns those machine instructions into assembly language, a readable notation closely tied to the computer's operations. It helps the analyst follow what the machine is being told to do.
A decompiler tries to reconstruct higher-level code, closer to the kind a programmer might write. That view can make the program's decisions easier to follow, but it remains a reconstruction. NIST's code-analysis definitions distinguish these tool roles.
Neither tool promises to restore the original project. The author's notes and reasons for design choices may not be present in the file. Debugging information, which links the finished program to original names and source locations, can also be removed. The GNU Binary Utilities documentation describes that removal.
Ghidra, a software reverse-engineering toolkit, lets analysts correct suggested names and data types, the categories of values the program handles. Its training guide shows why these corrections matter to the reconstructed code.
- See what two chips are saying to each other instead of guessing.
- Debug eight signal lines at the same time.
- Capture fast signals with sampling up to 24MHz.
Watch the Condition Play Out
Dynamic analysis studies the program while it runs. It can reveal files being changed, other programs being started and network connections being attempted. A debugger lets an analyst pause execution and inspect what the program is doing and the values it holds.
Return to the address found earlier. Code inspection may suggest that the program contacts it only after receiving a certain input. Observing that behavior under the stated condition can strengthen the explanation. Recording the connection attempt still doesn't establish who controls the remote system or what happened on another computer.
For suspected malware, this work belongs in a purpose-built, isolated analysis environment. Running the file on an everyday work laptop would put that laptop and its data at risk. NIST's malware-handling guide describes isolated test systems and notes that malware can recognize an analysis environment and change its behavior.
A quiet test run leaves questions open. The program may be waiting for an input, delaying its activity or missing another component it needs. Static and dynamic findings help an analyst decide what remains to examine; neither supplies a complete verdict by itself.
A careful report would distinguish the address stored in the file, the instructions that use it and the connection attempt actually observed. The next investigator needs to know which finding supports each conclusion.
Disassembly Explained: Reading What a Program Tells the Processor

Sandboxing: Deciding What a Program Can Reach

Thomas Dullien: The Reverse Engineer Behind BinDiff

QUOTE:
"Amateurs hack systems, professionals hack people."
