Expand description
Rich header parsing — compiler fingerprint between DOS stub and PE signature.
The Rich header records every compiler/linker tool version used to build
the binary, XOR-encoded with a 4-byte key. It is an invaluable attribution
signal: identical (product_id, build_id) tuples across samples indicate
the same toolchain, and therefore likely the same threat actor or campaign.
§Format (all DWORDs are little-endian)
[XOR(DanS, key)] [pad0^key] [pad1^key] [pad2^key]
[XOR(comp_id0, key)] [XOR(use_count0, key)]
...
"Rich" [xor_key]DanS= 0x536E_6144 (DanSread as u32 LE)comp_id=(product_id << 16) | build_iduse_count= number of objects compiled with that tool versionxor_key= raw DWORD after theRichterminator
Structs§
- Rich
Entry - One entry in the Rich header: a specific compiler/linker tool version.
- Rich
Header - Decoded Rich header — compiler fingerprint from the DOS stub area.
Functions§
- parse_
rich_ header - Parse the Rich header from raw PE bytes.