Lesson 8 of 13 · 18m
When the Target Isn't Native Code
.NET decompiles to near-source, PyInstaller to .pyc, and stripped Go keeps its function names — identify the runtime with file and Detect It Easy before picking a tool.
You crack open a "binary" and the normal rules stop applying: file says it's a .NET assembly, or the imports are a single mscoree.dll, or it's a 12 MB blob with build paths embedded, or a PyInstaller bundle that unpacks to bytecode. The wrong mental model is reaching for Ghidra because Ghidra is "the tool." Ghidra shines on native code — for managed and interpreted targets it's the wrong end of the telescope, and the correct tool hands you something far closer to source than any native decompiler ever will.
Identify the runtime before the tool
file gets you halfway; Detect It Easy (diec) gets you the rest — it fingerprints the compiler, packer, and framework from signatures, and it's what everyone actually runs first. After that, match the tool to the runtime:
- .NET / Mono — ILSpy or dnSpyEx decompile the IL to near-source: real names, real types, real structure. Bytecode keeps almost everything. Obfuscated .NET uses
ConfuserEx-style name mangling, but the IL is still faithful — you fight cosmetics, not mechanism. The edge case is NativeAOT, which compiles .NET straight to native code: ILSpy refuses the file anddiecreports plain C++, so check for AOT before assuming a packer. - AutoIt and other script-compiled droppers — the EXE is an interpreter carrying a tokenized script;
Exe2AutormyAutToExepull the script back out. Commodity droppers ship this shape constantly. - Java — the
.class/.jarbytecode decompiles cleanly with JD-GUI, jadx, or Recaf. Names survive in the constant pool unless an obfuscator stripped them. - Python — PyInstaller bundles extract with
pyinstxtractor; the.pycbytecode inside decompiles withpycdc(Decompyle++) orpylingual. The "compiled binary" was a zip archive with an interpreter glued on. - Electron —
app.asaris an archive of JavaScript.npx asar extractand you're reading the actual source the app shipped. - Go — native, but the binary carries its own metadata:
go version -m ./binaryprints the build info, and thepclntabkeeps real function names even "stripped." Ghidra's Go analyzer andgolang_loader_assist-style scripts recover them — a stripped Go binary is never anonymous. - Rust — native with mangled symbols, but panic messages embed
src/main.rspaths and line numbers. The strings tell you which crate, which file, which line — the binary annotates itself.
Proof at incident scale
This is exactly how the fractureiser incident played out in June 2023. The Minecraft-mod malware was written in Java — which meant the defenders didn't reverse it so much as read it: bytecode decompiles to near-source, the infection stages and C2 flow were legible within days, and the writeup named classes and methods because the names were still there. If fractureiser had been written in C, that analysis would have taken weeks. The runtime chose the difficulty, not the defenders' skill.
The discipline that transfers
Everything else in this course still applies — anchor on strings, follow references, verify dynamically — but the tool changes shape:
- For managed code, the "decompiler" is nearly perfect; your effort shifts to obfuscation: renamed symbols, string decryption loops, control-flow flattening (ConfuserEx's
switchsoup is the managed-world equivalent of a packed binary). - For interpreted bundles, the extraction step is the work — after
pyinstxtractorandpycdc, you're triaging Python, not assembly. - For Go/Rust, the fight is volume, not opacity: huge statically-linked runtimes, real names buried under thousands of generated functions. Let the toolchain metadata (
go version -m, panic strings,pclntabrecovery) do the naming before you read a single instruction.
Field notes
- Run
fileanddiecbefore you pick a tool — thirty seconds decides whether the job is disassembly or de-obfuscation. - Managed malware is managed: .NET stealers and Java loaders decompile like any other .NET/Java. The analysis skill transfers; the tooling doesn't.
- A "binary" that turns out to be a script bundle isn't a failed target — it's a faster one. Take the near-source win and move on.
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.