Disassembly Basics
Ghidra and IDA.
Disassembly Basics is a free Ethical Hacking Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Ethical Hacking Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
What Is Disassembly?
Disassembly converts a binary's machine code back into human-readable assembly instructions. It lets you read exactly what the CPU will execute.
This is essential when source code is unavailable, as is always the case with malware.
Disassembly vs Decompilation
Disassembly produces assembly. Decompilation goes further, reconstructing approximate high-level C-like pseudocode.
Pseudocode is faster to read; assembly is precise. Analysts use both, switching as needed.
Ghidra
Ghidra is a free, open-source reverse engineering suite from the NSA. It disassembles many architectures and includes a strong decompiler.
Its price and capabilities make it the go-to starting tool for most analysts.
IDA Pro
IDA Pro is the long-standing commercial standard, known for its powerful disassembler and (with the Hex-Rays plugin) decompiler.
IDA Free and other tools like Binary Ninja and radare2/Cutter are popular alternatives.
Loading the Binary
You import the sample into the tool, which auto-analyzes it: identifying functions, cross-references, and strings.
The tool builds a map of the program you can navigate, starting from the entry point or interesting imports.
Reading Assembly
Assembly instructions move and operate on data. A few common x86 ones:
mov: copy data.push / pop: stack operations.call / ret: function call and return.cmp / jmp / je: comparison and branching.
mov eax, [ebp-4]
cmp eax, 0
je short loc_401050Cross-References
Cross-references (xrefs) show where a function or string is used. Finding xrefs to a suspicious API like CreateRemoteThread jumps you straight to the relevant code.
This lets you navigate by behavior rather than reading top to bottom.
Following API Calls
Imported Windows API calls reveal intent. Seeing VirtualAlloc then WriteProcessMemory then CreateRemoteThread is a classic process injection sequence.
Recognizing these patterns is the heart of malware reversing.
Graph View
Disassemblers offer a graph view showing basic blocks and the branches between them. This visualizes a function's control flow, making loops and conditionals easy to follow.
It is far more readable than a linear instruction listing for complex logic.
Combining with Debugging
Static disassembly pairs well with a debugger. When code is obfuscated or self-modifying, you can set breakpoints and step through it at runtime to see the real instructions.
This bridge to dynamic analysis is crucial for packed samples, which the next lesson covers.
Renaming and Annotating
As you understand functions and variables, rename them and add comments in the disassembler. Turning sub_401000 into decrypt_config makes the rest of the analysis far easier.
This incremental labeling is how analysts gradually reconstruct a malware sample's full logic.
Quick Check
Recall the difference between Ghidra's two main outputs.
Recap
You now understand disassembly basics:
- Disassembly yields assembly; decompilation yields pseudocode.
- Ghidra (free) and IDA Pro are the main tools.
- Use cross-references and API call patterns (like injection sequences) to navigate by behavior.
- Graph view visualizes control flow; pair with a debugger for obfuscated code.
Next you will defeat packers with unpacking.
Frequently asked questions
Is the “Disassembly Basics” lesson free?
Yes — the full text of “Disassembly Basics” is free to read here on the web, and the Ethical Hacking Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Ethical Hacking Academy course, upgrade to CoddyKit PRO.
What will I learn in “Disassembly Basics”?
Ghidra and IDA. You practise Ethical Hacking Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Ethical Hacking Academy?
No prior experience is required. Ethical Hacking Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Disassembly Basics” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Ethical Hacking Academy lesson?
Yes. Every Ethical Hacking Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Static Analysis
- Dynamic Analysis
- Disassembly Basics
- Unpacking