gcc -I include loader/exe2h/exe2h.c -oexe2h
x86_64-w64-mingw32-gcc -I include loader/exe2h/exe2h.c loader/exe2h/mmap-windows.c -lshlwapi -oexe2h.exe
i686-w64-mingw32-gcc -DBYPASS_AMSI_B -DBYPASS_WLDP_A -DBYPASS_ETW_B -fno-toplevel-reorder -fpack-struct=8 -fPIC -O0 -nostdlib loader/loader.c loader/depack.c loader/clib.c hash.c encrypt.c -I include -oloader.exe
In file included from loader/loader.h:97,
from loader/loader.c:32:
loader/peb.h:214:16: error: redefinition of ‘struct _PROCESSOR_NUMBER’
214 | typedef struct _PROCESSOR_NUMBER {
| ^~~~~
In file included from /usr/share/mingw-w64/include/minwindef.h:163,
from /usr/share/mingw-w64/include/windef.h:9,
from /usr/share/mingw-w64/include/windows.h:69,
from loader/loader.h:41:
/usr/share/mingw-w64/include/winnt.h:9435:16: note: originally defined here
9435 | typedef struct _PROCESSOR_NUMBER {
| ^~~~~
loader/peb.h:218:3: error: conflicting types for ‘PROCESSOR_NUMBER’; have ‘struct _PROCESSOR_NUMBER’
218 | } PROCESSOR_NUMBER, PPROCESSOR_NUMBER;
| ^~~~
/usr/share/mingw-w64/include/winnt.h:9439:3: note: previous declaration of ‘PROCESSOR_NUMBER’ with type ‘PROCESSOR_NUMBER’
9439 | } PROCESSOR_NUMBER, PPROCESSOR_NUMBER;
| ^~~~
loader/peb.h:218:22: error: conflicting types for ‘PPROCESSOR_NUMBER’; have ‘struct _PROCESSOR_NUMBER ’
218 | } PROCESSOR_NUMBER, PPROCESSOR_NUMBER;
| ^~~~~
/usr/share/mingw-w64/include/winnt.h:9439:22: note: previous declaration of ‘PPROCESSOR_NUMBER’ with type ‘PPROCESSOR_NUMBER’ {aka ‘struct _PROCESSOR_NUMBER ’}
9439 | } PROCESSOR_NUMBER, PPROCESSOR_NUMBER;
| ^~~~~
In file included from loader/winapi.h:36,
from loader/loader.h:98:
loader/bypass.h:38:1: warning: parameter names (without types) in function declaration
38 | BOOL DisableAMSI(PDONUT_INSTANCE);
| ^~~~
loader/bypass.h:41:1: warning: parameter names (without types) in function declaration
41 | BOOL DisableWLDP(PDONUT_INSTANCE);
| ^~~~
loader/bypass.h:44:1: warning: parameter names (without types) in function declaration
44 | BOOL DisableETW(PDONUT_INSTANCE);
| ^~~~
In file included from loader/loader.c:385:
loader/inmem_pe.c: In function ‘RunPE’:
loader/inmem_pe.c:223:39: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
223 | ntnew->OptionalHeader.ImageBase = (ULONGLONG)cs;
| ^
make: *** [Makefile.mingw:9: donut] Error 1
make -f Makefile.mingw rm -f exe2h exe2h.exe loader.bin instance donut.o hash.o encrypt.o format.o clib.o hash encrypt donut hash.exe encrypt.exe donut.exe lib/libdonut.a lib/libdonut.so loader.exe loader32.exe loader64.exe inject32.exe inject64.exe inject_local32.exe inject_local64.exe
RELEASE
gcc -I include loader/exe2h/exe2h.c -oexe2h x86_64-w64-mingw32-gcc -I include loader/exe2h/exe2h.c loader/exe2h/mmap-windows.c -lshlwapi -oexe2h.exe i686-w64-mingw32-gcc -DBYPASS_AMSI_B -DBYPASS_WLDP_A -DBYPASS_ETW_B -fno-toplevel-reorder -fpack-struct=8 -fPIC -O0 -nostdlib loader/loader.c loader/depack.c loader/clib.c hash.c encrypt.c -I include -oloader.exe In file included from loader/loader.h:97, from loader/loader.c:32: loader/peb.h:214:16: error: redefinition of ‘struct _PROCESSOR_NUMBER’ 214 | typedef struct _PROCESSOR_NUMBER { | ^
~~~~ In file included from /usr/share/mingw-w64/include/minwindef.h:163, from /usr/share/mingw-w64/include/windef.h:9, from /usr/share/mingw-w64/include/windows.h:69, from loader/loader.h:41: /usr/share/mingw-w64/include/winnt.h:9435:16: note: originally defined here 9435 | typedef struct _PROCESSOR_NUMBER { | ^~~~~ loader/peb.h:218:3: error: conflicting types for ‘PROCESSOR_NUMBER’; have ‘struct _PROCESSOR_NUMBER’ 218 | } PROCESSOR_NUMBER, PPROCESSOR_NUMBER; | ^~~~/usr/share/mingw-w64/include/winnt.h:9439:3: note: previous declaration of ‘PROCESSOR_NUMBER’ with type ‘PROCESSOR_NUMBER’ 9439 | } PROCESSOR_NUMBER, PPROCESSOR_NUMBER; | ^~~~loader/peb.h:218:22: error: conflicting types for ‘PPROCESSOR_NUMBER’; have ‘struct _PROCESSOR_NUMBER ’ 218 | } PROCESSOR_NUMBER, PPROCESSOR_NUMBER; | ^~~~~ /usr/share/mingw-w64/include/winnt.h:9439:22: note: previous declaration of ‘PPROCESSOR_NUMBER’ with type ‘PPROCESSOR_NUMBER’ {aka ‘struct _PROCESSOR_NUMBER ’} 9439 | } PROCESSOR_NUMBER, PPROCESSOR_NUMBER; | ^~~~~ In file included from loader/winapi.h:36, from loader/loader.h:98: loader/bypass.h:38:1: warning: parameter names (without types) in function declaration 38 | BOOL DisableAMSI(PDONUT_INSTANCE); | ^~~~ loader/bypass.h:41:1: warning: parameter names (without types) in function declaration 41 | BOOL DisableWLDP(PDONUT_INSTANCE); | ^~~~ loader/bypass.h:44:1: warning: parameter names (without types) in function declaration 44 | BOOL DisableETW(PDONUT_INSTANCE); | ^~~~ In file included from loader/loader.c:385: loader/inmem_pe.c: In function ‘RunPE’: loader/inmem_pe.c:223:39: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 223 | ntnew->OptionalHeader.ImageBase = (ULONGLONG)cs; | ^ make: *** [Makefile.mingw:9: donut] Error 1< PEzor!! v3.1.2 >
(( / / )) ,-{
-.|.-~-. .~
. (( // / )) '/\ / ~-. .-~ .-~^-. \ (( /// )). { } / \ \ (( / )) .----~-.\ \-' .~ \
. \^-. ///.----..> \ -~. ^-
^- ///-. _}^ - - - - ~ ~-- ,.-~ /.-~Read the blog posts here: https://iwantmore.pizza/posts/PEzor.html https://iwantmore.pizza/posts/PEzor2.html https://iwantmore.pizza/posts/PEzor3.html https://iwantmore.pizza/posts/PEzor4.html Based on: https://github.com/TheWover/donut https://github.com/EgeBalci/sgn https://github.com/JustasMasiulis/inline_syscall https://github.com/CylanceVulnResearch/ReflectiveDLLRefresher
x86_64-w64-mingw32-clang++ is missing from $PATH. Check https://github.com/tpoechtrager/wclang to learn how to install it