EXE and Binary Analyzer
Operator: Abdulla Al Fahad. How tools are built and checked
A binary you did not build raises three questions before anyone runs it: what is it, what does it ask the operating system for, and has anyone tampered with it since it was signed. This page answers them by reading the file as data. It parses Windows PE, Linux and BSD ELF, and macOS Mach-O files (including universal binaries) and reports headers, sections, imports, exports, resources and signature data. Files up to 192 MB are accepted and nothing in them is executed.
Key features
- PE: machine, subsystem, compile timestamp, entry point and its section, DLL characteristics (ASLR, DEP, Control Flow Guard), stored versus computed checksum, imports, delay imports, exports with ordinals and forwarders, version information, manifest, TLS callbacks, Rich header, PDB path and overlay size
- ELF: class, type, machine, interpreter, sections and segments, dynamic section (needed libraries, SONAME, RPATH, RUNPATH), imports and exports from the dynamic symbols, build ID, and hardening facts (PIE, non-executable stack, RELRO, stack-protector symbol, fortified calls)
- Mach-O: each architecture slice of a universal binary, load commands, dylibs, rpaths, UUID, build version, symbols and the embedded code-signature blob list, including identifier and team ID
- Shannon entropy for every section, from the section's own bytes, with high values highlighted
- Authenticode on PE files: embedded certificate chain, the image digest stored in the signature next to the digest the page computes from the file, the check that the signed attributes really cover that stored digest, and a check of the signature value against the signer certificate's key
- Strings in ASCII and UTF-16 with a text or /regex/ filter (patterns with nested repeats such as (a+)+ are refused, because they can freeze a browser tab), and simple C++ name demangling
- SHA-256 and SHA-1 of the file, a present-or-absent list of signature and packer markers, and JSON or HTML reports that leave the strings out
What is read from each executable format
The three formats differ in how they record what a program needs. A PE file lists imports by DLL in an import directory; the page walks the import name table for each DLL and records hint numbers and ordinals. ELF files record needed libraries in the dynamic section, but the undefined symbols in .dynsym are not tied to a single library, so the page lists them together. Mach-O records dylibs in load commands and external undefined symbols in the symbol table.
Indicators are name and structure matches, not detections. A PE that imports VirtualAllocEx, WriteProcessMemory and CreateRemoteThread together is flagged because that set is how code is injected into another process; backup tools, debuggers and anti-virus software import the same functions. Sections are flagged for entropy above 7.2 bits per byte, for being both writable and executable, or for a code section many times larger in memory than on disk. An entry point in the last section, an unusual section name, a zero or future timestamp and an overlay are listed with the basis stated.
The Authenticode check has four parts. The page recomputes the image digest the way the PE specification defines it (skipping the checksum field, the certificate directory entry and the certificate table) and compares it with the digest stored in the signature. It then hashes the signed content that holds that stored digest and compares the result with the messageDigest attribute, which is the link that stops someone from patching the code and writing a fresh image hash into the signature; when the two differ the page reports the signature as invalid even if the image digest matches. Finally it verifies the signature value over the signed attributes with the signer certificate's public key. It does not build a trust chain to a root store, check revocation, or verify the timestamp authority's own signature, and it says so beside the result. Signatures written as BER with indefinite lengths are not accepted.
Limits: at most 96 PE sections, 1,024 import descriptors, 20,000 exports, 200,000 symbols per table and 60,000 strings. A parsing budget stops the walk of a table that claims millions of entries, and a list that was cut short is labelled as partial.
How it works
Every read goes through a reader that throws if an offset or length falls outside the file, so a damaged or hostile header produces a message instead of a crash. Each substructure (imports, exports, resources, debug data) is parsed on its own, so a broken import table still leaves the sections and headers on screen.
Names are demangled only when they are simple: nested names such as _ZN3foo3barEv become foo::bar() and MSVC names such as ?foo@bar@@YAHH@Z become bar::foo(…). Templates and complex parameter lists are left as written.
When this helps
- A help-desk analyst receives invoice-viewer.exe. The sections tab shows .text at entropy 6.5 and a 310 KB section named .rsrc at 7.98, and the overlay line reads 1.2 MB. Together those say the file carries a large compressed payload, which is enough to send it to a sandbox instead of a user.
- A release engineer checks that a Linux build kept its hardening flags. The summary reads PIE yes, non-executable stack yes, RELRO partial, and the stack-protector symbol is absent, so the build flags changed.
- A developer shipping a macOS universal binary opens it and finds two slices, ARM64 and x86-64, one with an embedded signature blob and one without, which would explain a signing complaint that shows up only on Intel Macs.
Opening a file
- Drop an executable, or try the built-in 1,536-byte hand-assembled PE that only calls ExitProcess.
- Start on Summary for the hashes, headers and the present-or-absent list, then check Sections for entropy.
- Use Imports and Strings with the filter box to look for specific names, addresses or paths.
- Download the JSON or HTML report to attach to a ticket.
Example
The built-in minimal-example.exe, 1,536 bytes, SHA-256 1929291b…8d1b36
A PE32+ console program with a .text section holding xor ecx,ecx and a call through the import table, and an .idata section importing KERNEL32.dllSummary, Sections and Indicators tabs
PE32+ x86-64, Windows console, compile timestamp 2020-09-13T12:26:40Z, entry point 0x1000 in .text
.text 512 bytes, entropy 0.143; .idata 512 bytes, entropy 0.626
Imports: KERNEL32.dll, 1 function (ExitProcess)
Indicator (minor): only 1 imported function. Authenticode signature: absentTips for best results
- The Imports filter matches libraries as well as functions: typing ws2_32 lists the socket functions, typing Crypt lists every crypto call across DLLs.
- Sort out resource noise first. Section entropy near 8 in .rsrc is common for compressed icons, so look at the code section and the entry point before reading anything into it.
- Compare the PDB path in the debug directory with the project it claims to come from; a path with a user name and drive letter often names the build machine.
- On a universal Mach-O, switch the architecture slice before reading imports: the two slices can link different libraries.
Limits
A report with no indicators is not a clean bill of health. Static facts cannot see code that is decrypted at run time, scripts, or data handed over by a loader.
.NET and other managed assemblies import only the runtime loader (mscoree.dll). Their real calls live in metadata that this page does not decode.
Mach-O code-signature blobs are listed but not verified, and ELF files carry no standard signature at all, so the page reports presence only.
Common errors and how to fix them
- The file is not a PE, ELF or Mach-O executable
- The first bytes match no executable signature. Scripts, installers that wrap an executable in another container, and archives need to be unpacked first; try a .zip or .msi extractor and drop the file inside.
- The signature blob is not strict DER
- The Authenticode data is BER encoded with indefinite lengths, which some signing tools write. The certificate table is still reported, but the digest and signature checks could not run.
Best practices
- Hash the file here and compare the SHA-256 with the one the publisher posts before you open the Authenticode rows; a mismatch there makes everything below it moot.
- When a signed file shows a digest MISMATCH, open the signed-content row next to it: a mismatch in both means the stored hash was edited, which is stronger evidence of tampering than a changed file alone.
What the page will not tell you
There is no verdict, score or family name. The page does not match signatures from a malware database, query reputation services or execute anything, and it cannot tell whether an import such as CreateRemoteThread belongs to a debugger or an implant. It lists what the file contains and why each indicator is worth a second look.
Where the format allows a stronger statement, the page makes it only when it has checked: the Authenticode digest result appears only after the hash was recomputed, and a Mach-O signature is called embedded, not valid.
Frequently asked questions
Why does a match in the Authenticode digest not mean the file is trustworthy?
A match shows that the bytes the signature covers are unchanged since the signer hashed them, that the signed attributes cover that hash, and that the signer's key produced the signature. Anyone can sign with their own certificate, so you still need to know that the certificate chains to a root you trust. That check, revocation and the timestamp authority's own signature are not performed here.
What happens with a truncated or hostile file?
Every offset is range-checked and table walks share a work budget. Across 486 truncated and corrupted PE, ELF and Mach-O variants of real files, every run ended in a result or a typed parse error and none took longer than 1.5 seconds; a 100 MB PE loads in well under a second. A table that claims millions of entries stops at its budget and is labelled as a partial list.
Why are ELF imports not grouped under a library?
ELF dynamic symbols record only that a name is undefined; the dynamic linker searches the needed libraries in order at run time. The page lists the needed libraries from the dynamic section and the undefined symbols as one group instead of guessing which library supplies each.
Is the stored PE checksum worth checking?
Only drivers, boot-start services and system DLLs loaded early are required to have a correct one. Most programs store zero. The page shows whether a non-zero stored value matches the one it computes, using the algorithm from the PE format description.