From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:PE (Portable Executable)" |
|---|
| claim | "Each PE section header is 40 bytes: an 8-byte NUL-padded name, VirtualSize, VirtualAddress (RVA), SizeOfRawData, PointerToRawData (file offset), COFF relocation/line-number pointers and counts (0 in images), and Characteristics. The table starts at e_lfanew + 24 + SizeOfOptionalHeader." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PE (Portable Executable)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "IMAGE_SECTION_HEADER" |
|---|
| size | 40 |
|---|
| fields | | offset | 0 |
|---|
| size | 8 |
|---|
| type | "char[8]" |
|---|
| name | "Name" |
|---|
| notes | "not NUL-terminated when 8 chars; '/N' = offset in COFF string table (objects)" |
|---|
|
| offset | 8 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "VirtualSize" |
|---|
|
| offset | 12 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "VirtualAddress" |
|---|
| notes | "RVA" |
|---|
|
| offset | 16 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "SizeOfRawData" |
|---|
|
| offset | 20 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "PointerToRawData" |
|---|
| notes | "rounded down to 512 by the loader when FileAlignment >= 512" |
|---|
|
| offset | 24 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "PointerToRelocations" |
|---|
|
| offset | 28 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "PointerToLinenumbers" |
|---|
|
| offset | 32 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "NumberOfRelocations" |
|---|
|
| offset | 34 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "NumberOfLinenumbers" |
|---|
|
| offset | 36 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "Characteristics" |
|---|
| notes | "IMAGE_SCN_* flags" |
|---|
|
|
|---|
| endianness | "little" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "__IMAGE_SECTION_HEADER_format__" |
|---|
| repo | "https://github.com/erocarrera/pefile" |
|---|
| commit | "58186a92164842cf758822e067bc79c59b3c80d9" |
|---|
| path | "pefile.py" |
|---|
| lines | "2518-2532" |
|---|
|
| type | "source" |
|---|
| detail | "Structure.__init__: 'Format is forced little endian', __format_str__ = "<"" |
|---|
| repo | "https://github.com/erocarrera/pefile" |
|---|
| commit | "58186a92164842cf758822e067bc79c59b3c80d9" |
|---|
| path | "pefile.py" |
|---|
| lines | "942-945" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "IMAGE_SECTION_HEADER" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T10:17:24.323Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:52:45.634Z" |
|---|
| summary | "Byte order set: pefile forces '<' (little) for every PE structure" |
|---|
| changed | |
|---|
|
|
|---|