Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
windows_kernel_shadow_stack — Proof of concepts demonstrating some aspects of the Windows kernel shadow stack mitigation. | Kitploit
Tools/GitHubGitHub/synacktiv/windows_kernel_shadow_stack
Privilege EscalationVulnerability AnalysisExploitationPapers & ResearchBinary Exploitation
GitHubsynacktiv/windows_kernel_shadow_stack

windows_kernel_shadow_stack

Proof of concepts demonstrating some aspects of the Windows kernel shadow stack mitigation.

View Repository

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
77831 year agoReviewed by Kitploit

Proof of Concepts

This project aims to highlight certain aspects of the shadow stack mitigation implemented by Microsoft in Windows 11. The code is specifically focused on Windows 11 24H2. It may not work on other version of Windows 11, due to the kernel offset management.

The project is divided into two parts: a client and a driver. Communication between them is handled through the IOCTL mechanism. The client requests the driver to perform actions at the kernel level.

Features

  • Increment one of the kernel return addresses of the current thread to misalign it and trigger a BSOD.
  • Skip one of the kernel stack frames of the current thread to highlight the resilience of the shadow stack.
  • Enable/disable CET in the current CR4 register, leading to a BSOD
  • Write to MSR registers, which typically leads to a BSOD
  • Write to the shadow stack, which results in a BSOD
  • Write the shadow stack PTE, triggering a BSOD
  • Perform divisions to highlight try/except and shadow stack behaviors during a division by zero

Build

Use build.bat.

Prerequisites

As a prerequisite, the following kits have to be for the same Windows build:

  • Microsoft Windows SDK (Software Development Kit)
  • Microsoft WDK (Windows Driver Kit)

Note: The POC have been tested with the version 10.0.26100.0 of the kits.

Target Machine Configuration

To activate the kernel shadow stack mitigation, the following values have to be added or set in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\ key:

NameTypeData
EnableVirtualizationBasedSecurityREG_DWORD1
Scenarios\HypervisorEnforcedCodeIntegrity\EnabledREG_DWORD1
Scenarios\KernelShadowStacks\EnabledREG_DWORD1

Also, in order to load a test-signed driver, the following command have to be run in an administrator console:

root@kitploit:~
bcdedit /set testsigning on

Then, a reboot is required.

Usage

Driver Loading

To load the driver, the following commands have to be entered in an administrator console:

root@kitploit:~
sc create shadow type= kernel binPath= ABSOLUTE_PATH_TO_THE_DRIVER
sc start shadow

Client

The client has the following options:

Credits

SergiusTheBest for its FindWDK.

Download Tool
OptionDescription
incIncrement the return address to the caller by 1
skipPatch RSP in order to point on the previous stack frame
cdisableDisable CET in CR4
cenableEnable CET in CR4
wrmsr REGISTER VALUEWrite the REGISTER with the given VALUE
wrshskWrite into the shadow stack
wrshskpteRewrite the shadow stack PTE
div DIVIDEND DIVISORPerfom integer division in kernel space