Compiling exploits to Windows on Kali
Compile Win32 exploit with Wine
install mingw
1 2 3 4 |
wget http://downloads.sourceforge.net/project/mingw/Installer/mingw-get-setup.exe wine mingw-get-setup.exe # (select mingw base and c++, menu -> apply changes, quit) |
1 2 |
wine regedit # (HKCU/Environment add string PATH c:\windows;c:\windows\system;c:\MinGW\bin) rm mingw-get-setup.exe |
install some libs mingw needs
1 2 |
wget http://gojhonny.com/misc/mingw_bin.zipunzip mingw_bin.zip -d /root/.wine/drive_c/windows/ rm mingw_bin.zip |
running
1 2 3 4 |
wine mingw32-gcc.exe foo.c -o foo.exe -lws2_32 wine mingw32-g++.exe foo.cpp -o foo.exe -lws2_32 |