Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 908

PE Executable Format

Reviewed byCybersecurity entrepreneur & security researcher

What is PE Executable Format?

PE Executable FormatPortable Executable, the Windows binary file format used by .exe, .dll, .sys, and .ocx files and derived from the older COFF object format.


PE is the binary format Windows uses for executables (.exe), libraries (.dll), drivers (.sys), and ActiveX (.ocx). Every file opens with the legacy MS-DOS stub — magic bytes MZ (0x5A4D) and the "This program cannot be run in DOS mode" message — whose e_lfanew field points to the real PE header: the signature PE\0\0 (0x00004550), the COFF file header, and an optional header whose magic distinguishes PE32 (0x10B) from PE32+/64-bit (0x20B). The optional header carries AddressOfEntryPoint, ImageBase, and the data directories, followed by a section table mapping .text, .rdata, .data, .rsrc, and .reloc.

Loaders resolve the Import Address Table at load time and verify Authenticode signatures. Analysts weaponise the same structures defensively: Mandiant's imphash fingerprints a sample by its ordered import names to cluster related malware; abnormally high section entropy betrays UPX or custom packers; and the undocumented Rich header can tie a binary to a specific compiler toolchain. Attackers abuse PE features for DLL sideloading, process hollowing, and reflective loading. Microsoft publishes the authoritative PE/COFF specification; tools like pefile, PE-bear, and CFF Explorer parse these fields for triage.

flowchart TD
  A["MS-DOS stub (MZ)"] --> B["e_lfanew offset"]
  B --> C["PE signature (PE\0\0)"]
  C --> D[COFF file header]
  D --> E["Optional header (PE32 / PE32+)"]
  E --> F[Data directories: imports, exports, reloc, security]
  F --> G["Section table: .text .rdata .data .rsrc .reloc"]
  G --> H[Loader maps sections + resolves IAT + checks Authenticode]

● Examples

  1. 01

    Using pefile or CFF Explorer to inspect imports and Authenticode signatures of a suspicious .exe.

  2. 02

    An attacker replacing a benign DLL on the application's search path to perform DLL sideloading against a signed PE.

● Frequently asked questions

What is PE Executable Format?

Portable Executable, the Windows binary file format used by .exe, .dll, .sys, and .ocx files and derived from the older COFF object format. It belongs to the Application Security category of cybersecurity.

What does PE Executable Format mean?

Portable Executable, the Windows binary file format used by .exe, .dll, .sys, and .ocx files and derived from the older COFF object format.

How do you defend against PE Executable Format?

Defences for PE Executable Format typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for PE Executable Format?

Common alternative names include: Portable Executable, PE/COFF.

● Related terms