Compiling C exploit.

If you get the exploit written in C code, you need to compile it to run on the Windows operating system. Different C code requires different Windows libraries during the compilation process. One way to compile C code is shown below.

Installing binary

You need to download mingw-w64 in Kali Linux to cross-compile C code.

sudo apt install mingw-w64

Compiling C code

Below is an example of compiling C code.

i686-w64-mingw32-gcc 40564.c -o exploit.exe -lws2_32

Verify the compilation.

ls -l exploit.exe

Transfer the file and run the exploit. 😄

Last updated