From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Platform:Windows" |
|---|
| claim | "x64 TEB: NT_TIB first (StackBase +8, StackLimit +0x10, Self +0x30), ClientId at +0x40 (process id, thread id), ThreadLocalStoragePointer +0x58, ProcessEnvironmentBlock +0x60, LastErrorValue +0x68, TlsSlots[64] at +0x1480; sizeof(TEB) is 0x1878 on Windows 11 24H2." |
|---|
| scope | | level | "platform" |
|---|
| applies_to | "Platform:Windows" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "TEB" |
|---|
| abi | "win64" |
|---|
| variant | "x64" |
|---|
| size | 6264 |
|---|
| fields | | offset | "0x00" |
|---|
| size | 8 |
|---|
| type | "PVOID" |
|---|
| name | "ExceptionList" |
|---|
| notes | "NT_TIB; unused on x64 (table-based unwinding)" |
|---|
|
| offset | "0x08" |
|---|
| size | 8 |
|---|
| type | "PVOID" |
|---|
| name | "StackBase" |
|---|
|
| offset | "0x10" |
|---|
| size | 8 |
|---|
| type | "PVOID" |
|---|
| name | "StackLimit" |
|---|
|
| offset | "0x18" |
|---|
| size | 8 |
|---|
| type | "PVOID" |
|---|
| name | "SubSystemTib" |
|---|
|
| offset | "0x20" |
|---|
| size | 8 |
|---|
| type | "PVOID" |
|---|
| name | "FiberData" |
|---|
|
| offset | "0x28" |
|---|
| size | 8 |
|---|
| type | "PVOID" |
|---|
| name | "ArbitraryUserPointer" |
|---|
|
| offset | "0x30" |
|---|
| size | 8 |
|---|
| type | "TEB *" |
|---|
| name | "Self" |
|---|
|
| offset | "0x38" |
|---|
| size | 8 |
|---|
| type | "PVOID" |
|---|
| name | "EnvironmentPointer" |
|---|
|
| offset | "0x40" |
|---|
| size | 8 |
|---|
| type | "HANDLE" |
|---|
| name | "ClientId.UniqueProcess" |
|---|
|
| offset | "0x48" |
|---|
| size | 8 |
|---|
| type | "HANDLE" |
|---|
| name | "ClientId.UniqueThread" |
|---|
|
| offset | "0x50" |
|---|
| size | 8 |
|---|
| type | "PVOID" |
|---|
| name | "ActiveRpcHandle" |
|---|
|
| offset | "0x58" |
|---|
| size | 8 |
|---|
| type | "PVOID" |
|---|
| name | "ThreadLocalStoragePointer" |
|---|
|
| offset | "0x60" |
|---|
| size | 8 |
|---|
| type | "PEB *" |
|---|
| name | "ProcessEnvironmentBlock" |
|---|
|
| offset | "0x68" |
|---|
| size | 4 |
|---|
| type | "ULONG" |
|---|
| name | "LastErrorValue" |
|---|
| notes | "GetLastError" |
|---|
|
| offset | "0x6C" |
|---|
| size | 4 |
|---|
| type | "ULONG" |
|---|
| name | "CountOfOwnedCriticalSections" |
|---|
|
| offset | "0x70" |
|---|
| size | 8 |
|---|
| type | "PVOID" |
|---|
| name | "CsrClientThread" |
|---|
|
| offset | "0x78" |
|---|
| size | 8 |
|---|
| type | "PVOID" |
|---|
| name | "Win32ThreadInfo" |
|---|
|
| offset | "0x1480" |
|---|
| size | 512 |
|---|
| type | "PVOID[64]" |
|---|
| name | "TlsSlots" |
|---|
|
| offset | "0x1780" |
|---|
| size | 8 |
|---|
| type | "PVOID *" |
|---|
| name | "TlsExpansionSlots" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct _TEB; sizeof 0x1878 and SchedulerSharedDataSlot 0x1850 asserted; head offsets from field sizes and the well-known gs:[0x30]/gs:[0x60] accesses" |
|---|
| repo | "https://github.com/winsiderss/phnt" |
|---|
| commit | "53fbbdc5b5d2b08761db1c7b26bfa8c820924356" |
|---|
| path | "ntpebteb.h" |
|---|
| lines | "1037-1594" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "TEB x64 head" |
|---|
| topic | "Platform:Windows/PEB and TEB" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T10:18:36.072Z" |
|---|
| verifications | |
|---|