KexecDDPlus: Exploiting the KsecDD Windows driver
KexecDDPlus
This proof-of-concept is the result of a research project that aimed at extending the work of @floesen_ on the KsecDD Windows driver.
It relies on Server Silos to access the KsecDD driver directly, without having to inject code into LSASS. This capability therefore allows it to operate even on systems on which LSA Protection is enabled.
For more information, please check out the blog post Exploiting KsecDD through Server Silos, and the links in the Credits section.
Tested on:
- Windows 11 23H2 (OS Build 22631.4317)
- Windows 11 23H2 (OS Build 22631.3380)
- Windows 10 22H2 (OS Build 19045.5011)
- Windows 10 22H2 (OS Build 19045.4894)
Due to the way the IOCTL IOCTL_KSEC_IPC_SET_FUNCTION_RETURN
is handled by the KsecDD driver, this PoC can only be used 4 times. At the 5th execution, the driver will attempt to free the user-supplied buffer as if it were allocated in a kernel pool. This operation is invalid, and therefore will cause a Bug Check, a.k.a. a Blue Screen. To run the exploit again, without crashing the kernel, a machine reboot will be required.
Use
Query the CI options value
Disable Driver Signature Enforcement (DSE) – Set CI options to 0
Set the value of CI options