diff --git a/sdk/bin/hyperdbg-cli.exe b/sdk/bin/hyperdbg-cli.exe index 9e3d55205..4c9d2e675 100644 Binary files a/sdk/bin/hyperdbg-cli.exe and b/sdk/bin/hyperdbg-cli.exe differ diff --git a/sdk/bin/hyperhv.dll b/sdk/bin/hyperhv.dll index 5fb32ba9e..5eee8f79f 100644 Binary files a/sdk/bin/hyperhv.dll and b/sdk/bin/hyperhv.dll differ diff --git a/sdk/bin/hyperkd.sys b/sdk/bin/hyperkd.sys index 219cdd0aa..70845ac8a 100644 Binary files a/sdk/bin/hyperkd.sys and b/sdk/bin/hyperkd.sys differ diff --git a/sdk/bin/hyperlog.dll b/sdk/bin/hyperlog.dll index 4a9b08bd1..660cbde0c 100644 Binary files a/sdk/bin/hyperlog.dll and b/sdk/bin/hyperlog.dll differ diff --git a/sdk/bin/kdserial.dll b/sdk/bin/kdserial.dll index 9e2bf4e3b..a73d80cc3 100644 Binary files a/sdk/bin/kdserial.dll and b/sdk/bin/kdserial.dll differ diff --git a/sdk/bin/libhyperdbg.dll b/sdk/bin/libhyperdbg.dll index f5fd748c7..720a3e3b0 100644 Binary files a/sdk/bin/libhyperdbg.dll and b/sdk/bin/libhyperdbg.dll differ diff --git a/sdk/bin/pdbex.dll b/sdk/bin/pdbex.dll index 74bc99c90..569186311 100644 Binary files a/sdk/bin/pdbex.dll and b/sdk/bin/pdbex.dll differ diff --git a/sdk/bin/script-engine.dll b/sdk/bin/script-engine.dll index 234f94932..578328dc2 100644 Binary files a/sdk/bin/script-engine.dll and b/sdk/bin/script-engine.dll differ diff --git a/sdk/bin/symbol-parser.dll b/sdk/bin/symbol-parser.dll index e3c67b218..e42db2fe7 100644 Binary files a/sdk/bin/symbol-parser.dll and b/sdk/bin/symbol-parser.dll differ diff --git a/sdk/bindgen/SDK/Examples/kernel/README.md b/sdk/bindgen/SDK/Examples/kernel/README.md new file mode 100644 index 000000000..e509023bb --- /dev/null +++ b/sdk/bindgen/SDK/Examples/kernel/README.md @@ -0,0 +1,3 @@ +NOTE +============ +Build it directly from the main HyperDbg solution file. Do not build it independently, as it requires dependency files from the main HyperDbg libraries to be built first. \ No newline at end of file diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_driver/CMakeLists.txt b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/CMakeLists.txt similarity index 82% rename from sdk/bindgen/SDK/Examples/hyperdbg_driver/CMakeLists.txt rename to sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/CMakeLists.txt index cf2066db9..86579c6f1 100644 --- a/sdk/bindgen/SDK/Examples/hyperdbg_driver/CMakeLists.txt +++ b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/CMakeLists.txt @@ -9,6 +9,10 @@ set(SourceFiles "code/driver/Ioctl.c" "code/driver/Loader.c" ) +include_directories( + "../../../HyperDbg/include" + "header" +) wdk_add_driver(hyperdbg_driver KMDF 1.15 ${SourceFiles} diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_driver/code/core/Core.c b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/code/core/Core.c similarity index 100% rename from sdk/bindgen/SDK/Examples/hyperdbg_driver/code/core/Core.c rename to sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/code/core/Core.c diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_driver/code/driver/Driver.c b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/code/driver/Driver.c similarity index 100% rename from sdk/bindgen/SDK/Examples/hyperdbg_driver/code/driver/Driver.c rename to sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/code/driver/Driver.c diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_driver/code/driver/Ioctl.c b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/code/driver/Ioctl.c similarity index 98% rename from sdk/bindgen/SDK/Examples/hyperdbg_driver/code/driver/Ioctl.c rename to sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/code/driver/Ioctl.c index 5bf529ced..7d771f8d3 100644 --- a/sdk/bindgen/SDK/Examples/hyperdbg_driver/code/driver/Ioctl.c +++ b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/code/driver/Ioctl.c @@ -26,6 +26,8 @@ DrvDispatchIoControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) PREGISTER_NOTIFY_BUFFER RegisterEventRequest; NTSTATUS Status; + UNREFERENCED_PARAMETER(DeviceObject); + // // Here's the best place to see if there is any allocation pending // to be allcated as we're in PASSIVE_LEVEL diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_driver/code/driver/Loader.c b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/code/driver/Loader.c similarity index 100% rename from sdk/bindgen/SDK/Examples/hyperdbg_driver/code/driver/Loader.c rename to sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/code/driver/Loader.c diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_driver/header/core/Core.h b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/header/core/Core.h similarity index 100% rename from sdk/bindgen/SDK/Examples/hyperdbg_driver/header/core/Core.h rename to sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/header/core/Core.h diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_driver/header/driver/Driver.h b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/header/driver/Driver.h similarity index 100% rename from sdk/bindgen/SDK/Examples/hyperdbg_driver/header/driver/Driver.h rename to sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/header/driver/Driver.h diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_driver/header/driver/Loader.h b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/header/driver/Loader.h similarity index 100% rename from sdk/bindgen/SDK/Examples/hyperdbg_driver/header/driver/Loader.h rename to sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/header/driver/Loader.h diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_driver/header/misc/Global.h b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/header/misc/Global.h similarity index 100% rename from sdk/bindgen/SDK/Examples/hyperdbg_driver/header/misc/Global.h rename to sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/header/misc/Global.h diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_driver/header/pch.h b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/header/pch.h similarity index 72% rename from sdk/bindgen/SDK/Examples/hyperdbg_driver/header/pch.h rename to sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/header/pch.h index e375741ab..b185300ae 100644 --- a/sdk/bindgen/SDK/Examples/hyperdbg_driver/header/pch.h +++ b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/header/pch.h @@ -16,20 +16,11 @@ #define HYPERDBG_KERNEL_MODE #define HYPERDBG_RM -// -// Environment headers -// -#include "platform/kernel/header/Environment.h" - -#ifdef ENV_WINDOWS - // // General WDK headers // -# include -# include - -#endif // ENV_WINDOWS +#include +#include // // Definition of Intel primitives (External header) @@ -54,15 +45,15 @@ // // Import HyperLog Module // -#include "SDK/Modules/HyperLog.h" -#include "SDK/Imports/HyperDbgHyperLogImports.h" -#include "SDK/Imports/HyperDbgHyperLogIntrinsics.h" +#include "SDK/modules/HyperLog.h" +#include "SDK/imports/kernel/HyperDbgHyperLogImports.h" +#include "SDK/imports/kernel/HyperDbgHyperLogIntrinsics.h" // // Import VMM Module // -#include "SDK/Modules/VMM.h" -#include "SDK/Imports/HyperDbgVmmImports.h" +#include "SDK/modules/VMM.h" +#include "SDK/imports/kernel/HyperDbgVmmImports.h" // // Local Driver headers diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_driver/hyperdbg_driver.vcxproj b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/hyperdbg_driver.vcxproj similarity index 68% rename from sdk/bindgen/SDK/Examples/hyperdbg_driver/hyperdbg_driver.vcxproj rename to sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/hyperdbg_driver.vcxproj index a6cb27891..09691cc3f 100644 --- a/sdk/bindgen/SDK/Examples/hyperdbg_driver/hyperdbg_driver.vcxproj +++ b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/hyperdbg_driver.vcxproj @@ -9,14 +9,6 @@ release x64 - - debug - ARM64 - - - release - ARM64 - {79AB8BD3-03A4-4B65-ABF6-313C10A00CC5} @@ -47,22 +39,6 @@ Universal false - - Windows10 - true - WindowsKernelModeDriver10.0 - Driver - KMDF - Universal - - - Windows10 - false - WindowsKernelModeDriver10.0 - Driver - KMDF - Universal - @@ -81,18 +57,12 @@ $(SolutionDir)build\bin\$(Configuration)\ $(SolutionDir)build\obj\$(ProjectName)\$(Platform)\$(Configuration)\ - - DbgengKernelDebugger - - - DbgengKernelDebugger - sha256 - $(SolutionDir)\include;$(ProjectDir)header;%(AdditionalIncludeDirectories) + $(SolutionDir)include;$(ProjectDir)header;%(AdditionalIncludeDirectories) true @@ -101,7 +71,7 @@ true - $(SolutionDir)build\bin\$(Configuration)\hyperlog.lib;$(SolutionDir)build\bin\$(Configuration)\hprdbghv.lib;%(AdditionalDependencies) + $(SolutionDir)build\bin\$(Configuration)\hyperlog.lib;$(SolutionDir)build\bin\$(Configuration)\hyperhv.lib;%(AdditionalDependencies) DriverEntry @@ -110,7 +80,7 @@ sha256 - $(SolutionDir)\include;$(ProjectDir)header;%(AdditionalIncludeDirectories) + $(SolutionDir)include;$(ProjectDir)header;%(AdditionalIncludeDirectories) true @@ -119,20 +89,10 @@ true - $(SolutionDir)build\bin\$(Configuration)\hyperlog.lib;$(SolutionDir)build\bin\$(Configuration)\hprdbghv.lib;%(AdditionalDependencies) + $(SolutionDir)build\bin\$(Configuration)\hyperlog.lib;$(SolutionDir)build\bin\$(Configuration)\hyperhv.lib;%(AdditionalDependencies) DriverEntry - - - sha256 - - - - - sha256 - - diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_driver/hyperdbg_driver.vcxproj.filters b/sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/hyperdbg_driver.vcxproj.filters similarity index 100% rename from sdk/bindgen/SDK/Examples/hyperdbg_driver/hyperdbg_driver.vcxproj.filters rename to sdk/bindgen/SDK/Examples/kernel/hyperdbg_driver/hyperdbg_driver.vcxproj.filters diff --git a/sdk/bindgen/SDK/Examples/user/README.md b/sdk/bindgen/SDK/Examples/user/README.md new file mode 100644 index 000000000..e509023bb --- /dev/null +++ b/sdk/bindgen/SDK/Examples/user/README.md @@ -0,0 +1,3 @@ +NOTE +============ +Build it directly from the main HyperDbg solution file. Do not build it independently, as it requires dependency files from the main HyperDbg libraries to be built first. \ No newline at end of file diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_app/CMakeLists.txt b/sdk/bindgen/SDK/Examples/user/hyperdbg_app/CMakeLists.txt similarity index 66% rename from sdk/bindgen/SDK/Examples/hyperdbg_app/CMakeLists.txt rename to sdk/bindgen/SDK/Examples/user/hyperdbg_app/CMakeLists.txt index 37a04ae5d..f3ba82015 100644 --- a/sdk/bindgen/SDK/Examples/hyperdbg_app/CMakeLists.txt +++ b/sdk/bindgen/SDK/Examples/user/hyperdbg_app/CMakeLists.txt @@ -4,7 +4,7 @@ set(SourceFiles "code/hyperdbg-app.cpp" ) include_directories( - "../../.." + "../../../HyperDbg/include" "header" ) -add_executable(hyperrev ${SourceFiles}) +add_executable(hyperdbg_app ${SourceFiles}) diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_app/code/hyperdbg-app.cpp b/sdk/bindgen/SDK/Examples/user/hyperdbg_app/code/hyperdbg-app.cpp similarity index 100% rename from sdk/bindgen/SDK/Examples/hyperdbg_app/code/hyperdbg-app.cpp rename to sdk/bindgen/SDK/Examples/user/hyperdbg_app/code/hyperdbg-app.cpp diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_app/header/pch.h b/sdk/bindgen/SDK/Examples/user/hyperdbg_app/header/pch.h similarity index 81% rename from sdk/bindgen/SDK/Examples/hyperdbg_app/header/pch.h rename to sdk/bindgen/SDK/Examples/user/hyperdbg_app/header/pch.h index 99b2b79ad..523436ea6 100644 --- a/sdk/bindgen/SDK/Examples/hyperdbg_app/header/pch.h +++ b/sdk/bindgen/SDK/Examples/user/hyperdbg_app/header/pch.h @@ -12,11 +12,6 @@ */ #pragma once -// -// Environment headers -// -#include "platform/user/header/Environment.h" - // // Windows SDK headers // @@ -37,4 +32,4 @@ // HyperDbg SDK headers // #include "SDK/HyperDbgSdk.h" -#include "SDK/Imports/User/HyperDbgLibImports.h" +#include "SDK/imports/user/HyperDbgLibImports.h" diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_app/hyperrev.vcxproj b/sdk/bindgen/SDK/Examples/user/hyperdbg_app/hyperdbg_app.vcxproj similarity index 60% rename from sdk/bindgen/SDK/Examples/hyperdbg_app/hyperrev.vcxproj rename to sdk/bindgen/SDK/Examples/user/hyperdbg_app/hyperdbg_app.vcxproj index b7915f0b2..c5e4e9130 100644 --- a/sdk/bindgen/SDK/Examples/hyperdbg_app/hyperrev.vcxproj +++ b/sdk/bindgen/SDK/Examples/user/hyperdbg_app/hyperdbg_app.vcxproj @@ -1,14 +1,6 @@ - - debug - Win32 - - - release - Win32 - debug x64 @@ -34,19 +26,6 @@ hyperdbg_app - - Application - true - v143 - Unicode - - - Application - false - v143 - true - Unicode - Application true @@ -65,12 +44,6 @@ - - - - - - @@ -86,36 +59,6 @@ $(SolutionDir)build\bin\$(Configuration)\ $(SolutionDir)build\obj\$(ProjectName)\$(Platform)\$(Configuration)\ - - - Level3 - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDebug - - - Console - true - - - - - Level3 - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreaded - - - Console - true - true - true - - Level3 @@ -125,13 +68,13 @@ MultiThreadedDebug Create pch.h - $(SolutionDir)\include;$(ProjectDir)\header;%(AdditionalIncludeDirectories) + $(SolutionDir)include;$(ProjectDir)header;%(AdditionalIncludeDirectories) true Console true - $(SolutionDir)build\bin\$(Configuration)\libhyperdbg.lib;%(AdditionalDependencies) + $(SolutionDir)build\bin\$(Configuration)\libhyperdbg.lib true @@ -146,7 +89,7 @@ MultiThreaded Create pch.h - $(SolutionDir)\include;$(ProjectDir)\header;%(AdditionalIncludeDirectories) + $(SolutionDir)include;$(ProjectDir)header;%(AdditionalIncludeDirectories) true @@ -154,7 +97,7 @@ true true true - $(SolutionDir)build\bin\$(Configuration)\libhyperdbg.lib;%(AdditionalDependencies) + $(SolutionDir)build\bin\$(Configuration)\libhyperdbg.lib true diff --git a/sdk/bindgen/SDK/Examples/hyperdbg_app/hyperrev.vcxproj.filters b/sdk/bindgen/SDK/Examples/user/hyperdbg_app/hyperdbg_app.vcxproj.filters similarity index 100% rename from sdk/bindgen/SDK/Examples/hyperdbg_app/hyperrev.vcxproj.filters rename to sdk/bindgen/SDK/Examples/user/hyperdbg_app/hyperdbg_app.vcxproj.filters diff --git a/sdk/bindgen/SDK/HyperDbgSdk.h b/sdk/bindgen/SDK/HyperDbgSdk.h index 9b2d9b143..2149c65f6 100644 --- a/sdk/bindgen/SDK/HyperDbgSdk.h +++ b/sdk/bindgen/SDK/HyperDbgSdk.h @@ -1,22 +1,22 @@ #pragma once -#include "SDK/Headers/Constants.h" -#include "SDK/Headers/BasicTypes.h" -#include "SDK/Headers/ErrorCodes.h" -#include "SDK/Headers/Connection.h" -#include "SDK/Headers/DataTypes.h" -#include "SDK/Headers/Ioctls.h" -#include "SDK/Headers/Events.h" -#include "SDK/Headers/RequestStructures.h" -#include "SDK/Headers/Symbols.h" -#include "SDK/Headers/HardwareDebugger.h" +#include "SDK/headers/Constants.h" +#include "SDK/headers/BasicTypes.h" +#include "SDK/headers/ErrorCodes.h" +#include "SDK/headers/Connection.h" +#include "SDK/headers/DataTypes.h" +#include "SDK/headers/Ioctls.h" +#include "SDK/headers/Events.h" +#include "SDK/headers/RequestStructures.h" +#include "SDK/headers/Symbols.h" +#include "SDK/headers/HardwareDebugger.h" // // Asserts // -#include "SDK/Headers/Assertions.h" +#include "SDK/headers/Assertions.h" // // Script Engine // -#include "SDK/Headers/ScriptEngineCommonDefinitions.h" +#include "SDK/headers/ScriptEngineCommonDefinitions.h" diff --git a/sdk/bindgen/SDK/Imports/Kernel/HyperDbgHyperLogIntrinsics.h b/sdk/bindgen/SDK/Imports/Kernel/HyperDbgHyperLogIntrinsics.h index 0605fefce..6819bc26f 100644 --- a/sdk/bindgen/SDK/Imports/Kernel/HyperDbgHyperLogIntrinsics.h +++ b/sdk/bindgen/SDK/Imports/Kernel/HyperDbgHyperLogIntrinsics.h @@ -40,19 +40,19 @@ typedef enum _LOG_TYPE DbgPrint("[+] Information (%s:%d) | " format "\n", \ __func__, \ __LINE__, \ - __VA_ARGS__) + ##__VA_ARGS__) # define LogWarning(format, ...) \ DbgPrint("[-] Warning (%s:%d) | " format "\n", \ __func__, \ __LINE__, \ - __VA_ARGS__) + ##__VA_ARGS__) # define LogError(format, ...) \ DbgPrint("[!] Error (%s:%d) | " format "\n", \ __func__, \ __LINE__, \ - __VA_ARGS__); \ + ##__VA_ARGS__); \ DbgBreakPoint() /** @@ -60,7 +60,7 @@ typedef enum _LOG_TYPE * */ # define Log(format, ...) \ - DbgPrint(format, __VA_ARGS__) + DbgPrint(format, ##__VA_ARGS__) #else @@ -76,7 +76,7 @@ typedef enum _LOG_TYPE "[+] Information (%s:%d) | " format "\n", \ __func__, \ __LINE__, \ - __VA_ARGS__) + ##__VA_ARGS__) /** * @brief Log in the case of priority message @@ -90,7 +90,7 @@ typedef enum _LOG_TYPE "[+] Information (%s:%d) | " format "\n", \ __func__, \ __LINE__, \ - __VA_ARGS__) + ##__VA_ARGS__) /** * @brief Log in the case of warning @@ -104,7 +104,7 @@ typedef enum _LOG_TYPE "[-] Warning (%s:%d) | " format "\n", \ __func__, \ __LINE__, \ - __VA_ARGS__) + ##__VA_ARGS__) /** * @brief Log in the case of error @@ -118,7 +118,7 @@ typedef enum _LOG_TYPE "[!] Error (%s:%d) | " format "\n", \ __func__, \ __LINE__, \ - __VA_ARGS__); \ + ##__VA_ARGS__); \ if (DebugMode) \ DbgBreakPoint() @@ -132,7 +132,7 @@ typedef enum _LOG_TYPE FALSE, \ FALSE, \ format, \ - __VA_ARGS__) + ##__VA_ARGS__) /** * @brief Log without any prefix and bypass the stack @@ -161,4 +161,4 @@ typedef enum _LOG_TYPE "[+] Information (%s:%d) | " format "\n", \ __func__, \ __LINE__, \ - __VA_ARGS__) + ##__VA_ARGS__)