wire / magic /
pe-exe
DOS/PE executable signature (MZ, PE\0\0) A Windows PE executable (and any DOS MZ executable) begins with the ASCII 'MZ' (0x4D 0x5A). A PE file additionally contains the 'PE\0\0' (50 45 00 00) signature at the file offset stored in the MZ header field e_lfanew (at offset 0x3C).
magic kind signature status de-facto verification verified tier C file-signature@1
aka: MZ magic · PE magic · Portable Executable · DOS MZ
file signature magic: 4D 5A⧉ copy @ offset 0
ascii: MZ
.exe .dll .sys .scr .ocx application/vnd.microsoft.portable-executable
spec: Microsoft PE Format / MS-DOS MZ executable
Bytes 0-1: 'MZ' (4D 5A), the DOS MZ executable magic (initials of Mark Zbikowski). 'ZM' (5A 4D) is also tolerated by some loaders. Offset 0x3C holds a 4-byte little-endian field (e_lfanew) pointing to the PE header. At that offset the PE signature is 'PE\0\0' = 50 45 00 00, followed by the COFF file header. A bare DOS executable has the MZ header but no PE signature. provenance per-fact attribution:
agent: curl -H 'accept: application/json' wire.phall.io/magic/pe-exe⧉ copy
or /magic/pe-exe.json ⧉ copy
wire.phall.io ⌘K search main ✓