To compile the DLLs from this quickpost with MinGW on Kali, you first have to install MinGW.
Issue this command: apt install mingw-w64
Compile for 64-bit: x86_64-w64-mingw32-gcc -shared -o DemoDll.dll DemoDll.cpp
Compile for 32-bit: i686-w64-mingw32-gcc -shared -o DemoDll-x86.dll DemoDll.cpp
Option -shared is required to produce a DLL in stead of an EXE.
i tried to compile the code in https://github.com/BUseclab/paybreak using you method but fatal error: Winternl.h: Aucun fichier ou dossier de ce type
what do you think ? any idea to compile that on Debian for example ?
Comment by yassine — Wednesday 11 July 2018 @ 22:47
You are missing header file winternl.h.
Comment by Didier Stevens — Thursday 12 July 2018 @ 6:13
[…] Quickpost: Compiling DLLs with MinGW on Kali […]
Pingback by Overview of Content Published in July | Didier Stevens — Thursday 2 August 2018 @ 0:01
[…] is not only available on Kali, of course, but also on Windows. Compiling a DLL is very […]
Pingback by Quickpost: Compiling DLLs with MinGW on Windows | Didier Stevens — Tuesday 28 August 2018 @ 0:00
[…] To compile a Windows executable with version information and an icon on Kali, we use MinGW again. […]
Pingback by Quickpost: Compiling EXEs and Resources with MinGW on Kali | Didier Stevens — Monday 17 September 2018 @ 0:01
[…] Compiling a service DLL (a Windows DLL implementing a service to be executed inside a shared svchost.exe process) with MinGW on Kali, is almost the same as compiling a DLL. […]
Pingback by Quickpost: Compiling Service DLLs with MinGW on Kali | Didier Stevens — Monday 28 October 2019 @ 7:36