Skip to content

Commit 45c6a6e

Browse files
committed
cve-2025-21333 - 1day breakdown
1 parent 9ae7cfd commit 45c6a6e

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

content/1day-breakdowns/cve-2025-21333.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ showTableOfContents: true
1515

1616
**CVE-2025-21333:** https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-21333
1717
**Vulnerability Type:** Heap-based Buffer Overflow
18-
**Tested On:** Windows 11 23H2
18+
**Tested On:** Windows 11 23H2
1919
**Driver Version:** vkrnlintvsp.sys - 10.0.22621.2506
2020

2121
## Description
@@ -131,9 +131,34 @@ LABEL_16:
131131
}
132132
```
133133
134+
The kernel has a mechanism to register and use specific callbacks for some predetermined drivers. When the specific driver gets loaded, the driver provides a table which contains list of callbacks that the kernel can use. During the initialization, the kernel calls `ExRegisterHost()` function with some specific inputs this is specific for each driver to register some predetermined unexported functions.
135+
136+
In this case, it was discovered that `VkiRootCalloutCreateEvent()` is one of the callback functions that can be invoked by `NtCreateCrossVmEvent()`. Therefore, to reach the vulnerable function call, we need to invoke `NtCreateCrossVmEvent()` from user space.
137+
138+
```mermaid
139+
flowchart LR
140+
%%{init: {"flowchart": {"htmlLabels": false}} }%%
141+
A["NtCreateCrossVmEvent (ntdll.dll)"]
142+
--> B["ExpCreateCrossVmEvent (ntoskrnl.exe)"]
143+
--> C["VkiRootCalloutCreateEvent (vkrnlintvsp.sys)"]
144+
--> D["VkiRootAdjustSecurityDescriptorForVmwp (vkrnlintvsp.sys)"]
145+
```
146+
147+
`NtCreateCrossVmEvent()` is an undocumented function that takes an `OBJECT_ATTRIBUTES` structure as an argument. This structure includes a `SecurityDescriptor` (`SECURITY_DESCRIPTOR`), which contains the security information associated with the object — including the `Dacl`. This is where the payload should be injected in order to trigger the vulnerability.
148+
```c++
149+
NtCreateCrossVmEvent(
150+
_Out_ PHANDLE CrossVmEvent,
151+
_In_ ACCESS_MASK DesiredAccess,
152+
_In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
153+
_In_ ULONG CrossVmEventFlags,
154+
_In_ LPCGUID VMID,
155+
_In_ LPCGUID ServiceID
156+
);
157+
```
158+
134159
## Exploit
135160
136-
Tested on: Windows 11 23H2
161+
Tested on: Windows 11 23H2
137162
Working POC: https://github.com/ghostbyt3/WinDriver-EXP/tree/main/CVE-2025-21333/POC
138163
139164
![IMG1](/img/cve-2025-21333/img1.png)

0 commit comments

Comments
 (0)