MZ header
The first bytes of every Windows executable, starting with the letters MZ, which point to the main PE header further in.
In more detail
The field e_lfanew at offset 0x3C gives the position of the PE signature (PE\0\0). YARA conditions often check uint16(0) == 0x5A4D so a rule only fires on executables. Finding MZ at the start of a private memory region suggests an injected or hollowed image.
Related terms
- Portable Executable — The file format of Windows programs and libraries (.exe and .dll files), with headers that describe code, data and imported functions.
- YARA — A tool and rule language for identifying files, or memory, that contain particular text or byte patterns, used to find malware families.
- process hollowing — Starting a legitimate program suspended, replacing its code in memory with malicious code, then letting it run under the original name.
Taught in
- YARA Rule Authoring & File Signature Matching — Security Operations & Threat Hunting (SOC)
- Memory Forensics: Process Trees & Injection — Security Operations & Threat Hunting (SOC)
- Malware Triage: Hashes, Strings & Sandboxing — Security Operations & Threat Hunting (SOC)