From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:PE (Portable Executable)" |
|---|
| claim | "The VirtualAddress of PE data directory 4 (security / certificate table) is a file offset, not an RVA: the Authenticode signature is appended after the last section (8-byte aligned) and never mapped. Overlay calculations must ignore directory 4, or the signature counts as part of the image." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PE (Portable Executable)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | effect | "directory 4 = file offset of WIN_CERTIFICATE records" |
|---|
| condition | "signed files" |
|---|
|
|---|
| evidence | | type | "documentation" |
|---|
| detail | "Microsoft PE Format: 'the first field of this entry, which is normally an RVA, is a file pointer instead'" |
|---|
|
| type | "source" |
|---|
| detail | "get_overlay_data_start_offset skips IMAGE_DIRECTORY_ENTRY_SECURITY" |
|---|
| repo | "https://github.com/erocarrera/pefile" |
|---|
| commit | "58186a92164842cf758822e067bc79c59b3c80d9" |
|---|
| path | "pefile.py" |
|---|
| lines | "7850-7895" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Windows 11 x64 kernel32.dll: certificate table at file offset 0xCA000 right after the last section (raw end 0xCA000); MinGW git.exe: last section ends 0x3F247C, certificate at 0x3F2480" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Certificate table is a file offset" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T10:17:25.239Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T09:28:59.752Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read pefile.py at 58186a9 get_overlay_data_start_offset (7850-7892): directory index IMAGE_DIRECTORY_ENTRY_SECURITY (4) is skipped while other directories go through get_offset_from_rva. The 'file pointer instead of RVA' statement itself rests on the Microsoft doc, not read in this session." |
|---|
|
|
|---|