# windowz2-bleed
A zenbleed (CVE-2023-20593) POC for windows

# Disclaimer 
The POC is still a WIP and doesnt work, im still figuring winapi out so apologies and contributions are most welcome ofc

# Todo
- Convert the entire project to a Visual Studio solution instead of building everything manually
- Port the zenleak assembly code (zenleak.asm) from NASM to MASM

# References

# Build instructions
in case you are building the POC from the main branch (which doesnt yet support the visual studio project format) you have to compile it manually
Here are the steps to build the POC:
### Setup
1. Download and install the [MSVC]( compiler and the [NASM]( assembler
2. Open cmd.exe in the same directory where you cloned the repository and run the following commands:
   <Path\To\NASM>\nasm.exe -O0 -fwin64 -o zenleak.obj zenleak.asm
    cl.exe /EHsc /Z7 .\zenbleed.c .\pattern.c .\util.c .\workqueue.c /link /NOLOGO /MANIFEST /SUBSYSTEM:CONSOLE /MACHINE:x64 .\pattern.obj .\util.obj .\workqueue.obj .\zenleak.obj .\zenbleed.obj /OUT:zenbleed.exe
3. The above command should produce a file called `zenbleed.exe`

# Usage
[Refer here](
the only change you have to make is replace the bash code with the following powershell loop
while ($true) {
    Get-Content C:\Windows\System32\drivers\etc\services | Sort-Object