Cache Timing Techniques Used to Bypass Windows 11 KASLR and Reveal Kernel Base
Cache timing side-channel attacks have been used to circumvent Kernel Address Space Layout Randomization (KASLR) on fully updated Windows 11 PCs, which is a startling discovery for cybersecurity aficionados and Windows kernel developers.
KASLR, a critical security mechanism, randomizes the memory location of the kernel base to thwart exploitation attempts.
However, as detailed in a recent technical blog post, this protection can be undermined using the Prefetch Side-Channel method, originally credited to exploits-forsale.
This approach exploits speculative execution and processor cache behavior, specifically on Intel CPUs, to infer the base address of ntoskrnl.exe-a cornerstone of the Windows kernel.
By meticulously measuring access times to potential kernel addresses within the range of 0xfffff80000000000 to 0xfffff80800000000, attackers can pinpoint the exact location with startling precision, even without privileges such as SeDebugPrivilege, which were once required for such insights.
Unveiling a Sophisticated Side-Channel Attack
At the heart of this bypass lies the concept of speculative execution, a performance optimization in modern CPUs where the processor predicts and executes instructions ahead of time to minimize latency.
While this boosts efficiency, it can inadvertently leave traces in the CPU cache when predictions access sensitive data, a flaw that side-channel attacks exploit.
The Prefetch Side-Channel technique manipulates this by using assembly instructions like prefetchnta
and prefetcht2
to hint at loading specific memory addresses into the cache hierarchy (L1, L2, or L3), while timing these operations with rdtscp
to detect disparities.
Addresses already in the cache-indicative of frequent system access, such as the kernel base-reveal themselves through faster access times.
The method iterates over 32,768 potential addresses, averaging timing results over multiple runs to filter noise, and identifies the kernel base by detecting consistently low-latency regions.

According to the researchers, this is further refined by calculating an average access speed and applying fractional thresholds to isolate the target address, demonstrating a profound understanding of cache mechanics.
Decoding the Mechanics of Cache Exploitation
Notably, instructions like mfence
and lfence
ensure memory operation serialization, preventing optimizations that could skew timing data, thus making the attack both reliable and technically intricate.
This exploit, while theoretical in real-world impact as no active attacks have been reported, underscores a persistent vulnerability in hardware-level optimizations.
The code provided, tested on Windows 11 version 10.0.26100.3775, successfully extracted the ntoskrnl.exe base address without elevated privileges, a feat previously reliant on functions like NtQuerySystemInformation, which Microsoft restricted in recent updates like 24H2.
However, it’s worth noting that the technique fails in virtualized environments like VMware, likely due to caching discrepancies introduced by Second Level Address Translation (SLAT).
This development serves as a reminder of the ongoing cat-and-mouse game between hardware design, software security, and exploitation research, urging both Intel and Microsoft to consider deeper mitigations in future architectures and updates.
As side-channel attacks continue to evolve, leveraging fundamental CPU features for nefarious purposes, the cybersecurity community must remain vigilant, pushing the boundaries of defense mechanisms to protect critical system components from such ingenious bypasses.
Find this News Interesting! Follow us on Google News, LinkedIn, & X to Get Instant Updates!
Source link