Lesson 1 of 13 · 20m
What the Compiler Actually Throws Away
Instructions, constants, and dynamic symbols survive compilation while names, types, and structure don't — and the xz backdoor proved the binary is sometimes the only truth that exists.
Every binary you open is the fossil record of a program. The compiler took source — intent, names, structure — and kept only the mechanism: instructions, data layouts, and whatever constants and symbols happened to survive. New reversers get the mental model wrong in a specific way: they think the job is reading assembly front to back, the way you'd read a listing. It isn't. The job is reconstructing intent from mechanism, and the first skill is knowing exactly which parts of the fossil are still legible.
What survives compilation
- Instructions and control flow — the mechanism, faithfully preserved, though rearranged and optimized past any resemblance to the source text.
- Constants and string literals — format strings, error messages, magic numbers, crypto tables. Often the most legible artifact in the entire file.
- Dynamic symbols —
.dynsymkeeps imported and exported names because the runtime linker needs them at load time.stripremoves.symtab, not.dynsym:nmcan show "no symbols" while the import table still names every libc call the program makes. - Sometimes, everything — a
-gbuild embeds DWARF: line numbers, types, struct layouts, local variable names. Check before assuming the worst.
What gets erased
- Variable names, type declarations, comments — gone entirely.
- Function boundaries become conventions, not facts: a "function" is just a call target with a prologue-like shape.
if,while,for, andswitchcollapse into one primitive — compare, set flags, conditional jump.- Data structures dissolve into pointer arithmetic.
user->namebecomesmov rax, [rdi+0x18]and nothing in the file records that offset0x18was ever calledname. - Compile-time
sizeofknowledge dissolves too — the binary knows a struct is 32 bytes only through the stride of its indexing arithmetic:[rcx+rax*4]is all that remains ofint arr[]. - Dead code vanishes. Anything the optimizer proved unreachable isn't in the file at all — the binary describes only the behavior that can execute.
The binary is the only truth
The wrong mental model isn't "assembly is hard." It's "the source would explain this." Sometimes there is no source that explains the binary in front of you. In March 2024, a backdoored liblzma shipped inside xz 5.6.0 and 5.6.1 — CVE-2024-3094. The payload lived in binary test fixtures in the repository, extracted and linked during the build; the malicious code never existed in the published source tree at all. Andres Freund noticed sshd burning CPU under valgrind, and the people who dissected the mechanism worked from liblzma.so.5.6.1 itself. The binary doesn't merely survive when source is withheld — sometimes it's the only place the truth ever existed.
The ELF, at rest
$ file crackme
crackme: ELF 64-bit LSB pie executable, x86-64, dynamically linked, stripped
$ readelf -S crackme | grep -E "text|rodata|data"
[13] .text PROGBITS 0000000000001060 001060 0001a3
[15] .rodata PROGBITS 0000000000002000 002000 000048
[23] .data PROGBITS 0000000000004010 003010 000010.text is code, .rodata is constants and strings, .data is initialized globals, .bss is zero-initialized globals that occupy no file space. Sections are bookkeeping for the linker; what the kernel maps comes from the program headers (readelf -l), which is its own lesson. A stripped, PIE, dynamically-linked binary is the default posture — assume it until file says otherwise.
The file also fingerprints its own toolchain. readelf -p .comment crackme prints the compiler's name and version (GCC: (GNU) 13.2.0), and readelf -n shows the Build ID — the hash a distro's debug packages key on. Free provenance before you've read a single instruction; when file says stripped, the Build ID is what lets eu-unstrip marry the matching .debug copy back onto the binary.
Field notes
- Run
file,strings, andreadelf -Sbefore anything else — thirty seconds of triage tells you the architecture, the packing posture, and whether symbols exist. - Unstripped symbols are a gift, not the norm.
nm -Con a C++ binary even demangles the names for you. - A
-gbuild changes the job's category: DWARF means the debugger can show you source-level truth. Load it there, not just in the disassembler. - Stripped is not opaque. Imports still have names, strings still have text, and constants still fingerprint algorithms — you lost the labels, not the evidence.
Keep reading
Related articles from the SudoSecurity blog.
A Fake GTA 6 ISO Didn’t Install a Game. It Installed a Wiper.
A fake GTA 6 ISO used a believable installer error to cover remote-access malware, browser-data theft, and destructive file wiping. The “License not found” message wasn’t the crack failing. It was there so the victim would stop looking.
CVE-2025-62718: Critical Axios SSRF Vulnerability Explained
A critical SSRF flaw in Axios was used in a North Korean supply chain attack. Here's what it does and how to patch it today.
Hacktivism, 2021 to Today: From Steel Mills to Power Grids
Part 1 ended on a 70-gigabyte breach in 2021. Since then, hacktivists derailed trains, dumped molten steel on camera, and reached grids in three countries.
What is an Infostealer?
Infostealers are commodity malware that silently harvest credentials, session tokens, and crypto wallets from infected machines. The Lumma Stealer infection that triggered the Vercel breach started with one. Here is how they work and why they are so effective.