- File:
invalid_section_alignment.full.exe - Layer: 3
Adversarial
A synthetically constructed PE file designed to validate IOCX’s resilience when confronted with misaligned, contradictory, or internally inconsistent section‑table metadata. This sample focuses specifically on raw‑offset misalignment and virtual/raw size contradictions, ensuring that IOCX’s section‑analysis logic behaves deterministically even when the PE violates fundamental alignment rules.
Unlike naturally malformed binaries, this file is generated byte‑for‑byte to create a minimal but structurally invalid section table while keeping the rest of the PE layout valid. This isolates section‑alignment behaviour and prevents interference from unrelated anomalies.
This sample is engineered to trigger section‑specific structural heuristics, including:
- Section alignment anomalies
section_raw_misalignedPointerToRawData(0x123) violatesFileAlignment(0x200).
- Raw size (
0x1000) far exceeds virtual size (0x10), creating a deliberate inconsistency.
- Import‑directory fallback behaviour
import_rva_invalid- Import directory is declared but empty (
RVA = 0, Size = 0), ensuring IOCX gracefully suppresses import parsing.
- Import directory is declared but empty (
- Graceful degradation
- Section parsing must continue without:
- false section boundaries
- synthetic imports
- misinterpreted RVA mappings
- accidental IOC extraction
- Section parsing must continue without:
No compiler or linker will emit a PE file with:
- a section whose raw offset is not aligned to
FileAlignment - a section whose raw size is dramatically larger than its virtual size
- a section whose raw pointer does not fall on a valid boundary
- a declared import directory with zero RVA and zero size
These conditions violate the PE/COFF specification and cannot be produced through normal toolchains. This sample must therefore be manually constructed to guarantee deterministic misalignment behaviour.
This sample must produce stable, deterministic output under analysis_level = full, specifically:
- analysis.sections
- Must reflect the contradictory raw/virtual sizes exactly as encoded.
- Entropy must be computed from the misaligned raw region without correction.
- analysis.heuristics
- Must include:
section_raw_misalignedimport_rva_invalid
- Metadata must include the exact misaligned raw offset and alignment boundary.
- Must include:
- metadata
- Section list must contain exactly one section (
.text). - No imports, exports, resources, TLS, or signatures must be inferred.
- Section list must contain exactly one section (
- iocs
- No IOCs must be emitted as a side‑effect of misaligned or oversized raw data.
This ensures IOCX’s section‑analysis engine behaves predictably even when confronted with adversarial PE files containing invalid alignment, contradictory size fields, or malformed raw offsets.