From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Platform:Windows" |
|---|
| claim | "The 32-bit PEB has BeingDebugged at +2, ImageBaseAddress +8, Ldr +0xC, ProcessParameters +0x10, ProcessHeap +0x18, NumberOfProcessors +0x64, NtGlobalFlag +0x68, OS version fields +0xA4..+0xB0 and SessionId at +0x1D4 (Windows 11 PEB is 0x488 bytes)." |
|---|
| scope | | level | "platform" |
|---|
| applies_to | "Platform:Windows" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "PEB" |
|---|
| abi | "win32" |
|---|
| variant | "x86" |
|---|
| size | 1160 |
|---|
| fields | | offset | "0x02" |
|---|
| size | 1 |
|---|
| type | "BOOLEAN" |
|---|
| name | "BeingDebugged" |
|---|
|
| offset | "0x03" |
|---|
| size | 1 |
|---|
| type | "BOOLEAN" |
|---|
| name | "BitField" |
|---|
|
| offset | "0x04" |
|---|
| size | 4 |
|---|
| type | "HANDLE" |
|---|
| name | "Mutant" |
|---|
|
| offset | "0x08" |
|---|
| size | 4 |
|---|
| type | "PVOID" |
|---|
| name | "ImageBaseAddress" |
|---|
|
| offset | "0x0C" |
|---|
| size | 4 |
|---|
| type | "PEB_LDR_DATA *" |
|---|
| name | "Ldr" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "RTL_USER_PROCESS_PARAMETERS *" |
|---|
| name | "ProcessParameters" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "PVOID" |
|---|
| name | "SubSystemData" |
|---|
|
| offset | "0x18" |
|---|
| size | 4 |
|---|
| type | "PVOID" |
|---|
| name | "ProcessHeap" |
|---|
|
| offset | "0x1C" |
|---|
| size | 4 |
|---|
| type | "RTL_CRITICAL_SECTION *" |
|---|
| name | "FastPebLock" |
|---|
|
| offset | "0x64" |
|---|
| size | 4 |
|---|
| type | "ULONG" |
|---|
| name | "NumberOfProcessors" |
|---|
|
| offset | "0x68" |
|---|
| size | 4 |
|---|
| type | "ULONG" |
|---|
| name | "NtGlobalFlag" |
|---|
|
| offset | "0x88" |
|---|
| size | 4 |
|---|
| type | "ULONG" |
|---|
| name | "NumberOfHeaps" |
|---|
|
| offset | "0x90" |
|---|
| size | 4 |
|---|
| type | "PVOID *" |
|---|
| name | "ProcessHeaps" |
|---|
|
| offset | "0xA0" |
|---|
| size | 4 |
|---|
| type | "RTL_CRITICAL_SECTION *" |
|---|
| name | "LoaderLock" |
|---|
|
| offset | "0xA4" |
|---|
| size | 4 |
|---|
| type | "ULONG" |
|---|
| name | "OSMajorVersion" |
|---|
|
| offset | "0xA8" |
|---|
| size | 4 |
|---|
| type | "ULONG" |
|---|
| name | "OSMinorVersion" |
|---|
|
| offset | "0xAC" |
|---|
| size | 2 |
|---|
| type | "USHORT" |
|---|
| name | "OSBuildNumber" |
|---|
|
| offset | "0xAE" |
|---|
| size | 2 |
|---|
| type | "USHORT" |
|---|
| name | "OSCSDVersion" |
|---|
|
| offset | "0xB0" |
|---|
| size | 4 |
|---|
| type | "ULONG" |
|---|
| name | "OSPlatformId" |
|---|
|
| offset | "0x1D4" |
|---|
| size | 4 |
|---|
| type | "ULONG" |
|---|
| name | "SessionId" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct _PEB with static_asserts SessionId==0x1D4 and sizeof==0x488 (WIN11) for 32-bit; earlier offsets derived by summing field sizes" |
|---|
| repo | "https://github.com/winsiderss/phnt" |
|---|
| commit | "53fbbdc5b5d2b08761db1c7b26bfa8c820924356" |
|---|
| path | "ntpebteb.h" |
|---|
| lines | "354-915" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "PEB x86 head" |
|---|
| topic | "Platform:Windows/PEB and TEB" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T10:18:35.935Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-18T20:34:03.515Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read winsiderss/phnt ntpebteb.h at 53fbbdc5: field order of struct _PEB matches (ImageBaseAddress, Ldr, ProcessParameters, SubSystemData, ProcessHeap, FastPebLock, AtlThunkSListPtr, ..., NumberOfProcessors, NtGlobalFlag, ... NumberOfHeaps, MaximumNumberOfHeaps, ProcessHeaps, ..., LoaderLock, OSMajorVersion, OSMinorVersion, OSBuildNumber, OSCSDVersion, OSPlatformId); lines 914-915 static_assert SessionId == 0x1D4 and sizeof(PEB) == 0x488 for 32-bit." |
|---|
| notes | "Intermediate offsets (0x64, 0x68, 0x88, 0x90, 0xA0, 0xA4...) I did not re-sum field by field; they agree with the long-published 32-bit PEB layout and the anchor asserts." |
|---|
|
|
|---|