Before
- Run auto-analysis and trust the decompiler
- Rename from strings
- Report every import as behavior
Module 6 of 17
Use Ghidra to answer a bounded defensive question about a transparent, source-built utility.
Start here
Before
After
Do not open Ghidra with the goal “understand everything.” Begin with a question tied to an authorised decision. For the course utility, the question is: Which functions read the fixed instructor-authored input, validate records, calculate the summary, and write the declared output? The question defines which code paths deserve attention.
Record artifact hash, provenance, architecture, tool version, project location, loader choice, language, compiler hints, image base, and analysis options. Import a verified working copy and keep the supplied original unchanged. Ghidra projects contain analyst-generated metadata and must remain inside the authorised lab.
Start with program information, memory map, entry points, discovered functions, external symbols, imports, exports, strings, and analysis messages. Look for parse errors and regions not analysed. Use strings and references as navigation aids, not as proof that a behavior executes.
Trace from a known boundary such as the program entry, a harmless error message, a fixed fixture filename, or an imported library function. Review callers and callees. Mark the evidence that connects a function to the bounded question before giving it a descriptive name.
Automatic analysis is a starting point. It may misidentify code, data, function boundaries, parameters, or types. A polished decompiler view can still be wrong.
The listing preserves instructions, addresses, references, and raw data. The decompiler presents a high-level hypothesis. Keep both visible. When the decompiler shows a condition, confirm the comparison and branch in the listing. When it proposes a parameter type, inspect call sites, instruction width, memory use, and relevant ABI rules.
Follow data from a controlled input to validation and output. Identify bounds checks and error paths. The course utility operates only on fixed, instructor-authored text, so there is no reason to introduce arbitrary input paths or modify the program. The exercise is analysis, not feature development.
Rename a function after evidence supports a role, and keep uncertainty in the name or comment when it does not. Apply types when size, use, call sites, or known API contracts justify them. Add comments that separate observation from interpretation. Avoid names that claim intent, actor, or malware family.
Use a function-summary table: entry address, proposed name, purpose, inputs, outputs, important calls, side effects, evidence, confidence, and open questions. Save notable address references so another authorised reviewer can reproduce the path.
If analysis options or types change, record the change and reconsider affected decompiler output. Analyst edits can improve a model, but a wrong type can also make later code look convincingly wrong.
Compare the recovered flow with the harmless source, compiler-generated assembly, known test input, and declared synthetic output. The point is not to prove Ghidra agrees with source; it is to understand where the binary supports, transforms, or leaves ambiguity around the source-level model.
Write conclusions with evidence locations and confidence. Note unanalysed regions, indirect calls, missing symbols, parser warnings, and assumptions. If the utility's hash, filesystem scope, privilege, or observed behavior differs from its manifest, stop, power off the guest, and follow the course escalation path.
Decompiler findings become valuable when they improve engineering. A hard-coded endpoint can become a reviewed configuration with an allowlist. An ambiguous parser boundary can gain explicit validation and telemetry. A release with weak provenance can gain reproducible build metadata and signature verification.
Keep recommendations proportional. Do not infer a hidden capability from an unreachable string or unused import. State which path is proven reachable, which is merely present, and what test or source evidence would reduce uncertainty.
The published duration includes active practice, not video playback alone. Complete each block with the course-owned evidence and retain the stated deliverable so another reviewer can reproduce your reasoning.
| Study block | Time | Required evidence |
|---|---|---|
| Guided lesson and primary-source review | 1h 48m | Annotated notes that separate observations, hypotheses, limits, and version-sensitive facts. |
| Worked evidence walkthroughs | 1h 30m | Reproduce the lesson's tables or decision flow and challenge at least two assumptions. |
| Independent practice rounds | 1h 30m | Apply the method to two alternate records in the sanitized evidence pack and compare the conclusions. |
| Required lab | 4 hours | A reproducible Ghidra project record, evidence-linked call and control-flow map, function-summary table, source comparison, limitations, confidence labels, and teardown record. |
| Knowledge check and review | 1h 12m | Answer the evidence check, review the rubric, and record one production follow-up. |
Question: Ghidra automatically names a function and shows a clean parameter list in the decompiler. What should an analyst do before using that interpretation in the report?
Validate the function boundary, callers, call sites, argument locations, instruction widths, references, and relevant ABI or known API signature. Treat automatic names and types as hypotheses, record supporting evidence, and keep uncertainty visible.
Use these primary sources for the current standard or tool behavior. The course records framework versions so mappings can be reviewed when upstream guidance changes.
Real world
Production notes
Common mistakes
Security risks
Tradeoffs
Pros
Cons
Pros
Cons
Think like an engineer
Key terms
A representation that decodes machine-code bytes into architecture instructions.
A reconstruction of a plausible high-level representation from lower-level program information.
A recorded relationship showing where an address, function, or data item is referenced.
Whether control flow can arrive at a block or function from a stated entry path under given conditions.
A name, type, comment, bookmark, or other interpretation added during analysis.
Exercises
Answer a bounded question about the course utility and produce a reproducible function map without analysing or executing an unknown binary.
Expected evidence
A reproducible Ghidra project record, evidence-linked call and control-flow map, function-summary table, source comparison, limitations, confidence labels, and teardown record.
Assessment criteria
Course-owned resources
Teardown
Recap
Related resources