From aa18675760512fb0c4716317e8535483a54e3402 Mon Sep 17 00:00:00 2001 From: sina Date: Sun, 21 Jun 2026 14:22:33 +0200 Subject: [PATCH] update changelog and fix minor issues --- .github/git/git-help.md | 19 ++++++ .github/workflows/vs2026.yml | 3 +- CHANGELOG.md | 6 +- hyperdbg/include/SDK/headers/Constants.h | 4 +- .../include/platform/general/header/nt-list.h | 10 +-- .../platform/user/code/platform-ioctl.c | 2 +- .../platform/user/code/platform-lib-calls.c | 2 +- .../platform/user/code/platform-serial.c | 8 +-- .../platform/user/code/platform-signal.c | 2 +- .../platform/user/header/platform-ioctl.h | 2 +- .../platform/user/header/platform-lib-calls.h | 2 +- .../platform/user/header/platform-serial.h | 2 +- .../platform/user/header/platform-signal.h | 2 +- hyperdbg/libhyperdbg/code/common/list.cpp | 68 ------------------- hyperdbg/libhyperdbg/libhyperdbg.vcxproj | 1 - .../libhyperdbg/libhyperdbg.vcxproj.filters | 3 - hyperdbg/linux/Contribute.md | 41 ----------- hyperdbg/linux/README.md | 44 +++++++++++- 18 files changed, 86 insertions(+), 135 deletions(-) delete mode 100644 hyperdbg/libhyperdbg/code/common/list.cpp delete mode 100644 hyperdbg/linux/Contribute.md diff --git a/.github/git/git-help.md b/.github/git/git-help.md index 4a418ae9..61ad99df 100644 --- a/.github/git/git-help.md +++ b/.github/git/git-help.md @@ -51,6 +51,25 @@ git reset --hard git clean -fd ``` +To modify the last pushed commit: + +```bash +# Undo the last commit but keep the changes in your working tree +git reset --soft HEAD~1 + +# Make your additional modifications +# edit files... + +# Stage everything +git add . + +# Create a new commit +git commit -m "Updated commit message" + +# Force-push to replace the remote commit +git push --force-with-lease +``` + --------------- ## Releasing instructions diff --git a/.github/workflows/vs2026.yml b/.github/workflows/vs2026.yml index 1cf0b89f..0e587b16 100644 --- a/.github/workflows/vs2026.yml +++ b/.github/workflows/vs2026.yml @@ -3,8 +3,7 @@ name: vs2026-ci on: push: branches: - - master - - dev + - '**' # matches all branch names, including ones with slashes tags: - 'v*' paths-ignore: diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ec2bdb8..d9a3959c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.20.0.0] - 2026-XX-XX +## [0.20.0.0-beta] - 2026-06-21 New release of the HyperDbg Debugger. ### Added @@ -15,6 +15,9 @@ New release of the HyperDbg Debugger. - Added platform IOCTL interface ([link](https://github.com/HyperDbg/HyperDbg/pull/619)) - Added typecast for wchar, mismatch on Linux and Windows ([link](https://github.com/HyperDbg/HyperDbg/commit/10576b064a9824ab655e7bea0e35e9556ee68ca4)) - Added missing IOCTLs for Intel PT ([link](https://github.com/HyperDbg/HyperDbg/commit/df12e9fd79851c8f378ec82a45066da510da507a)) +- Added NuGet packages for Windows SDK and WDK +- Added Signal handler platform API for Linux ([link](https://github.com/HyperDbg/HyperDbg/pull/627)) +- Added contribution guidelines for Linux ([link](https://github.com/HyperDbg/HyperDbg/tree/master/hyperdbg/linux#readme)) ### Changed - Moved to Visual Studio 2026 ([link](https://github.com/HyperDbg/HyperDbg/pull/626)) @@ -22,6 +25,7 @@ New release of the HyperDbg Debugger. - Fix the new form of loading and unloading in the example app and PT app ([link](https://github.com/HyperDbg/HyperDbg/commit/9ad48d30dcf6b409ae86b2d08262584cd06f606e)) - Check whether the top-level hypervisor is Hyper-V and disable/enable VPIDs based on that, thanks to [@Idov31](https://github.com/Idov31) ([link](https://github.com/HyperDbg/HyperDbg/pull/625)) - Fix PT operation IOCTL buffer size ([link](https://github.com/HyperDbg/HyperDbg/commit/dabf132d31503843f90949f35f8dce4601d43126)) +- CI/CD updated with NuGet packages for Visual Studio 2026 ([link](https://github.com/HyperDbg/HyperDbg/commit/5a0fad490124268550f955f594d1211d5c74f03d)) ## [0.19.0.0-beta] - 2026-06-10 New release of the HyperDbg Debugger. diff --git a/hyperdbg/include/SDK/headers/Constants.h b/hyperdbg/include/SDK/headers/Constants.h index 2f3c508d..4157305e 100644 --- a/hyperdbg/include/SDK/headers/Constants.h +++ b/hyperdbg/include/SDK/headers/Constants.h @@ -21,7 +21,7 @@ #define VERSION_MINOR 20 #define VERSION_PATCH 0 -#define BETA_VERSION 0 +#define BETA_VERSION TRUE // // Example of __DATE__ string: "Jul 27 2012" @@ -110,7 +110,7 @@ const UCHAR BuildDateTime[] = { // Complete version as a string -# if BETA_VERSION == 0 +# if BETA_VERSION == FALSE # define HYPERDBG_COMPLETE_VERSION "v" TOSTRING(VERSION_MAJOR) "." TOSTRING(VERSION_MINOR) "." TOSTRING(VERSION_PATCH) "\0" # else # define HYPERDBG_COMPLETE_VERSION "v" TOSTRING(VERSION_MAJOR) "." TOSTRING(VERSION_MINOR) "." TOSTRING(VERSION_PATCH) "-beta\0" diff --git a/hyperdbg/include/platform/general/header/nt-list.h b/hyperdbg/include/platform/general/header/nt-list.h index f53f174f..0dc4dd2b 100644 --- a/hyperdbg/include/platform/general/header/nt-list.h +++ b/hyperdbg/include/platform/general/header/nt-list.h @@ -16,7 +16,7 @@ * The body is compiled only where the OS headers don't already provide these * (i.e. not on Windows), so including this unconditionally is safe. * - * @version 0.1 + * @version 0.20 * @date 2026-06-16 * * @copyright This project is released under the GNU Public License v3. @@ -40,7 +40,7 @@ // // Initialize a list head to the empty (points-to-self) state. // -static inline void +static inline VOID InitializeListHead(PLIST_ENTRY ListHead) { ListHead->Flink = ListHead->Blink = ListHead; @@ -103,7 +103,7 @@ RemoveTailList(PLIST_ENTRY ListHead) // // Insert an entry at the tail of the list. // -static inline void +static inline VOID InsertTailList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry) { PLIST_ENTRY Blink = ListHead->Blink; @@ -117,7 +117,7 @@ InsertTailList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry) // // Insert an entry at the head of the list. // -static inline void +static inline VOID InsertHeadList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry) { PLIST_ENTRY Flink = ListHead->Flink; @@ -131,7 +131,7 @@ InsertHeadList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry) // // Splice the entries of ListToAppend onto the tail of ListHead. // -static inline void +static inline VOID AppendTailList(PLIST_ENTRY ListHead, PLIST_ENTRY ListToAppend) { PLIST_ENTRY ListEnd = ListHead->Blink; diff --git a/hyperdbg/include/platform/user/code/platform-ioctl.c b/hyperdbg/include/platform/user/code/platform-ioctl.c index 0c78ef42..edfc699d 100644 --- a/hyperdbg/include/platform/user/code/platform-ioctl.c +++ b/hyperdbg/include/platform/user/code/platform-ioctl.c @@ -7,7 +7,7 @@ * the home where the ioctl()-based implementation against the /dev/HyperDbg * character device will live once the kernel module exists. * - * @version 0.1 + * @version 0.20 * @date 2026-06-09 * * @copyright This project is released under the GNU Public License v3. diff --git a/hyperdbg/include/platform/user/code/platform-lib-calls.c b/hyperdbg/include/platform/user/code/platform-lib-calls.c index 659ecbc6..19768c55 100644 --- a/hyperdbg/include/platform/user/code/platform-lib-calls.c +++ b/hyperdbg/include/platform/user/code/platform-lib-calls.c @@ -1,6 +1,6 @@ /** * @file platform-lib-calls.c - * @author Max Raulea (max.raulea@gmail.com) + * @author Max Raulea (max.raulea@gmail.com) * @brief User mode Cross platform APIs for platofrm dependend library calls * @details * @version 0.19 diff --git a/hyperdbg/include/platform/user/code/platform-serial.c b/hyperdbg/include/platform/user/code/platform-serial.c index 29224214..6266c0a8 100644 --- a/hyperdbg/include/platform/user/code/platform-serial.c +++ b/hyperdbg/include/platform/user/code/platform-serial.c @@ -8,7 +8,7 @@ * branch is currently stubbed (returns FALSE/NULL) and is the home where the * termios-based implementation over /dev/tty* will live. * - * @version 0.1 + * @version 0.20 * @date 2026-06-08 * * @copyright This project is released under the GNU Public License v3. @@ -26,8 +26,8 @@ // Per-direction overlapped I/O state, owned by the transport layer. // static OVERLAPPED g_PlatformOverlappedReadDebugger = {0}; -static OVERLAPPED g_PlatformOverlappedReadDebuggee = {0}; -static OVERLAPPED g_PlatformOverlappedWriteDebugger = {0}; +static OVERLAPPED g_PlatformOverlappedReadDebuggee = {0}; +static OVERLAPPED g_PlatformOverlappedWriteDebugger = {0}; HANDLE PlatformSerialOpen(const char * PortName, PLATFORM_SERIAL_IO_ROLE Role) @@ -88,7 +88,7 @@ PlatformSerialOpen(const char * PortName, PLATFORM_SERIAL_IO_ROLE Role) BOOLEAN PlatformSerialConfigure(HANDLE Handle, DWORD BaudRate) { - DCB SerialParams = {0}; + DCB SerialParams = {0}; SerialParams.DCBlength = sizeof(SerialParams); if (GetCommState(Handle, &SerialParams) == FALSE) diff --git a/hyperdbg/include/platform/user/code/platform-signal.c b/hyperdbg/include/platform/user/code/platform-signal.c index 4125f38f..b0f83071 100644 --- a/hyperdbg/include/platform/user/code/platform-signal.c +++ b/hyperdbg/include/platform/user/code/platform-signal.c @@ -10,7 +10,7 @@ * a normal thread woken by sigwait() sidesteps that entirely and mirrors the * Windows model where the console-control handler also runs on its own thread. * - * @version 0.1 + * @version 0.20 * @date 2026-06-16 * * @copyright This project is released under the GNU Public License v3. diff --git a/hyperdbg/include/platform/user/header/platform-ioctl.h b/hyperdbg/include/platform/user/header/platform-ioctl.h index e300342a..c2c7ce14 100644 --- a/hyperdbg/include/platform/user/header/platform-ioctl.h +++ b/hyperdbg/include/platform/user/header/platform-ioctl.h @@ -10,7 +10,7 @@ * \\.\HyperDbgDebuggerDevice handle; Linux will map onto ioctl() against a * /dev/HyperDbg character device exposed by the (future) kernel module (TODO). * - * @version 0.1 + * @version 0.20 * @date 2026-06-09 * * @copyright This project is released under the GNU Public License v3. diff --git a/hyperdbg/include/platform/user/header/platform-lib-calls.h b/hyperdbg/include/platform/user/header/platform-lib-calls.h index 89835a72..021d4a5b 100644 --- a/hyperdbg/include/platform/user/header/platform-lib-calls.h +++ b/hyperdbg/include/platform/user/header/platform-lib-calls.h @@ -134,4 +134,4 @@ UINT32 PlatformGetCurrentProcessId(VOID); CHAR * -PlatformGetCurrentProcessName(VOID); + PlatformGetCurrentProcessName(VOID); diff --git a/hyperdbg/include/platform/user/header/platform-serial.h b/hyperdbg/include/platform/user/header/platform-serial.h index 8e49d5ba..f33b48ec 100644 --- a/hyperdbg/include/platform/user/header/platform-serial.h +++ b/hyperdbg/include/platform/user/header/platform-serial.h @@ -8,7 +8,7 @@ * can stay shared. Windows maps onto Win32 (CreateFile / Comm* / overlapped * ReadFile/WriteFile); Linux will map onto termios over /dev/tty* (TODO). * - * @version 0.1 + * @version 0.20 * @date 2026-06-08 * * @copyright This project is released under the GNU Public License v3. diff --git a/hyperdbg/include/platform/user/header/platform-signal.h b/hyperdbg/include/platform/user/header/platform-signal.h index 963ba771..9a3f73db 100644 --- a/hyperdbg/include/platform/user/header/platform-signal.h +++ b/hyperdbg/include/platform/user/header/platform-signal.h @@ -11,7 +11,7 @@ * so the handler runs in ordinary thread context (matching Windows, which * also dispatches the handler on its own thread). * - * @version 0.1 + * @version 0.20 * @date 2026-06-16 * * @copyright This project is released under the GNU Public License v3. diff --git a/hyperdbg/libhyperdbg/code/common/list.cpp b/hyperdbg/libhyperdbg/code/common/list.cpp deleted file mode 100644 index 58c2fc44..00000000 --- a/hyperdbg/libhyperdbg/code/common/list.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @file list.cpp - * @author Sina Karvandi (sina@hyperdbg.org) - * @brief The list working functions headers - * @details - * @version 0.1 - * @date 2020-04-11 - * - * @copyright This project is released under the GNU Public License v3. - * - */ -#include "pch.h" -// -///** -// * @brief List initializer -// * -// * @param ListHead -// */ -// void -// InitializeListHead(PLIST_ENTRY ListHead) -//{ -// ListHead->Flink = ListHead->Blink = ListHead; -//} -// -///** -// * @brief insert entry to the top of the list -// * -// * @param ListHead -// * @param Entry -// */ -// void -// InsertHeadList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry) -//{ -// PLIST_ENTRY Flink; -// -// Flink = ListHead->Flink; -// Entry->Flink = Flink; -// Entry->Blink = ListHead; -// Flink->Blink = Entry; -// ListHead->Flink = Entry; -//} -// -///** -// * @brief remove the entry from the list -// * -// * @param Entry -// * @return BOOLEAN -// */ -// BOOLEAN -// RemoveEntryList(PLIST_ENTRY Entry) -//{ -// PLIST_ENTRY PrevEntry; -// PLIST_ENTRY NextEntry; -// -// NextEntry = Entry->Flink; -// PrevEntry = Entry->Blink; -// if ((NextEntry->Blink != Entry) || (PrevEntry->Flink != Entry)) -// { -// // -// // Error -// // -// _CrtDbgBreak(); -// } -// -// PrevEntry->Flink = NextEntry; -// NextEntry->Blink = PrevEntry; -// return (BOOLEAN)(PrevEntry == NextEntry); -//} diff --git a/hyperdbg/libhyperdbg/libhyperdbg.vcxproj b/hyperdbg/libhyperdbg/libhyperdbg.vcxproj index 30b4dbf2..c5a8ad58 100644 --- a/hyperdbg/libhyperdbg/libhyperdbg.vcxproj +++ b/hyperdbg/libhyperdbg/libhyperdbg.vcxproj @@ -250,7 +250,6 @@ msbuild "$(SolutionDir)dependencies\zydis\msvc\Zydis.sln" /m /p:Configuration="R - diff --git a/hyperdbg/libhyperdbg/libhyperdbg.vcxproj.filters b/hyperdbg/libhyperdbg/libhyperdbg.vcxproj.filters index 7c38052a..9b62836e 100644 --- a/hyperdbg/libhyperdbg/libhyperdbg.vcxproj.filters +++ b/hyperdbg/libhyperdbg/libhyperdbg.vcxproj.filters @@ -235,9 +235,6 @@ code\common - - code\common - code\debugger\commands\debugging-commands diff --git a/hyperdbg/linux/Contribute.md b/hyperdbg/linux/Contribute.md deleted file mode 100644 index b2954d9f..00000000 --- a/hyperdbg/linux/Contribute.md +++ /dev/null @@ -1,41 +0,0 @@ -# Contributing to the Linux Port - -HyperDbg is being ported from Windows to Linux. The work is incremental: most -of the codebase compiles file-by-file as the Win32-specific calls get replaced -with a platform-independent interface. - -## Building - -```bash -cmake . # generate the Makefiles -make # build -``` - -Run these from the repo root (or the relevant subdirectory). `cmake .` only -needs to be re-run when the CMake files change; otherwise `make` is enough. - -## How to contribute - -The port progresses one source file at a time. To pick up work: - -1. Build and find the next file that fails to compile. -2. Go through it and make it Linux-compatible. -3. Where the code calls Windows-only APIs (serial, registry, signals, - threads, etc.), don't `#ifdef` inline — route the call through the - **platform-independent interface** so both Windows and Linux share the same - call site with separate backing implementations. -4. Rebuild until the file is clean, then move to the next one. - -## The platform interface - -User-mode abstractions live in `include/platform/user/` (`header/` for the -interface, `code/` for the implementations). See existing examples such as -`platform-serial`, `platform-signal`, and `platform-ioctl` for the pattern to -follow. Kernel-mode equivalents are under `include/platform/kernel/`. - -## Guidelines - -- Keep platform-specific code behind the platform abstraction, not scattered - through the logic. -- Match the surrounding code's style and conventions. -- Build before submitting — every changed file should compile. diff --git a/hyperdbg/linux/README.md b/hyperdbg/linux/README.md index 6ee5f6a6..7071f314 100644 --- a/hyperdbg/linux/README.md +++ b/hyperdbg/linux/README.md @@ -6,4 +6,46 @@ Linux is currently **not supported**. -We are in the process of porting HyperDbg to Linux. This effort is ongoing and may take some time to complete. \ No newline at end of file +We are in the process of porting HyperDbg to Linux. This effort is ongoing and may take some time to complete. + +# Contributing to the Linux Port + +HyperDbg is being ported from Windows to Linux. The work is incremental: most +of the codebase compiles file-by-file as the Win32-specific calls get replaced +with a platform-independent interface. + +## Building + +```bash +cmake . # generate the Makefiles +make # build +``` + +Run these from the repo root (or the relevant subdirectory). `cmake .` only +needs to be re-run when the CMake files change; otherwise `make` is enough. + +## How to contribute + +The port progresses one source file at a time. To pick up work: + +1. Build and find the next file that fails to compile. +2. Go through it and make it Linux-compatible. +3. Where the code calls Windows-only APIs (serial, registry, signals, + threads, etc.), don't `#ifdef` inline — route the call through the + **platform-independent interface** so both Windows and Linux share the same + call site with separate backing implementations. +4. Rebuild until the file is clean, then move to the next one. + +## The platform interface + +User-mode abstractions live in `include/platform/user/` (`header/` for the +interface, `code/` for the implementations). See existing examples such as +`platform-serial`, `platform-signal`, and `platform-ioctl` for the pattern to +follow. Kernel-mode equivalents are under `include/platform/kernel/`. + +## Guidelines + +- Keep platform-specific code behind the platform abstraction, not scattered + through the logic. +- Match the surrounding code's style and conventions. +- Build before submitting — every changed file should compile. \ No newline at end of file