99 adversarial PE files: exploring malformed‑binary behaviour across major analysis tools
Source Reddit ExploitDev
Discussion
This analysis presents a corpus of 99 adversarial Portable Executable (PE) files designed to explore how major PE analysis tools behave when confronted with deliberately malformed but loadable binaries. The study identifies different anomaly patterns such as entrypoint redirection, overlapping sections, header inconsistencies, and more. It evaluates six common tools used in exploit development workflows, revealing varying behaviors including masking of anomalies, crashes, or lack of anomaly visibility. The research highlights how malformed PE structures can be leveraged for parser differentials, crash primitives, metadata confusion, loader inconsistencies, and analysis evasion.
r/ExploitDev (opens in a new tab)u/iocx_dev0 points0 comments
I’ve built a 99‑fixture adversarial PE corpus to explore how different tools behave when confronted with deliberately malformed but still loadable binaries.
Each fixture introduces one corruption pattern - no packers or multi‑anomaly noise, which allows for clean attribution of behaviour. The anomalies span:
- entrypoint redirection
- overlapping/invalid sections
- header inconsistencies
- directory OOB conditions
- TLS edge cases
- recursive/malformed resources
- Authenticode structural corruption
- entropy‑field manipulation
I tested 6 tools commonly used in exploit dev workflows:
- IOCX
- Ghidra
- Detect It Easy
- radare2
- PEview
- CFF Explorer
Behavioural patterns with exploit‑relevant implications:
- Literal parsers (r2, PEview) never crashed but provided no anomaly visibility
- Semantic parsers (CFF) “fixed” corruption, masking exploit‑useful inconsistencies
- Heuristic tools (DIE) ignored structure, blind to malformed metadata
- Reconstructive loaders (Ghidra) rewrote metadata, omitted fields, and crashed on entropy fixtures
- Hybrid literal‑semantic tools (IOCX) preserved raw bytes and surfaced anomalies explicitly
For exploit dev, malformed PE structures can act as:
- parser differentials
- crash primitives
- metadata confusion vectors
- loader‑model inconsistencies
- analysis‑evasion surfaces
This corpus maps those behaviours systematically.
Full write‑up (Part 1):
References
- medium.com/@malx-labs/the-adversarial-pe-analysis-series-part-1-why-pe-parsers-break-introducing-the-99-adversarial-1769556ab473?source=friends_link&sk=a053eaffcc2642062af3931c49ba6064 (opens in a new tab)
- reddit.com/r/ExploitDev/comments/1u2xdh6/99_adversarial_pe_files_exploring_malformedbinary/ (opens in a new tab)