Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Platform:Windows/KUSER SHARED DATA

From ReverseEngineering.wiki
Topic page of Platform:Windows.

The page the kernel maps read-only into every process at 0x7FFE0000 (also at 0xFFFFF78000000000 in kernel mode): time, tick count, version, processor features and the system call stub pointer, readable without any API call.

Address and access

  • User-mode address 0x7FFE0000 on x86 and x64 (also ARM64), read-only, one page; the kernel sees the same page at 0xFFFFF78000000000 (x64) or 0xFFDF0000 (x86).
  • Programs read it for speed: mov eax, [7FFE0000h+26Ch] (NtMajorVersion), tick count at +0x320, system/interrupt time at +0x14/+0x8 (KSYSTEM_TIME: LowPart, High1Time, High2Time; read High1, Low, then compare High2 until stable).
  • Milliseconds since boot: (TickCount.LowPart * TickCountMultiplier) >> 24 where TickCount is the 64-bit KSYSTEM_TIME at +0x320 and TickCountMultiplier at +4 (the pre-Vista value at +0 is deprecated).
  • NtMajorVersion/NtMinorVersion are the true OS version and cannot be changed by compatibility shims, unlike GetVersion; see Platform:Windows/Build numbers.
  • SystemCall (+0x308) held the 32-bit syscall stub address on older x86 Windows; since Windows 10 the stub is in ntdll.
  • Other fields of interest: NtSystemRoot (+0x30, UTF-16 C:\\Windows), NtProductType (+0x264), KdDebuggerEnabled (+0x2D4, bit 0 kernel debugger present), NumberOfPhysicalPages, QpcFrequency (+0x300), ProcessorFeatures[] (+0x274, one byte per PF_* constant of IsProcessorFeaturePresent), Cookie (+0x330).

Pitfalls

  • Offsets past about 0x2D0 vary by Windows version; the facts here follow the Windows 11 header and say which fields are old.
  • Time fields are updated by the kernel at timer interrupts, so values change between reads.

Related

Platform:Windows, Platform:Windows/PEB and TEB.

Evidence & references

phnt ntexapi.h (MIT), the static_asserts for each field offset.