From 2b3f5a2bc6ae4f996149642c44a982e54961bbd6 Mon Sep 17 00:00:00 2001 From: Christophe De La Fuente Date: Fri, 3 Nov 2023 16:55:30 +0100 Subject: [PATCH 1/6] Includes ColdGate.c in each project --- c/meterpreter/source/dump_sam/dump_sam.c | 1 + c/meterpreter/source/elevator/elevator.c | 1 + c/meterpreter/source/extensions/bofloader/bofloader.c | 1 + c/meterpreter/source/extensions/espia/espia.c | 1 + c/meterpreter/source/extensions/extapi/extapi.c | 1 + c/meterpreter/source/extensions/incognito/incognito.c | 1 + c/meterpreter/source/extensions/kiwi/main.c | 1 + c/meterpreter/source/extensions/lanattacks/lanattacks.c | 1 + c/meterpreter/source/extensions/peinjector/peinjector.c | 1 + c/meterpreter/source/extensions/powershell/powershell.c | 1 + c/meterpreter/source/extensions/priv/priv.c | 1 + c/meterpreter/source/extensions/python/python_main.c | 1 + c/meterpreter/source/extensions/sniffer/sniffer.c | 1 + c/meterpreter/source/extensions/stdapi/server/stdapi.c | 1 + c/meterpreter/source/extensions/unhook/unhook.c | 1 + c/meterpreter/source/extensions/winpmem/winpmem_meterpreter.cpp | 1 + c/meterpreter/source/metsrv/metsrv.c | 1 + c/meterpreter/source/screenshot/screenshot.c | 1 + 18 files changed, 18 insertions(+) mode change 100644 => 100755 c/meterpreter/source/dump_sam/dump_sam.c mode change 100644 => 100755 c/meterpreter/source/elevator/elevator.c mode change 100644 => 100755 c/meterpreter/source/extensions/bofloader/bofloader.c mode change 100644 => 100755 c/meterpreter/source/extensions/espia/espia.c mode change 100644 => 100755 c/meterpreter/source/extensions/extapi/extapi.c mode change 100644 => 100755 c/meterpreter/source/extensions/incognito/incognito.c mode change 100644 => 100755 c/meterpreter/source/extensions/lanattacks/lanattacks.c mode change 100644 => 100755 c/meterpreter/source/extensions/priv/priv.c mode change 100644 => 100755 c/meterpreter/source/extensions/sniffer/sniffer.c mode change 100644 => 100755 c/meterpreter/source/extensions/stdapi/server/stdapi.c mode change 100644 => 100755 c/meterpreter/source/extensions/unhook/unhook.c mode change 100644 => 100755 c/meterpreter/source/extensions/winpmem/winpmem_meterpreter.cpp mode change 100644 => 100755 c/meterpreter/source/metsrv/metsrv.c mode change 100644 => 100755 c/meterpreter/source/screenshot/screenshot.c diff --git a/c/meterpreter/source/dump_sam/dump_sam.c b/c/meterpreter/source/dump_sam/dump_sam.c old mode 100644 new mode 100755 index 4e4f90041..2615f33ce --- a/c/meterpreter/source/dump_sam/dump_sam.c +++ b/c/meterpreter/source/dump_sam/dump_sam.c @@ -7,6 +7,7 @@ #define RDIDLL_NOEXPORT #define REFLECTIVEDLLINJECTION_CUSTOM_DLLMAIN #define REFLECTIVEDLLINJECTION_VIA_LOADREMOTELIBRARYR +#include "../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "ReflectiveLoader.c" diff --git a/c/meterpreter/source/elevator/elevator.c b/c/meterpreter/source/elevator/elevator.c old mode 100644 new mode 100755 index cd360f73f..2dcc2e597 --- a/c/meterpreter/source/elevator/elevator.c +++ b/c/meterpreter/source/elevator/elevator.c @@ -17,6 +17,7 @@ #define REFLECTIVEDLLINJECTION_CUSTOM_DLLMAIN #define RDIDLL_NOEXPORT +#include "../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" /* diff --git a/c/meterpreter/source/extensions/bofloader/bofloader.c b/c/meterpreter/source/extensions/bofloader/bofloader.c old mode 100644 new mode 100755 index 8e8fe5d6e..45326bc3c --- a/c/meterpreter/source/extensions/bofloader/bofloader.c +++ b/c/meterpreter/source/extensions/bofloader/bofloader.c @@ -13,6 +13,7 @@ // Required so that use of the API works. MetApi* met_api = NULL; #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" /*! @brief The enabled commands for this extension. */ diff --git a/c/meterpreter/source/extensions/espia/espia.c b/c/meterpreter/source/extensions/espia/espia.c old mode 100644 new mode 100755 index 06787d0d6..953148286 --- a/c/meterpreter/source/extensions/espia/espia.c +++ b/c/meterpreter/source/extensions/espia/espia.c @@ -11,6 +11,7 @@ MetApi* met_api = NULL; #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" Command customCommands[] = diff --git a/c/meterpreter/source/extensions/extapi/extapi.c b/c/meterpreter/source/extensions/extapi/extapi.c old mode 100644 new mode 100755 index f78025122..c89e28626 --- a/c/meterpreter/source/extensions/extapi/extapi.c +++ b/c/meterpreter/source/extensions/extapi/extapi.c @@ -10,6 +10,7 @@ MetApi* met_api = NULL; #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" #include "window.h" diff --git a/c/meterpreter/source/extensions/incognito/incognito.c b/c/meterpreter/source/extensions/incognito/incognito.c old mode 100644 new mode 100755 index ce97bce7b..20005ebb1 --- a/c/meterpreter/source/extensions/incognito/incognito.c +++ b/c/meterpreter/source/extensions/incognito/incognito.c @@ -15,6 +15,7 @@ MetApi* met_api = NULL; #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" DWORD request_incognito_list_tokens(Remote *remote, Packet *packet); diff --git a/c/meterpreter/source/extensions/kiwi/main.c b/c/meterpreter/source/extensions/kiwi/main.c index fd47a8552..823ea51da 100755 --- a/c/meterpreter/source/extensions/kiwi/main.c +++ b/c/meterpreter/source/extensions/kiwi/main.c @@ -10,6 +10,7 @@ MetApi* met_api = NULL; #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" #include "main.h" diff --git a/c/meterpreter/source/extensions/lanattacks/lanattacks.c b/c/meterpreter/source/extensions/lanattacks/lanattacks.c old mode 100644 new mode 100755 index db69a4fb7..f309b50e0 --- a/c/meterpreter/source/extensions/lanattacks/lanattacks.c +++ b/c/meterpreter/source/extensions/lanattacks/lanattacks.c @@ -9,6 +9,7 @@ MetApi* met_api = NULL; #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" #include #include "lanattacks.h" diff --git a/c/meterpreter/source/extensions/peinjector/peinjector.c b/c/meterpreter/source/extensions/peinjector/peinjector.c index 6d7bccf38..2c9169bb2 100755 --- a/c/meterpreter/source/extensions/peinjector/peinjector.c +++ b/c/meterpreter/source/extensions/peinjector/peinjector.c @@ -9,6 +9,7 @@ MetApi* met_api = NULL; #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" #include "peinjector_bridge.h" diff --git a/c/meterpreter/source/extensions/powershell/powershell.c b/c/meterpreter/source/extensions/powershell/powershell.c index a95ca1221..cf3736492 100755 --- a/c/meterpreter/source/extensions/powershell/powershell.c +++ b/c/meterpreter/source/extensions/powershell/powershell.c @@ -9,6 +9,7 @@ MetApi* met_api = NULL; #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" #include "powershell_bridge.h" diff --git a/c/meterpreter/source/extensions/priv/priv.c b/c/meterpreter/source/extensions/priv/priv.c old mode 100644 new mode 100755 index 36cc04d73..4bc3d863c --- a/c/meterpreter/source/extensions/priv/priv.c +++ b/c/meterpreter/source/extensions/priv/priv.c @@ -8,6 +8,7 @@ MetApi* met_api = NULL; #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" /*! diff --git a/c/meterpreter/source/extensions/python/python_main.c b/c/meterpreter/source/extensions/python/python_main.c index e7d9b8c55..80c28596d 100755 --- a/c/meterpreter/source/extensions/python/python_main.c +++ b/c/meterpreter/source/extensions/python/python_main.c @@ -10,6 +10,7 @@ MetApi* met_api = NULL; #define REFLECTIVEDLLINJECTION_CUSTOM_DLLMAIN #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" #include "python_commands.h" diff --git a/c/meterpreter/source/extensions/sniffer/sniffer.c b/c/meterpreter/source/extensions/sniffer/sniffer.c old mode 100644 new mode 100755 index 45838ff87..23c72ab58 --- a/c/meterpreter/source/extensions/sniffer/sniffer.c +++ b/c/meterpreter/source/extensions/sniffer/sniffer.c @@ -36,6 +36,7 @@ Command customCommands[] = // but this doesnt matter as we wont ever call DLL_METASPLOIT_ATTACH as that is only used by the // second stage reflective dll inject payload and not the metsrv itself when it loads extensions. #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" #define check_pssdk(); if(!hMgr && pktsdk_initialize()!=0){ met_api->packet.transmit_response(hErr, remote, response);return(hErr); } diff --git a/c/meterpreter/source/extensions/stdapi/server/stdapi.c b/c/meterpreter/source/extensions/stdapi/server/stdapi.c old mode 100644 new mode 100755 index cfa15fd8d..43af64780 --- a/c/meterpreter/source/extensions/stdapi/server/stdapi.c +++ b/c/meterpreter/source/extensions/stdapi/server/stdapi.c @@ -9,6 +9,7 @@ MetApi* met_api = NULL; #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" // NOTE: _CRT_SECURE_NO_WARNINGS has been added to Configuration->C/C++->Preprocessor->Preprocessor diff --git a/c/meterpreter/source/extensions/unhook/unhook.c b/c/meterpreter/source/extensions/unhook/unhook.c old mode 100644 new mode 100755 index 381dba3f1..f23ee02c2 --- a/c/meterpreter/source/extensions/unhook/unhook.c +++ b/c/meterpreter/source/extensions/unhook/unhook.c @@ -6,6 +6,7 @@ #include "common_metapi.h" #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" #include "unhook.h" diff --git a/c/meterpreter/source/extensions/winpmem/winpmem_meterpreter.cpp b/c/meterpreter/source/extensions/winpmem/winpmem_meterpreter.cpp old mode 100644 new mode 100755 index e85e7bb37..3e0d1c5c0 --- a/c/meterpreter/source/extensions/winpmem/winpmem_meterpreter.cpp +++ b/c/meterpreter/source/extensions/winpmem/winpmem_meterpreter.cpp @@ -7,6 +7,7 @@ extern "C" { #include "common_metapi.h" #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" #ifndef min diff --git a/c/meterpreter/source/metsrv/metsrv.c b/c/meterpreter/source/metsrv/metsrv.c old mode 100644 new mode 100755 index 93773e661..6ded911e5 --- a/c/meterpreter/source/metsrv/metsrv.c +++ b/c/meterpreter/source/metsrv/metsrv.c @@ -10,6 +10,7 @@ #define REFLECTIVEDLLINJECTION_CUSTOM_DLLMAIN #define RDIDLL_NOEXPORT +#include "../../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" #include "../ReflectiveDLLInjection/inject/src/GetProcAddressR.c" #include "../ReflectiveDLLInjection/inject/src/LoadLibraryR.c" diff --git a/c/meterpreter/source/screenshot/screenshot.c b/c/meterpreter/source/screenshot/screenshot.c old mode 100644 new mode 100755 index 11d49ad52..5ccd5bac6 --- a/c/meterpreter/source/screenshot/screenshot.c +++ b/c/meterpreter/source/screenshot/screenshot.c @@ -9,6 +9,7 @@ #define REFLECTIVEDLLINJECTION_CUSTOM_DLLMAIN #define RDIDLL_NOEXPORT +#include "../ReflectiveDLLInjection/dll/src/ColdGate.c" #include "../ReflectiveDLLInjection/dll/src/ReflectiveLoader.c" /* From e34dde5f4d4d8915d14a541f669c132917f31333 Mon Sep 17 00:00:00 2001 From: Christophe De La Fuente Date: Fri, 3 Nov 2023 17:02:36 +0100 Subject: [PATCH 2/6] Change railgun macro name to stdcall_func --- .../stdapi/server/railgun/railgun.c | 104 +++++++++--------- .../stdapi/server/railgun/railgun.h | 2 +- 2 files changed, 53 insertions(+), 53 deletions(-) mode change 100644 => 100755 c/meterpreter/source/extensions/stdapi/server/railgun/railgun.h diff --git a/c/meterpreter/source/extensions/stdapi/server/railgun/railgun.c b/c/meterpreter/source/extensions/stdapi/server/railgun/railgun.c index 879c9c7c6..67c18f186 100755 --- a/c/meterpreter/source/extensions/stdapi/server/railgun/railgun.c +++ b/c/meterpreter/source/extensions/stdapi/server/railgun/railgun.c @@ -220,32 +220,32 @@ DWORD railgun_call( RAILGUN_INPUT * pInput, RAILGUN_OUTPUT * pOutput ) #ifdef _WIN64 switch( dwStackSizeInElements ) { - case 0: pOutput->qwReturnValue = function( 00 )(); break; - case 1: pOutput->qwReturnValue = function( 01 )( p(0) ); break; - case 2: pOutput->qwReturnValue = function( 02 )( p(0), p(1) ); break; - case 3: pOutput->qwReturnValue = function( 03 )( p(0), p(1), p(2) ); break; - case 4: pOutput->qwReturnValue = function( 04 )( p(0), p(1), p(2), p(3) );break; - case 5: pOutput->qwReturnValue = function( 05 )( p(0), p(1), p(2), p(3), p(4) );break; - case 6: pOutput->qwReturnValue = function( 06 )( p(0), p(1), p(2), p(3), p(4), p(5) );break; - case 7: pOutput->qwReturnValue = function( 07 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6) );break; - case 8: pOutput->qwReturnValue = function( 08 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7) );break; - case 9: pOutput->qwReturnValue = function( 09 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8) );break; - case 10: pOutput->qwReturnValue = function( 10 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9) );break; - case 11: pOutput->qwReturnValue = function( 11 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10) );break; - case 12: pOutput->qwReturnValue = function( 12 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11) );break; - case 13: pOutput->qwReturnValue = function( 13 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12) );break; - case 14: pOutput->qwReturnValue = function( 14 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13) );break; - case 15: pOutput->qwReturnValue = function( 15 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14) );break; - case 16: pOutput->qwReturnValue = function( 16 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15) );break; - case 17: pOutput->qwReturnValue = function( 17 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16) );break; - case 18: pOutput->qwReturnValue = function( 18 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17) );break; - case 19: pOutput->qwReturnValue = function( 19 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18) );break; - case 20: pOutput->qwReturnValue = function( 20 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19) );break; - case 21: pOutput->qwReturnValue = function( 21 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20) );break; - case 22: pOutput->qwReturnValue = function( 22 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21) );break; - case 23: pOutput->qwReturnValue = function( 23 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21), p(22) );break; - case 24: pOutput->qwReturnValue = function( 24 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21), p(22), p(23) );break; - case 25: pOutput->qwReturnValue = function( 25 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21), p(22), p(23), p(24) );break; + case 0: pOutput->qwReturnValue = stdcall_func( 00 )(); break; + case 1: pOutput->qwReturnValue = stdcall_func( 01 )( p(0) ); break; + case 2: pOutput->qwReturnValue = stdcall_func( 02 )( p(0), p(1) ); break; + case 3: pOutput->qwReturnValue = stdcall_func( 03 )( p(0), p(1), p(2) ); break; + case 4: pOutput->qwReturnValue = stdcall_func( 04 )( p(0), p(1), p(2), p(3) );break; + case 5: pOutput->qwReturnValue = stdcall_func( 05 )( p(0), p(1), p(2), p(3), p(4) );break; + case 6: pOutput->qwReturnValue = stdcall_func( 06 )( p(0), p(1), p(2), p(3), p(4), p(5) );break; + case 7: pOutput->qwReturnValue = stdcall_func( 07 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6) );break; + case 8: pOutput->qwReturnValue = stdcall_func( 08 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7) );break; + case 9: pOutput->qwReturnValue = stdcall_func( 09 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8) );break; + case 10: pOutput->qwReturnValue = stdcall_func( 10 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9) );break; + case 11: pOutput->qwReturnValue = stdcall_func( 11 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10) );break; + case 12: pOutput->qwReturnValue = stdcall_func( 12 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11) );break; + case 13: pOutput->qwReturnValue = stdcall_func( 13 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12) );break; + case 14: pOutput->qwReturnValue = stdcall_func( 14 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13) );break; + case 15: pOutput->qwReturnValue = stdcall_func( 15 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14) );break; + case 16: pOutput->qwReturnValue = stdcall_func( 16 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15) );break; + case 17: pOutput->qwReturnValue = stdcall_func( 17 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16) );break; + case 18: pOutput->qwReturnValue = stdcall_func( 18 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17) );break; + case 19: pOutput->qwReturnValue = stdcall_func( 19 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18) );break; + case 20: pOutput->qwReturnValue = stdcall_func( 20 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19) );break; + case 21: pOutput->qwReturnValue = stdcall_func( 21 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20) );break; + case 22: pOutput->qwReturnValue = stdcall_func( 22 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21) );break; + case 23: pOutput->qwReturnValue = stdcall_func( 23 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21), p(22) );break; + case 24: pOutput->qwReturnValue = stdcall_func( 24 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21), p(22), p(23) );break; + case 25: pOutput->qwReturnValue = stdcall_func( 25 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21), p(22), p(23), p(24) );break; default: dprintf( "[RAILGUN] railgun_call: Can't call function: dwStackSizeInElements (%d) is > 25", dwStackSizeInElements ); @@ -295,32 +295,32 @@ DWORD railgun_call( RAILGUN_INPUT * pInput, RAILGUN_OUTPUT * pOutput ) } else { // STDCALL switch( dwStackSizeInElements ) { - case 0: pOutput->qwReturnValue = function( 00 )(); break; - case 1: pOutput->qwReturnValue = function( 01 )( p(0) ); break; - case 2: pOutput->qwReturnValue = function( 02 )( p(0), p(1) ); break; - case 3: pOutput->qwReturnValue = function( 03 )( p(0), p(1), p(2) ); break; - case 4: pOutput->qwReturnValue = function( 04 )( p(0), p(1), p(2), p(3) );break; - case 5: pOutput->qwReturnValue = function( 05 )( p(0), p(1), p(2), p(3), p(4) );break; - case 6: pOutput->qwReturnValue = function( 06 )( p(0), p(1), p(2), p(3), p(4), p(5) );break; - case 7: pOutput->qwReturnValue = function( 07 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6) );break; - case 8: pOutput->qwReturnValue = function( 08 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7) );break; - case 9: pOutput->qwReturnValue = function( 09 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8) );break; - case 10: pOutput->qwReturnValue = function( 10 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9) );break; - case 11: pOutput->qwReturnValue = function( 11 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10) );break; - case 12: pOutput->qwReturnValue = function( 12 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11) );break; - case 13: pOutput->qwReturnValue = function( 13 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12) );break; - case 14: pOutput->qwReturnValue = function( 14 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13) );break; - case 15: pOutput->qwReturnValue = function( 15 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14) );break; - case 16: pOutput->qwReturnValue = function( 16 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15) );break; - case 17: pOutput->qwReturnValue = function( 17 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16) );break; - case 18: pOutput->qwReturnValue = function( 18 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17) );break; - case 19: pOutput->qwReturnValue = function( 19 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18) );break; - case 20: pOutput->qwReturnValue = function( 20 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19) );break; - case 21: pOutput->qwReturnValue = function( 21 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20) );break; - case 22: pOutput->qwReturnValue = function( 22 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21) );break; - case 23: pOutput->qwReturnValue = function( 23 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21), p(22) );break; - case 24: pOutput->qwReturnValue = function( 24 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21), p(22), p(23) );break; - case 25: pOutput->qwReturnValue = function( 25 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21), p(22), p(23), p(24) );break; + case 0: pOutput->qwReturnValue = stdcall_func( 00 )(); break; + case 1: pOutput->qwReturnValue = stdcall_func( 01 )( p(0) ); break; + case 2: pOutput->qwReturnValue = stdcall_func( 02 )( p(0), p(1) ); break; + case 3: pOutput->qwReturnValue = stdcall_func( 03 )( p(0), p(1), p(2) ); break; + case 4: pOutput->qwReturnValue = stdcall_func( 04 )( p(0), p(1), p(2), p(3) );break; + case 5: pOutput->qwReturnValue = stdcall_func( 05 )( p(0), p(1), p(2), p(3), p(4) );break; + case 6: pOutput->qwReturnValue = stdcall_func( 06 )( p(0), p(1), p(2), p(3), p(4), p(5) );break; + case 7: pOutput->qwReturnValue = stdcall_func( 07 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6) );break; + case 8: pOutput->qwReturnValue = stdcall_func( 08 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7) );break; + case 9: pOutput->qwReturnValue = stdcall_func( 09 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8) );break; + case 10: pOutput->qwReturnValue = stdcall_func( 10 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9) );break; + case 11: pOutput->qwReturnValue = stdcall_func( 11 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10) );break; + case 12: pOutput->qwReturnValue = stdcall_func( 12 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11) );break; + case 13: pOutput->qwReturnValue = stdcall_func( 13 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12) );break; + case 14: pOutput->qwReturnValue = stdcall_func( 14 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13) );break; + case 15: pOutput->qwReturnValue = stdcall_func( 15 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14) );break; + case 16: pOutput->qwReturnValue = stdcall_func( 16 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15) );break; + case 17: pOutput->qwReturnValue = stdcall_func( 17 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16) );break; + case 18: pOutput->qwReturnValue = stdcall_func( 18 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17) );break; + case 19: pOutput->qwReturnValue = stdcall_func( 19 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18) );break; + case 20: pOutput->qwReturnValue = stdcall_func( 20 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19) );break; + case 21: pOutput->qwReturnValue = stdcall_func( 21 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20) );break; + case 22: pOutput->qwReturnValue = stdcall_func( 22 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21) );break; + case 23: pOutput->qwReturnValue = stdcall_func( 23 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21), p(22) );break; + case 24: pOutput->qwReturnValue = stdcall_func( 24 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21), p(22), p(23) );break; + case 25: pOutput->qwReturnValue = stdcall_func( 25 )( p(0), p(1), p(2), p(3), p(4), p(5), p(6), p(7), p(8), p(9), p(10), p(11), p(12), p(13), p(14), p(15), p(16), p(17), p(18), p(19), p(20), p(21), p(22), p(23), p(24) );break; default: dprintf( "[RAILGUN] railgun_call: Can't call function: dwStackSizeInElements (%d) is > 25", dwStackSizeInElements ); diff --git a/c/meterpreter/source/extensions/stdapi/server/railgun/railgun.h b/c/meterpreter/source/extensions/stdapi/server/railgun/railgun.h old mode 100644 new mode 100755 index 32a2d0427..6439e7019 --- a/c/meterpreter/source/extensions/stdapi/server/railgun/railgun.h +++ b/c/meterpreter/source/extensions/stdapi/server/railgun/railgun.h @@ -47,7 +47,7 @@ typedef struct _RAILGUN_OUTPUT } RAILGUN_OUTPUT; #define p(i) (ULONG_PTR)pStack[i] -#define function(i) ((STDCALL_FUNC_##i)pFuncAddr) +#define stdcall_func(i) ((STDCALL_FUNC_##i)pFuncAddr) #define cdecl_func(i) ((CDECL_FUNC_##i)pFuncAddr) typedef ULONG_PTR (__stdcall * STDCALL_FUNC_00)( VOID ); From acbf9f54b52f885c3c694530df3d75ee052c5fce Mon Sep 17 00:00:00 2001 From: Christophe De La Fuente Date: Fri, 3 Nov 2023 17:05:20 +0100 Subject: [PATCH 3/6] Update VS configs --- c/meterpreter/source/metsrv/metsrv.h | 4 ++ .../ReflectiveDLLInjection.vcxproj | 12 ++++++ .../workspace/dump_sam/dump_sam.vcxproj | 27 ++++++++++-- .../workspace/elevator/elevator.vcxproj | 31 ++++++++++---- .../ext_server_bofloader.vcxproj | 42 +++++++++++++------ .../ext_server_espia/ext_server_espia.vcxproj | 20 ++++++++- .../ext_server_extapi.vcxproj | 20 ++++++++- .../ext_server_incognito.vcxproj | 20 ++++++++- .../ext_server_kiwi/ext_server_kiwi.vcxproj | 18 ++++++++ .../ext_server_kiwi.vcxproj.filters | 4 ++ .../ext_server_lanattacks.vcxproj | 20 ++++++++- .../ext_server_peinjector.vcxproj | 20 ++++++++- .../ext_server_powershell.vcxproj | 20 ++++++++- .../ext_server_priv/ext_server_priv.vcxproj | 20 ++++++++- .../ext_server_python.vcxproj | 18 +++++++- .../ext_server_python.vcxproj.filters | 3 ++ .../ext_server_sniffer.vcxproj | 16 ++++++- .../ext_server_stdapi.vcxproj | 20 ++++++++- .../ext_server_unhook.vcxproj | 20 ++++++++- .../ext_server_winpmem.vcxproj | 20 ++++++++- c/meterpreter/workspace/meterpreter.sln | 4 +- c/meterpreter/workspace/metsrv/metsrv.vcxproj | 21 +++++++++- .../workspace/metsrv/metsrv.vcxproj.filters | 4 ++ .../workspace/screenshot/screenshot.vcxproj | 20 ++++++++- 24 files changed, 385 insertions(+), 39 deletions(-) mode change 100644 => 100755 c/meterpreter/source/metsrv/metsrv.h diff --git a/c/meterpreter/source/metsrv/metsrv.h b/c/meterpreter/source/metsrv/metsrv.h old mode 100644 new mode 100755 index e73aaacd8..7013b66d5 --- a/c/meterpreter/source/metsrv/metsrv.h +++ b/c/meterpreter/source/metsrv/metsrv.h @@ -18,6 +18,10 @@ #include "remote_dispatch.h" #include "libloader.h" +#define EXITFUNC_SEH 0xEA320EFE +#define EXITFUNC_THREAD 0x0A2A1DE0 +#define EXITFUNC_PROCESS 0x56A2B5F0 + #include "../ReflectiveDLLInjection/inject/src/GetProcAddressR.h" #include "../ReflectiveDLLInjection/inject/src/LoadLibraryR.h" #include "../ReflectiveDLLInjection/dll/src/ReflectiveLoader.h" diff --git a/c/meterpreter/workspace/ReflectiveDLLInjection/ReflectiveDLLInjection.vcxproj b/c/meterpreter/workspace/ReflectiveDLLInjection/ReflectiveDLLInjection.vcxproj index ba50be544..dce0c22b2 100644 --- a/c/meterpreter/workspace/ReflectiveDLLInjection/ReflectiveDLLInjection.vcxproj +++ b/c/meterpreter/workspace/ReflectiveDLLInjection/ReflectiveDLLInjection.vcxproj @@ -187,16 +187,28 @@ + + + + + true + true + + + true + true + + diff --git a/c/meterpreter/workspace/dump_sam/dump_sam.vcxproj b/c/meterpreter/workspace/dump_sam/dump_sam.vcxproj index 15be2cea9..bebb0d00d 100755 --- a/c/meterpreter/workspace/dump_sam/dump_sam.vcxproj +++ b/c/meterpreter/workspace/dump_sam/dump_sam.vcxproj @@ -56,6 +56,7 @@ + @@ -112,10 +113,11 @@ MultiThreaded false false - StdCall + Cdecl CompileAsC Default false + false Windows @@ -125,6 +127,7 @@ false false $(ProjectDir)../../source/dump_sam/dump_sam.def + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -146,8 +149,9 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) true MultiThreadedDLL false - StdCall + Cdecl CompileAsC + false Windows @@ -158,6 +162,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) false DllMain $(ProjectDir)../../source/dump_sam/dump_sam.def + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -181,10 +186,11 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" MultiThreaded false false - StdCall + Cdecl CompileAsC Default false + false Windows @@ -194,6 +200,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" false false $(ProjectDir)../../source/dump_sam/dump_sam.def + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -215,8 +222,9 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) true MultiThreadedDLL false - StdCall + Cdecl CompileAsC + false Windows @@ -227,6 +235,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) false DllMain $(ProjectDir)../../source/dump_sam/dump_sam.def + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -248,8 +257,18 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + true + true + + + Document + true + true + + \ No newline at end of file diff --git a/c/meterpreter/workspace/elevator/elevator.vcxproj b/c/meterpreter/workspace/elevator/elevator.vcxproj index d0b5620f4..749cb53ac 100644 --- a/c/meterpreter/workspace/elevator/elevator.vcxproj +++ b/c/meterpreter/workspace/elevator/elevator.vcxproj @@ -122,7 +122,7 @@ NotUsing Level3 ProgramDatabase - StdCall + Cdecl CompileAsC false true @@ -145,6 +145,7 @@ $(ProjectDir)..\..\source\def\plugin.def /ignore:4070 %(AdditionalOptions) + false editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -163,7 +164,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" NotUsing Level3 ProgramDatabase - StdCall + Cdecl CompileAsC false true @@ -187,6 +188,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + false editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -205,7 +207,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) NotUsing Level3 ProgramDatabase - StdCall + Cdecl CompileAsC false true @@ -228,6 +230,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\plugin.def /ignore:4070 %(AdditionalOptions) + false editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -249,7 +252,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" NotUsing Level3 ProgramDatabase - StdCall + Cdecl CompileAsC true ..\..\source\ReflectiveDLLInjection\common;..\..\source\common @@ -288,7 +291,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" NotUsing Level3 ProgramDatabase - StdCall + Cdecl CompileAsC true ..\..\source\ReflectiveDLLInjection\common;..\..\source\common @@ -329,7 +332,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) NotUsing Level3 ProgramDatabase - StdCall + Cdecl CompileAsC true ..\..\source\ReflectiveDLLInjection\common;..\..\source\common @@ -365,6 +368,20 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + Document + true + true + ASSEMBLE + + + true + true + true + + @@ -372,4 +389,4 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" - + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_bofloader/ext_server_bofloader.vcxproj b/c/meterpreter/workspace/ext_server_bofloader/ext_server_bofloader.vcxproj index aba733413..7f564180d 100644 --- a/c/meterpreter/workspace/ext_server_bofloader/ext_server_bofloader.vcxproj +++ b/c/meterpreter/workspace/ext_server_bofloader/ext_server_bofloader.vcxproj @@ -37,6 +37,18 @@ + + + true + true + true + + + true + true + true + + {486B160F-C571-486D-AAC3-CB60CEA7CBDD} ext_server_incognito @@ -170,10 +182,11 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No - editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL -IF NOT EXIST "$(ProjectDir)..\..\output\" mkdir "$(ProjectDir)..\..\output\" + editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL +IF NOT EXIST "$(ProjectDir)..\..\output\" mkdir "$(ProjectDir)..\..\output\" copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" @@ -226,10 +239,11 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No - editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL -IF NOT EXIST "$(ProjectDir)..\..\output\" mkdir "$(ProjectDir)..\..\output\" + editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL +IF NOT EXIST "$(ProjectDir)..\..\output\" mkdir "$(ProjectDir)..\..\output\" copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName).debug$(TargetExt)" @@ -281,10 +295,11 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No - editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL -IF NOT EXIST "$(ProjectDir)..\..\output\" mkdir "$(ProjectDir)..\..\output\" + editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL +IF NOT EXIST "$(ProjectDir)..\..\output\" mkdir "$(ProjectDir)..\..\output\" copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" @@ -340,10 +355,11 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No - editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL -IF NOT EXIST "$(ProjectDir)..\..\output\" mkdir "$(ProjectDir)..\..\output\" + editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL +IF NOT EXIST "$(ProjectDir)..\..\output\" mkdir "$(ProjectDir)..\..\output\" copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" @@ -400,10 +416,11 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No - editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL -IF NOT EXIST "$(ProjectDir)..\..\output\" mkdir "$(ProjectDir)..\..\output\" + editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL +IF NOT EXIST "$(ProjectDir)..\..\output\" mkdir "$(ProjectDir)..\..\output\" copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName).debug$(TargetExt)" @@ -459,10 +476,11 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No - editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL -IF NOT EXIST "$(ProjectDir)..\..\output\" mkdir "$(ProjectDir)..\..\output\" + editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL +IF NOT EXIST "$(ProjectDir)..\..\output\" mkdir "$(ProjectDir)..\..\output\" copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" diff --git a/c/meterpreter/workspace/ext_server_espia/ext_server_espia.vcxproj b/c/meterpreter/workspace/ext_server_espia/ext_server_espia.vcxproj index 4065c24c6..f4ac0d194 100644 --- a/c/meterpreter/workspace/ext_server_espia/ext_server_espia.vcxproj +++ b/c/meterpreter/workspace/ext_server_espia/ext_server_espia.vcxproj @@ -159,6 +159,7 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + false editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -216,6 +217,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + false editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -272,6 +274,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + false editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -328,6 +331,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + false editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -385,6 +389,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + false editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -441,6 +446,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + false editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -457,6 +463,18 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + true + true + + + true + true + true + + @@ -464,4 +482,4 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" - + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_extapi/ext_server_extapi.vcxproj b/c/meterpreter/workspace/ext_server_extapi/ext_server_extapi.vcxproj index 33891ee83..ef46e556d 100644 --- a/c/meterpreter/workspace/ext_server_extapi/ext_server_extapi.vcxproj +++ b/c/meterpreter/workspace/ext_server_extapi/ext_server_extapi.vcxproj @@ -152,6 +152,7 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -207,6 +208,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -261,6 +263,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -316,6 +319,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -372,6 +376,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -427,6 +432,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -469,6 +475,18 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + true + true + + + true + true + true + + @@ -476,4 +494,4 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" - + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_incognito/ext_server_incognito.vcxproj b/c/meterpreter/workspace/ext_server_incognito/ext_server_incognito.vcxproj index 18a5b22cd..bee876bdc 100644 --- a/c/meterpreter/workspace/ext_server_incognito/ext_server_incognito.vcxproj +++ b/c/meterpreter/workspace/ext_server_incognito/ext_server_incognito.vcxproj @@ -157,6 +157,7 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -212,6 +213,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -266,6 +268,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -324,6 +327,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -383,6 +387,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -441,6 +446,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -466,8 +472,20 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + true + true + + + true + true + true + + - + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_kiwi/ext_server_kiwi.vcxproj b/c/meterpreter/workspace/ext_server_kiwi/ext_server_kiwi.vcxproj index e3e5b0abe..ea63cc195 100644 --- a/c/meterpreter/workspace/ext_server_kiwi/ext_server_kiwi.vcxproj +++ b/c/meterpreter/workspace/ext_server_kiwi/ext_server_kiwi.vcxproj @@ -192,6 +192,7 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -249,6 +250,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -305,6 +307,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -365,6 +368,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -426,6 +430,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -486,6 +491,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -745,6 +751,18 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + true + true + + + true + true + true + + diff --git a/c/meterpreter/workspace/ext_server_kiwi/ext_server_kiwi.vcxproj.filters b/c/meterpreter/workspace/ext_server_kiwi/ext_server_kiwi.vcxproj.filters index c17462c4f..3edf88046 100644 --- a/c/meterpreter/workspace/ext_server_kiwi/ext_server_kiwi.vcxproj.filters +++ b/c/meterpreter/workspace/ext_server_kiwi/ext_server_kiwi.vcxproj.filters @@ -712,4 +712,8 @@ {fdb3471d-bb0a-4de4-95ff-f4f343270ebd} + + + + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_lanattacks/ext_server_lanattacks.vcxproj b/c/meterpreter/workspace/ext_server_lanattacks/ext_server_lanattacks.vcxproj index 3490dc0ed..3ccfe362e 100644 --- a/c/meterpreter/workspace/ext_server_lanattacks/ext_server_lanattacks.vcxproj +++ b/c/meterpreter/workspace/ext_server_lanattacks/ext_server_lanattacks.vcxproj @@ -146,6 +146,7 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -193,6 +194,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -239,6 +241,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -293,6 +296,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -348,6 +352,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -402,6 +407,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -420,6 +426,18 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + true + true + + + true + true + true + + @@ -427,4 +445,4 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" - + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_peinjector/ext_server_peinjector.vcxproj b/c/meterpreter/workspace/ext_server_peinjector/ext_server_peinjector.vcxproj index a8a5ce5d1..137fcc1c4 100755 --- a/c/meterpreter/workspace/ext_server_peinjector/ext_server_peinjector.vcxproj +++ b/c/meterpreter/workspace/ext_server_peinjector/ext_server_peinjector.vcxproj @@ -152,6 +152,7 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -207,6 +208,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -261,6 +263,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -316,6 +319,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -372,6 +376,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -427,6 +432,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -452,6 +458,18 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + true + true + + + true + true + true + + @@ -459,4 +477,4 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" - + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_powershell/ext_server_powershell.vcxproj b/c/meterpreter/workspace/ext_server_powershell/ext_server_powershell.vcxproj index 3e86f8957..3a7e798f7 100644 --- a/c/meterpreter/workspace/ext_server_powershell/ext_server_powershell.vcxproj +++ b/c/meterpreter/workspace/ext_server_powershell/ext_server_powershell.vcxproj @@ -153,6 +153,7 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -209,6 +210,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -264,6 +266,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -320,6 +323,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -377,6 +381,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -433,6 +438,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -453,6 +459,18 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + true + true + + + true + true + true + + @@ -460,4 +478,4 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" - + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_priv/ext_server_priv.vcxproj b/c/meterpreter/workspace/ext_server_priv/ext_server_priv.vcxproj index f7d4d1a84..d005b53bb 100644 --- a/c/meterpreter/workspace/ext_server_priv/ext_server_priv.vcxproj +++ b/c/meterpreter/workspace/ext_server_priv/ext_server_priv.vcxproj @@ -170,6 +170,7 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) false + No true @@ -243,6 +244,7 @@ msbuild.exe /target:Build /property:PlatformToolset=$(PlatformToolset);Configura $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) false + No true @@ -316,6 +318,7 @@ msbuild.exe /target:Build /property:PlatformToolset=$(PlatformToolset);Configura $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) false + No true @@ -389,6 +392,7 @@ msbuild.exe /target:Build /property:PlatformToolset=$(PlatformToolset);Configura $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) false + No true @@ -461,6 +465,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) false + No true @@ -533,6 +538,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) false + No true @@ -603,8 +609,20 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + true + true + + + true + true + true + + - + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_python/ext_server_python.vcxproj b/c/meterpreter/workspace/ext_server_python/ext_server_python.vcxproj index 6929a8b7c..a29adbdd6 100755 --- a/c/meterpreter/workspace/ext_server_python/ext_server_python.vcxproj +++ b/c/meterpreter/workspace/ext_server_python/ext_server_python.vcxproj @@ -152,6 +152,7 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -210,6 +211,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -267,6 +269,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -324,6 +327,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -382,6 +386,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -439,6 +444,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -811,9 +817,19 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" true true + + true + true + true + + + true + true + true + - + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_python/ext_server_python.vcxproj.filters b/c/meterpreter/workspace/ext_server_python/ext_server_python.vcxproj.filters index e9ab9a205..ab90e5c43 100755 --- a/c/meterpreter/workspace/ext_server_python/ext_server_python.vcxproj.filters +++ b/c/meterpreter/workspace/ext_server_python/ext_server_python.vcxproj.filters @@ -1043,6 +1043,7 @@ Modules + @@ -1058,5 +1059,7 @@ Modules\_ctypes + + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_sniffer/ext_server_sniffer.vcxproj b/c/meterpreter/workspace/ext_server_sniffer/ext_server_sniffer.vcxproj index 8473e05af..9993531bf 100644 --- a/c/meterpreter/workspace/ext_server_sniffer/ext_server_sniffer.vcxproj +++ b/c/meterpreter/workspace/ext_server_sniffer/ext_server_sniffer.vcxproj @@ -140,6 +140,7 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) false + No true @@ -207,6 +208,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) false + No true @@ -273,6 +275,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) false + No true @@ -339,6 +342,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) false + No true @@ -360,6 +364,16 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) + + + true + true + + + true + true + + @@ -367,4 +381,4 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) - + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_stdapi/ext_server_stdapi.vcxproj b/c/meterpreter/workspace/ext_server_stdapi/ext_server_stdapi.vcxproj index 238aa06ee..37f57197b 100644 --- a/c/meterpreter/workspace/ext_server_stdapi/ext_server_stdapi.vcxproj +++ b/c/meterpreter/workspace/ext_server_stdapi/ext_server_stdapi.vcxproj @@ -171,6 +171,7 @@ /ignore:4070 %(AdditionalOptions) false + No true @@ -239,6 +240,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" false + No true @@ -306,6 +308,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) /ignore:4070 %(AdditionalOptions) false + No true @@ -372,6 +375,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) false + No true @@ -439,6 +443,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" false + No true @@ -505,6 +510,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) /ignore:4070 %(AdditionalOptions) false + No true @@ -591,6 +597,18 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + true + true + + + true + true + true + + @@ -598,4 +616,4 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" - + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_unhook/ext_server_unhook.vcxproj b/c/meterpreter/workspace/ext_server_unhook/ext_server_unhook.vcxproj index 085a3deb0..7b3cceace 100644 --- a/c/meterpreter/workspace/ext_server_unhook/ext_server_unhook.vcxproj +++ b/c/meterpreter/workspace/ext_server_unhook/ext_server_unhook.vcxproj @@ -152,6 +152,7 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -207,6 +208,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -261,6 +263,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -315,6 +318,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -370,6 +374,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -424,6 +429,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -442,6 +448,18 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + true + true + + + true + true + true + + @@ -449,4 +467,4 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" - + \ No newline at end of file diff --git a/c/meterpreter/workspace/ext_server_winpmem/ext_server_winpmem.vcxproj b/c/meterpreter/workspace/ext_server_winpmem/ext_server_winpmem.vcxproj index 77709c765..03ac0a384 100644 --- a/c/meterpreter/workspace/ext_server_winpmem/ext_server_winpmem.vcxproj +++ b/c/meterpreter/workspace/ext_server_winpmem/ext_server_winpmem.vcxproj @@ -151,6 +151,7 @@ $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -205,6 +206,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -258,6 +260,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -312,6 +315,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -367,6 +371,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -421,6 +426,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\extension.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -446,8 +452,20 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" false + + + true + true + true + + + true + true + true + + - + \ No newline at end of file diff --git a/c/meterpreter/workspace/meterpreter.sln b/c/meterpreter/workspace/meterpreter.sln index 453025ea6..df9f541d6 100644 --- a/c/meterpreter/workspace/meterpreter.sln +++ b/c/meterpreter/workspace/meterpreter.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.32112.339 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33801.447 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ext_server_priv", "ext_server_priv\ext_server_priv.vcxproj", "{87C64204-C82F-415D-AF45-D0B33BDFE39A}" EndProject diff --git a/c/meterpreter/workspace/metsrv/metsrv.vcxproj b/c/meterpreter/workspace/metsrv/metsrv.vcxproj index e307b3993..f08b1b983 100644 --- a/c/meterpreter/workspace/metsrv/metsrv.vcxproj +++ b/c/meterpreter/workspace/metsrv/metsrv.vcxproj @@ -174,6 +174,7 @@ Windows /ignore:4070 %(AdditionalOptions) + No true @@ -246,6 +247,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No true @@ -316,6 +318,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) Windows /ignore:4070 %(AdditionalOptions) + No true @@ -338,7 +341,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" - MinSpace + Custom OnlyExplicitInline Size ..\..\source\ReflectiveDLLInjection\common;..\..\source\server;..\..\source\common;%(AdditionalIncludeDirectories) @@ -359,6 +362,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" true true true + true NDEBUG;%(PreprocessorDefinitions) @@ -384,6 +388,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" Windows /ignore:4070 %(AdditionalOptions) + No true @@ -453,6 +458,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No true @@ -521,6 +527,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) Windows /ignore:4070 %(AdditionalOptions) + No true @@ -590,6 +597,18 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + true + true + + + true + true + true + + diff --git a/c/meterpreter/workspace/metsrv/metsrv.vcxproj.filters b/c/meterpreter/workspace/metsrv/metsrv.vcxproj.filters index 5a497eff9..31fe6945c 100644 --- a/c/meterpreter/workspace/metsrv/metsrv.vcxproj.filters +++ b/c/meterpreter/workspace/metsrv/metsrv.vcxproj.filters @@ -55,4 +55,8 @@ + + + + \ No newline at end of file diff --git a/c/meterpreter/workspace/screenshot/screenshot.vcxproj b/c/meterpreter/workspace/screenshot/screenshot.vcxproj index b6f2b02e1..3186ca82a 100644 --- a/c/meterpreter/workspace/screenshot/screenshot.vcxproj +++ b/c/meterpreter/workspace/screenshot/screenshot.vcxproj @@ -149,6 +149,7 @@ $(ProjectDir)..\..\source\def\plugin.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -196,6 +197,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -242,6 +244,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\plugin.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,4.0 "$(TargetDir)$(TargetFileName)" > NUL @@ -290,6 +293,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" $(ProjectDir)..\..\source\def\plugin.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -340,6 +344,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -388,6 +393,7 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\$(TargetName) $(ProjectDir)..\..\source\def\plugin.def /ignore:4070 %(AdditionalOptions) + No editbin.exe /NOLOGO /OSVERSION:5.0 /SUBSYSTEM:WINDOWS,5.02 "$(TargetDir)$(TargetFileName)" > NUL @@ -403,6 +409,18 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" + + + true + true + true + + + true + true + true + + @@ -410,4 +428,4 @@ copy /y "$(TargetDir)$(TargetFileName)" "$(ProjectDir)..\..\output\" - + \ No newline at end of file From 30e9989afb86602bf3a2002467e01ca3c1d867a3 Mon Sep 17 00:00:00 2001 From: Christophe De La Fuente Date: Fri, 10 Nov 2023 23:25:09 +0100 Subject: [PATCH 4/6] Update cmake files for mingw --- c/meterpreter/workspace/CMakeLists.txt | 3 +++ .../ReflectiveDLLInjection/CMakeLists.txt | 19 +++++++++++++++++++ .../workspace/dump_sam/CMakeLists.txt | 2 +- .../workspace/elevator/CMakeLists.txt | 2 +- .../ext_server_bofloader/CMakeLists.txt | 2 +- .../workspace/ext_server_espia/CMakeLists.txt | 2 +- .../ext_server_extapi/CMakeLists.txt | 2 +- .../ext_server_incognito/CMakeLists.txt | 2 +- .../workspace/ext_server_kiwi/CMakeLists.txt | 2 +- .../ext_server_lanattacks/CMakeLists.txt | 2 +- .../ext_server_peinjector/CMakeLists.txt | 2 +- .../ext_server_powershell/CMakeLists.txt | 2 +- .../workspace/ext_server_priv/CMakeLists.txt | 2 +- .../ext_server_python/CMakeLists.txt | 2 +- .../ext_server_sniffer/CMakeLists.txt | 2 +- .../ext_server_stdapi/CMakeLists.txt | 2 +- .../ext_server_unhook/CMakeLists.txt | 2 +- .../ext_server_winpmem/CMakeLists.txt | 2 +- c/meterpreter/workspace/metsrv/CMakeLists.txt | 2 +- .../workspace/screenshot/CMakeLists.txt | 2 +- 20 files changed, 40 insertions(+), 18 deletions(-) create mode 100644 c/meterpreter/workspace/ReflectiveDLLInjection/CMakeLists.txt diff --git a/c/meterpreter/workspace/CMakeLists.txt b/c/meterpreter/workspace/CMakeLists.txt index cdf3207a6..21b9b1d16 100644 --- a/c/meterpreter/workspace/CMakeLists.txt +++ b/c/meterpreter/workspace/CMakeLists.txt @@ -225,6 +225,8 @@ if(BUILD_METSRV) set(MET_SERVERS metsrv) endif() +set(MET_RDI_ASM ReflectiveDLLInjection) + set( MET_DLLS ${MET_SERVERS} @@ -234,6 +236,7 @@ set( set( MET_PROJECTS + ${MET_RDI_ASM} ${MET_LIBS} ${MET_DLLS} ) diff --git a/c/meterpreter/workspace/ReflectiveDLLInjection/CMakeLists.txt b/c/meterpreter/workspace/ReflectiveDLLInjection/CMakeLists.txt new file mode 100644 index 000000000..f94f03797 --- /dev/null +++ b/c/meterpreter/workspace/ReflectiveDLLInjection/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.15.7 FATAL_ERROR) + +set(PROJECT_NAME ReflectiveDLLInjection) + +project(${PROJECT_NAME} ASM) + +set(SRC_DIR ../../source/ReflectiveDLLInjection/dll/src) +if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(x86_64|amd64)") + set(SRC_FILES ${SRC_DIR}/GateTrampoline64.s) +elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(i386|i686)") + set(SRC_FILES ${SRC_DIR}/GateTrampoline32.s) +endif() + +set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS) +set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES) +set(CMAKE_ASM_FLAGS_RELEASE_INIT "") +set(CMAKE_ASM_FLAGS_RELEASE "") + +add_library(${PROJECT_NAME} ${SRC_FILES}) diff --git a/c/meterpreter/workspace/dump_sam/CMakeLists.txt b/c/meterpreter/workspace/dump_sam/CMakeLists.txt index 06842a04a..d69b3ded8 100644 --- a/c/meterpreter/workspace/dump_sam/CMakeLists.txt +++ b/c/meterpreter/workspace/dump_sam/CMakeLists.txt @@ -25,7 +25,7 @@ if(MSVC) endif() set(LINK_LIBS psapi rpcrt4) -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/elevator/CMakeLists.txt b/c/meterpreter/workspace/elevator/CMakeLists.txt index b7a3afd73..e18964f3f 100644 --- a/c/meterpreter/workspace/elevator/CMakeLists.txt +++ b/c/meterpreter/workspace/elevator/CMakeLists.txt @@ -24,7 +24,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME}.${T set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/DEF:\"${MOD_DEF_DIR}/plugin.def\"") set_source_files_properties(${MOD_DEF_DIR}/plugin.def PROPERTIES HEADER_FILE_ONLY TRUE) -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/ext_server_bofloader/CMakeLists.txt b/c/meterpreter/workspace/ext_server_bofloader/CMakeLists.txt index 702c7f640..fbd48fd03 100644 --- a/c/meterpreter/workspace/ext_server_bofloader/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_bofloader/CMakeLists.txt @@ -39,7 +39,7 @@ if(MSVC) set_source_files_properties(${MOD_DEF_DIR}/extension.def PROPERTIES HEADER_FILE_ONLY TRUE) endif() -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/ext_server_espia/CMakeLists.txt b/c/meterpreter/workspace/ext_server_espia/CMakeLists.txt index 01de6126a..a89824aee 100644 --- a/c/meterpreter/workspace/ext_server_espia/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_espia/CMakeLists.txt @@ -29,7 +29,7 @@ if(MSVC) endif() set(LINK_LIBS jpeg) -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/ext_server_extapi/CMakeLists.txt b/c/meterpreter/workspace/ext_server_extapi/CMakeLists.txt index d1f4efd06..cd6b8f713 100644 --- a/c/meterpreter/workspace/ext_server_extapi/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_extapi/CMakeLists.txt @@ -43,7 +43,7 @@ if(MSVC) else() endif() -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/ext_server_incognito/CMakeLists.txt b/c/meterpreter/workspace/ext_server_incognito/CMakeLists.txt index 6ad783b10..450af691a 100644 --- a/c/meterpreter/workspace/ext_server_incognito/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_incognito/CMakeLists.txt @@ -30,7 +30,7 @@ if(MSVC) endif() set(LINK_LIBS netapi32 mpr) -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/ext_server_kiwi/CMakeLists.txt b/c/meterpreter/workspace/ext_server_kiwi/CMakeLists.txt index 972c18ba0..8e4929337 100644 --- a/c/meterpreter/workspace/ext_server_kiwi/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_kiwi/CMakeLists.txt @@ -136,7 +136,7 @@ set(LINK_LIBS ${KIWI_LIB_DIR}/bcrypt.lib ) -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/ext_server_lanattacks/CMakeLists.txt b/c/meterpreter/workspace/ext_server_lanattacks/CMakeLists.txt index b8ff489fa..8e79919c9 100644 --- a/c/meterpreter/workspace/ext_server_lanattacks/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_lanattacks/CMakeLists.txt @@ -37,7 +37,7 @@ set(LINK_LIBS ws2_32 ) -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") else() diff --git a/c/meterpreter/workspace/ext_server_peinjector/CMakeLists.txt b/c/meterpreter/workspace/ext_server_peinjector/CMakeLists.txt index aaa662ae0..69343e417 100644 --- a/c/meterpreter/workspace/ext_server_peinjector/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_peinjector/CMakeLists.txt @@ -29,7 +29,7 @@ if(MSVC) set_source_files_properties(${MOD_DEF_DIR}/extension.def PROPERTIES HEADER_FILE_ONLY TRUE) endif() -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/ext_server_powershell/CMakeLists.txt b/c/meterpreter/workspace/ext_server_powershell/CMakeLists.txt index 2112b8f0b..6753f1b78 100644 --- a/c/meterpreter/workspace/ext_server_powershell/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_powershell/CMakeLists.txt @@ -25,7 +25,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/DEF:\"${MOD_DEF_DI set_source_files_properties(${MOD_DEF_DIR}/extension.def PROPERTIES HEADER_FILE_ONLY TRUE) set(LINK_LIBS psapi ws2_32) -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/ext_server_priv/CMakeLists.txt b/c/meterpreter/workspace/ext_server_priv/CMakeLists.txt index ab27c4516..de3384c40 100644 --- a/c/meterpreter/workspace/ext_server_priv/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_priv/CMakeLists.txt @@ -68,7 +68,7 @@ if(MSVC) endif() set(LINK_LIBS psapi rpcrt4) -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/ext_server_python/CMakeLists.txt b/c/meterpreter/workspace/ext_server_python/CMakeLists.txt index ed6f16b36..8a6de2107 100644 --- a/c/meterpreter/workspace/ext_server_python/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_python/CMakeLists.txt @@ -55,7 +55,7 @@ set(LINK_LIBS ${LIBRESSL_LIB_DIR}/tls-20.lib ) -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/ext_server_sniffer/CMakeLists.txt b/c/meterpreter/workspace/ext_server_sniffer/CMakeLists.txt index 366cf1039..6f4408066 100644 --- a/c/meterpreter/workspace/ext_server_sniffer/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_sniffer/CMakeLists.txt @@ -38,7 +38,7 @@ if(IS_X64) endif() set(LINK_LIBS ${PSSDK_LIB_DIR}/pssdk_vc${PSSDK_VER}_mt.lib ws2_32) -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/ext_server_stdapi/CMakeLists.txt b/c/meterpreter/workspace/ext_server_stdapi/CMakeLists.txt index f783b441a..442ca7762 100644 --- a/c/meterpreter/workspace/ext_server_stdapi/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_stdapi/CMakeLists.txt @@ -56,7 +56,7 @@ if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) # Post processing (required for all Meterpreter DLLs) editbin(${PROJECT_NAME} ${BIN_SUBSYSTEM}) diff --git a/c/meterpreter/workspace/ext_server_unhook/CMakeLists.txt b/c/meterpreter/workspace/ext_server_unhook/CMakeLists.txt index 0f1b5e349..441903957 100644 --- a/c/meterpreter/workspace/ext_server_unhook/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_unhook/CMakeLists.txt @@ -27,7 +27,7 @@ if(MSVC) set_source_files_properties(${MOD_DEF_DIR}/extension.def PROPERTIES HEADER_FILE_ONLY TRUE) endif() -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/ext_server_winpmem/CMakeLists.txt b/c/meterpreter/workspace/ext_server_winpmem/CMakeLists.txt index 99c8eaa32..44401059a 100644 --- a/c/meterpreter/workspace/ext_server_winpmem/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_winpmem/CMakeLists.txt @@ -43,7 +43,7 @@ set(LINK_LIBS ws2_32 ) -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() diff --git a/c/meterpreter/workspace/metsrv/CMakeLists.txt b/c/meterpreter/workspace/metsrv/CMakeLists.txt index 0cf47cde8..c75dc8b11 100644 --- a/c/meterpreter/workspace/metsrv/CMakeLists.txt +++ b/c/meterpreter/workspace/metsrv/CMakeLists.txt @@ -38,7 +38,7 @@ else() set(LINK_LIBS ${LINK_LIBS} ws2_32) endif() -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) # Post processing (required for all Meterpreter DLLs) editbin(${PROJECT_NAME} ${BIN_SUBSYSTEM}) diff --git a/c/meterpreter/workspace/screenshot/CMakeLists.txt b/c/meterpreter/workspace/screenshot/CMakeLists.txt index fbecb862f..da3ffcc44 100644 --- a/c/meterpreter/workspace/screenshot/CMakeLists.txt +++ b/c/meterpreter/workspace/screenshot/CMakeLists.txt @@ -25,7 +25,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/DEF:\"${MOD_DEF_DI set_source_files_properties(${MOD_DEF_DIR}/plugin.def PROPERTIES HEADER_FILE_ONLY TRUE) set(LINK_LIBS jpeg) -target_link_libraries(${PROJECT_NAME} ${LINK_LIBS}) +target_link_libraries(${PROJECT_NAME} ${LINK_LIBS} ${MET_RDI_ASM}) if(MSVC) target_link_options(${PROJECT_NAME} PUBLIC "/ignore:4070") endif() From 7e14de9df65db655429b1fedc3c97ec96ec3dad3 Mon Sep 17 00:00:00 2001 From: Christophe De La Fuente Date: Mon, 4 Dec 2023 16:45:14 +0100 Subject: [PATCH 5/6] Fix cmake files for kiwi builds --- c/meterpreter/workspace/ext_server_kiwi/CMakeLists.txt | 4 ++++ c/meterpreter/workspace/ext_server_priv/CMakeLists.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/c/meterpreter/workspace/ext_server_kiwi/CMakeLists.txt b/c/meterpreter/workspace/ext_server_kiwi/CMakeLists.txt index 8e4929337..89d17f39f 100644 --- a/c/meterpreter/workspace/ext_server_kiwi/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_kiwi/CMakeLists.txt @@ -46,6 +46,10 @@ else() '-D__success=DISCARD' '-D__FUNCTION__=""' '-D__struct_bcount=DISCARD' + '-D__nullterminated=SAL__nullterminated' + '-D__in_range=__RPC__in_range' + '-D__callback=SAL__callback' + '-D__deref_in_bcount_opt=SAL__deref_in_bcount_opt' ) endif() diff --git a/c/meterpreter/workspace/ext_server_priv/CMakeLists.txt b/c/meterpreter/workspace/ext_server_priv/CMakeLists.txt index de3384c40..da2fa9266 100644 --- a/c/meterpreter/workspace/ext_server_priv/CMakeLists.txt +++ b/c/meterpreter/workspace/ext_server_priv/CMakeLists.txt @@ -42,6 +42,10 @@ else() '-D__success=DISCARD' '-D__FUNCTION__=""' '-D__struct_bcount=DISCARD' + '-D__nullterminated=SAL__nullterminated' + '-D__in_range=__RPC__in_range' + '-D__callback=SAL__callback' + '-D__deref_in_bcount_opt=SAL__deref_in_bcount_opt' ) endif() From 65bd36bdd139ae64770461eb816e97b7976c628a Mon Sep 17 00:00:00 2001 From: Christophe De La Fuente Date: Tue, 5 Dec 2023 11:49:49 +0100 Subject: [PATCH 6/6] Update ReflectiveDLLInjection module to verify if CI passes --- .gitmodules | 3 ++- c/meterpreter/source/ReflectiveDLLInjection | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 68c4a63e0..f750f265f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,7 @@ [submodule "source/ReflectiveDLLInjection"] path = c/meterpreter/source/ReflectiveDLLInjection - url = https://github.com/rapid7/ReflectiveDLLInjection.git + url = https://github.com/cdelafuente-r7/ReflectiveDLLInjection.git + branch = direct_syscalls [submodule "deps"] path = c/meterpreter/deps url = https://github.com/rapid7/meterpreter-deps diff --git a/c/meterpreter/source/ReflectiveDLLInjection b/c/meterpreter/source/ReflectiveDLLInjection index fac3adab1..b916bd385 160000 --- a/c/meterpreter/source/ReflectiveDLLInjection +++ b/c/meterpreter/source/ReflectiveDLLInjection @@ -1 +1 @@ -Subproject commit fac3adab1187deade60eef27be8423ee117c1e1f +Subproject commit b916bd38572d1fb48b6c68d092d06000323562fe