![Mingw linux](https://kumkoniak.com/82.jpg)
The following command will compile the Windows 7 afd.sys privilege escalation exploit: Use the following command to compile the afd.sys exploit for Windows 32 bit: Let’s start with downloading the exploit from Exploit-db: Let’s have a look at how we can compile 32 bit Windows exploits.
#Mingw linux 64 Bit
Even though Mingw-w64 was developed for the much needed 64 bit support we can also compile 32 bit Windows exploits. This version of the Windows operating system contains a vulnerability in the Ancillary Function Driver (AFD) which allows an elevation of privilege for an authenticated non administrative user. For this tutorial we will be compiling a Windows exploit written in c to exploit CVE-2011-1249 (MS11-046) vulnerability in Windows 7 SP0 x86. Now that we have Mingw-w64 installed we can start to compile Windows exploits on Kali Linux. Cross compiling Windows exploits with Mingw-w64 With the right repositories in the sources.list file you need to run apt-get update and then run the installation command for the Mingw-w64 package again.
![mingw linux mingw linux](https://i2.wp.com/blog.thescorpius.com/wp-content/uploads/2015/12/Cross-Compile2.jpg)
You can find the repositories for different versions of Kali Linux on the following page: Make sure you have the correct repositories in this file. To solve this issue make sure you have the right repositories in the sources.list file.
#Mingw linux install
Sometimes you get a Unable to locate package mingw-w64 error when trying to install the mingw-w64 package and get something apt-get install mingw-w64 Downloading and installing Mingw-w64 may take a little while to complete. Type y for yes to confirm and continue the Mingw-w64 installation process.
![mingw linux mingw linux](https://solarianprogrammer.com/images/2013/05/10/fig_2mingw.png)
![mingw linux mingw linux](https://i.stack.imgur.com/V1S1A.png)
Use apt-get install mingw-w64 to install Mingw-w64 on your Kali host.
![Mingw linux](https://kumkoniak.com/82.jpg)