# Compiling Windows Exploits Guide

Does anyone have a decent guide on how to set up the Kali environment to compile Windows exploits? I’ve googled the majority of them and they are all incomplete. For example, trying to compile 41020.c for windows fails with a “Windows.h” no such file error. Maybe I don’t know all the flags but it seems like I’m missing the idea of at least referencing libraries. Or maybe my environment isn’t set up right in the first place. Any tips are appreciated.

Thanks!

You can use mingw

Well that link wasn’t very helpful but I did end up figuring it out (mostly).

First, leverage WINE to compile for you.

`wine c:\MinGW\bin\gcc.exe 41020.c -o 41020.exe -I C:\MinGW\include\ddk`

If that doesn’t work just go find a pre-compiled exploit from: