Share
## https://sploitus.com/exploit?id=753CFAEB-A98F-57FF-89D0-9B945D2CE3EF
# 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
[google-security-research](https://github.com/google/security-research/tree/master/pocs/cpus/zenbleed)

# 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](https://visualstudio.microsoft.com) compiler and the [NASM](https://www.nasm.us/pub/nasm/releasebuilds) assembler
2. Open cmd.exe in the same directory where you cloned the repository and run the following commands:
   ```batch
   <Path\To\NASM>\nasm.exe -O0 -fwin64 -o zenleak.obj zenleak.asm
   <PATH\To\MSVC>\Community\VC\Auxiliary\Build\vcvars64.bat
    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](https://github.com/google/security-research/tree/master/pocs/cpus/zenbleed#reproducing)
the only change you have to make is replace the bash code with the following powershell loop
```ps1
while ($true) {
    Get-Content C:\Windows\System32\drivers\etc\services | Sort-Object 
}
```