Lesson 1 of 9 · 23m
First Contact: Binary Triage Before Disassembly
Establish file format, architecture, linkage, packing, imports, and provenance before spending hours inside a disassembler.
The worst reverse-engineering sessions begin with someone opening a binary in the biggest tool they own and scrolling until they feel busy. Good analysts do the opposite: they spend the first twenty minutes refusing to read instructions. Triage tells you what kind of problem this is — architecture, operating system, compiler habits, library boundaries, packing, and whether the binary is even worth static analysis.
Start with boring facts
Use multiple small tools because each answers a different question:
file ./sample
sha256sum ./sample
readelf -h ./sample 2>/dev/null | head -30
readelf -S ./sample 2>/dev/null | grep -E '\.(text|data|rodata|plt|got)'On Windows PE files, use objdump -x, rabin2 -I, or a PE parser. You are looking for architecture, entry point, ELF/PE type, section layout, interpreter, stripped status, and whether this is a shared object, executable, driver, or installer wrapper.
Imports reveal intentions and boundaries
Imported functions are the binary's confessions. They reveal networking, crypto, process manipulation, file access, service interaction, and UI dependencies:
readelf -Ws ./sample 2>/dev/null | grep UND | head -40
objdump -T ./sample 2>/dev/null | grep -E 'UND|NEEDED'A Linux binary importing connect, getaddrinfo, dlopen, ptrace, and mprotect tells a different story from one importing sqlite3_exec and curl_easy_perform. These are leads, not conclusions. Dynamically resolved API names may not appear until runtime.
Strings are evidence, not truth
strings remains useful if you treat it as a witness with imperfect memory:
strings -a -n 5 ./sample | head -50
strings -a -el ./sample | head -50ASCII and UTF-16LE strings both matter. Look for file paths, URLs, usage text, assertions, compiler paths, log messages, embedded configuration, and format strings. A string saying DEBUG=1 does not prove a debug mode exists; it gives you a cross-reference target.
Recognize packing before trusting structure
Tiny .text sections, huge high-entropy blobs, few imports, suspicious section names, and an entry point far from normal compiler startup suggest packing or a loader. Check entropy carefully and compare disk size with mapped size. Do not unpack blindly: first determine whether the file is a self-extracting installer, a language runtime bundle, or actual obfuscation.
Field notes
- Hash the sample before analysis and record source provenance. Reverse engineering without chain of custody becomes archaeology.
fileoutput is easy to spoof; cross-check with headers and section structure.- Static linking removes helpful import boundaries and makes libraries look like application code.
- Do not run unknown binaries just because triage is slow. Dynamic analysis is a separate risk decision.
Was this lesson helpful?