
This PoC demonstrates a race condition in the Windows kernel leading to a double-free vulnerability, allowing local privilege escalation to SYSTEM. The exploit uses multithreaded handle manipulation and heap spraying to trigger the flaw under controlled conditions.
Original code credit: https://github.com/dexterm300
This repository contains a proof-of-concept exploit for CVE-2025-62215, a race condition vulnerability in the Windows kernel that can be triggered via concurrent manipulation of kernel object handles. Under specific conditions, this results in a double-free, which can be exploited for local privilege escalation to SYSTEM.
The exploit works by:
This code is provided for educational and authorized security testing purposes only. Running this on production systems or without explicit permission is strictly prohibited.
cl.exe (MSVC)cl.exe) compiler with Debug CRT (/MDd)ntdll.dll for direct syscall bindingsDebug x64May need to install C++ build tools: https://visualstudio.microsoft.com/visual-cpp-build-tools/ & "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat"
cl.exe poc.cpp /Od /ZI /RTC1 /MDd /link /OUT:unicorn.exe
[*] Starting CVE-2025-62215 exploitation...
[*] Performing heap spray...
[+] Allocated 100 heap chunks
[*] Spawning 8 threads to trigger race condition...
[*] Waiting for race condition...
[+] SUCCESS: Privilege escalation detected!
[+] EXPLOITATION SUCCESSFUL!
[+] Privileges escalated to SYSTEM