Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Technique:Identifying the toolchain of a binary

From ReverseEngineering.wiki
Technique
On this wiki Facts · Code · Notes · Topics

How to tell which compiler, linker, installer or packer produced a Windows executable from its headers, sections, overlay and strings, with a table that links to the wiki page of each toolchain.

Order of checks

  1. Headers: DOS stub (Microsoft, lld-link, Borland, see Format:DOS MZ executable), Rich header and linker version (Format:PE (Portable Executable)/Rich header, Fact:PE (Portable Executable)/identification/Linker from PE headers), CLR header for .NET.
  2. Sections: unusual names (.vmp0, .themida, .MPRESS1, .UPX0, .wixburn, _cabinet, .drectve) name a protector, packer or installer. High entropy in the first section and a section with raw size 0 and large virtual size suggest packing.
  3. Entry point bytes: stubs such as 60 E8 00 00 00 00 5D (pushad, call, pop ebp) are shared by many packers; compare with the table below.
  4. Overlay (data appended after the last section): installers keep their payload here (Format:NSIS installer, Tool:Inno Setup, Tool:InstallShield, Tool:WiX Toolset, Tool:Advanced Installer).
  5. Strings and resources: GCC: (, Go build ID:, .rs paths, io.nim, resource SCRIPT, Compiled AutoIt Script.
  6. Run Tool:Detect It Easy for a second opinion; it is heuristic.

Table

Toolchain Marker Page
MSVC (cl, link) Rich header, linker 6.0-14.x Platform:Microsoft Visual C++ ABI
MinGW / GCC linker 2.xx, 'GCC: (' in .rdata, no Rich header Tool:MinGW
Delphi / C++Builder Borland DOS stub, 07 08 'TControl' RTTI Tool:Delphi
Go 'Go build ID:', pclntab, buildinfo Library:Go runtime, Format:Go buildinfo, Format:Go pclntab
Rust 'mod.rs' and .rs paths in .rdata Tool:Rustc
Nim 'io.nim' / 'fatal.nim' Tool:Nim
PureBasic 'pb_datapointer' in .drectve Tool:PureBasic
AutoIt resource SCRIPT, overlay A3 48 4B BE 98 6C 4A A9 Tool:AutoIt
NSIS 'NullsoftInst' firstheader with 0xDEADBEEF Format:NSIS installer
Inno Setup 'Inno Setup Setup Data', overlay 'zlb' / 'idska32' Tool:Inno Setup
InstallShield overlay 'ISSetupStream' / 'ISc(' Tool:InstallShield
WiX Burn overlay 'MSCF', .wixburn Tool:WiX Toolset
Advanced Installer overlay 2F 30 EE 1F 5E 4E E5 1E Tool:Advanced Installer
UPX sections UPX0/UPX1, 'UPX!' Tool:UPX
ASPack EP 60 E8 ... stubs Tool:ASPack
MPRESS .MPRESS1/.MPRESS2 Tool:MPRESS
VMProtect .vmp0 .vmp1 .vmp2 Tool:VMProtect
Themida / WinLicense .themida / .winlice Tool:Themida
Enigma Protector 'ENIGMA' build record in the last section Tool:Enigma Protector

Protectors are listed for recognition only; this wiki does not document removing them. Bundled script runtimes (PyInstaller, Electron, ...) are in Technique:Bundled-runtime applications.

Pitfalls

  • Section names and many strings are trivially edited; one marker is a lead, two independent markers are evidence.
  • Packers change the picture: identify the packer first, then look again after the payload is in memory.
  • Installers are often Delphi or MSVC programs themselves: the toolchain of the stub is not the toolchain of the packaged program.
  • Container formats seen in overlays: Format:Compound File Binary (MSI, magic D0 CF 11 E0), Format:Microsoft Cabinet (MSCF), Format:MSIX package, Format:MSU update package and Format:Squirrel.Windows package (Electron per-user installers: RELEASES plus .nupkg); unpack them before looking for the real program.