2020-05-27 09:59:17 -07:00
|
|
|
/**
|
|
|
|
|
* @file debugger.h
|
2022-01-18 22:38:56 +03:30
|
|
|
* @author Sina Karvandi (sina@hyperdbg.org)
|
2026-06-05 18:55:16 +01:00
|
|
|
* @author jtaw5649
|
2020-05-27 09:59:17 -07:00
|
|
|
* @brief General debugger functions
|
|
|
|
|
* @details
|
|
|
|
|
* @version 0.1
|
|
|
|
|
* @date 2020-05-27
|
|
|
|
|
*
|
|
|
|
|
* @copyright This project is released under the GNU Public License v3.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2020-09-13 13:11:35 -07:00
|
|
|
//////////////////////////////////////////////////
|
2022-06-24 03:19:41 -07:00
|
|
|
// Debugger Synchronization Objects //
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief maximum number of event handles in kernel-debugger
|
|
|
|
|
*/
|
|
|
|
|
#define DEBUGGER_MAXIMUM_SYNCRONIZATION_KERNEL_DEBUGGER_OBJECTS 0x40
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief An event to show whether the debugger is running
|
|
|
|
|
* or not in kernel-debugger
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Kernel-debugger
|
|
|
|
|
//
|
2023-03-22 17:45:52 +09:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_IS_DEBUGGER_RUNNING 0x0
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_STARTED_PACKET_RECEIVED 0x1
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_PAUSED_DEBUGGEE_DETAILS 0x2
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_CORE_SWITCHING_RESULT 0x3
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_PROCESS_SWITCHING_RESULT 0x4
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_THREAD_SWITCHING_RESULT 0x5
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_SCRIPT_RUNNING_RESULT 0x6
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_SCRIPT_FORMATS_RESULT 0x7
|
2022-06-24 03:19:41 -07:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_DEBUGGEE_FINISHED_COMMAND_EXECUTION 0x8
|
2023-03-22 17:45:52 +09:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_FLUSH_RESULT 0x9
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_REGISTER_EVENT 0xa
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_ADD_ACTION_TO_EVENT 0xb
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_MODIFY_AND_QUERY_EVENT 0xc
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_READ_REGISTERS 0xd
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_BP 0xe
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_LIST_OR_MODIFY_BREAKPOINTS 0xf
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_READ_MEMORY 0x10
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_EDIT_MEMORY 0x11
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_SYMBOL_RELOAD 0x12
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_TEST_QUERY 0x13
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_CALLSTACK_RESULT 0x14
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_SEARCH_QUERY_RESULT 0x15
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_VA2PA_AND_PA2VA_RESULT 0x16
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_PTE_RESULT 0x17
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_SHORT_CIRCUITING_EVENT_STATE 0x18
|
2023-07-13 17:59:33 +09:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_PAGE_IN_STATE 0x19
|
2024-07-07 21:44:07 +09:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_WRITE_REGISTER 0x1a
|
2024-11-06 14:52:08 +01:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_PCITREE_RESULT 0x1b
|
2024-11-12 19:18:52 +01:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_APIC_ACTIONS 0x1c
|
2025-01-14 14:55:01 +01:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_PCIDEVINFO_RESULT 0x1d
|
2025-02-13 17:13:19 +01:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_IDT_ENTRIES 0x1e
|
2025-08-02 23:18:18 +02:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_SMI_OPERATION_RESULT 0x1f
|
2026-05-04 00:29:54 +02:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_HYPERTRACE_LBR_DUMP_RESULT 0x20
|
2026-04-25 22:46:55 +02:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_HYPERTRACE_PT_OPERATION_RESULT 0x21
|
2026-07-19 18:09:33 +03:30
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_USER_CPUID_RESULT 0x22
|
2026-08-06 21:11:59 +03:30
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_USER_IN_RESULT 0x23
|
|
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_KERNEL_DEBUGGER_USER_OUT_RESULT 0x24
|
2022-06-24 03:19:41 -07:00
|
|
|
|
2022-06-24 05:23:29 -07:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
// Event Details //
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Reason for error in parsing commands
|
|
|
|
|
*
|
|
|
|
|
*/
|
2023-03-22 17:45:52 +09:00
|
|
|
typedef enum _DEBUGGER_EVENT_PARSING_ERROR_CAUSE
|
|
|
|
|
{
|
|
|
|
|
DEBUGGER_EVENT_PARSING_ERROR_CAUSE_SUCCESSFUL_NO_ERROR = 0,
|
|
|
|
|
DEBUGGER_EVENT_PARSING_ERROR_CAUSE_SCRIPT_SYNTAX_ERROR = 1,
|
|
|
|
|
DEBUGGER_EVENT_PARSING_ERROR_CAUSE_NO_INPUT = 2,
|
|
|
|
|
DEBUGGER_EVENT_PARSING_ERROR_CAUSE_MAXIMUM_INPUT_REACHED = 3,
|
|
|
|
|
DEBUGGER_EVENT_PARSING_ERROR_CAUSE_OUTPUT_NAME_NOT_FOUND = 4,
|
|
|
|
|
DEBUGGER_EVENT_PARSING_ERROR_CAUSE_OUTPUT_SOURCE_ALREADY_CLOSED = 5,
|
|
|
|
|
DEBUGGER_EVENT_PARSING_ERROR_CAUSE_ALLOCATION_ERROR = 6,
|
|
|
|
|
DEBUGGER_EVENT_PARSING_ERROR_CAUSE_FORMAT_ERROR = 7,
|
|
|
|
|
DEBUGGER_EVENT_PARSING_ERROR_CAUSE_ATTEMPT_TO_BREAK_ON_VMI_MODE = 8,
|
2022-06-24 05:23:29 -07:00
|
|
|
DEBUGGER_EVENT_PARSING_ERROR_CAUSE_IMMEDIATE_MESSAGING_IN_EVENT_FORWARDING_MODE = 9,
|
2023-03-22 17:45:52 +09:00
|
|
|
DEBUGGER_EVENT_PARSING_ERROR_CAUSE_USING_SHORT_CIRCUITING_IN_POST_EVENTS = 10,
|
2022-06-24 05:23:29 -07:00
|
|
|
|
|
|
|
|
} DEBUGGER_EVENT_PARSING_ERROR_CAUSE,
|
|
|
|
|
*PDEBUGGER_EVENT_PARSING_ERROR_CAUSE;
|
|
|
|
|
|
2022-06-24 03:19:41 -07:00
|
|
|
/**
|
|
|
|
|
* @brief Maximum number of event handles in user-debugger
|
|
|
|
|
*/
|
|
|
|
|
#define DEBUGGER_MAXIMUM_SYNCRONIZATION_USER_DEBUGGER_OBJECTS 0x40
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief An event to show whether the debugger is running
|
|
|
|
|
* or not in user-debugger
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// User-debugger
|
|
|
|
|
//
|
2025-08-30 03:37:10 +02:00
|
|
|
#define DEBUGGER_SYNCRONIZATION_OBJECT_USER_DEBUGGER_IS_DEBUGGER_RUNNING 0x0
|
2022-06-24 03:19:41 -07:00
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
2022-06-24 05:23:29 -07:00
|
|
|
// Event Details //
|
2020-09-13 13:11:35 -07:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
2021-03-22 18:05:55 +04:30
|
|
|
/**
|
|
|
|
|
* @brief In debugger holds the state of events
|
|
|
|
|
*
|
|
|
|
|
*/
|
2023-03-22 17:45:52 +09:00
|
|
|
typedef struct _DEBUGGER_SYNCRONIZATION_EVENTS_STATE
|
|
|
|
|
{
|
|
|
|
|
HANDLE EventHandle;
|
2021-03-22 18:19:39 +04:30
|
|
|
BOOLEAN IsOnWaitingState;
|
2024-07-06 21:16:45 +09:00
|
|
|
PVOID RequestData;
|
|
|
|
|
UINT32 RequestSize;
|
|
|
|
|
|
2021-03-22 18:05:55 +04:30
|
|
|
} DEBUGGER_SYNCRONIZATION_EVENTS_STATE, *PDEBUGGER_SYNCRONIZATION_EVENTS_STATE;
|
|
|
|
|
|
2020-05-27 12:58:18 -07:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
// Functions //
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
2020-08-28 04:03:12 -07:00
|
|
|
BOOLEAN
|
|
|
|
|
ShowErrorMessage(UINT32 Error);
|
|
|
|
|
|
2021-03-22 18:19:39 +04:30
|
|
|
BOOLEAN
|
|
|
|
|
IsConnectedToAnyInstanceOfDebuggerOrDebuggee();
|
2021-01-16 07:04:27 -08:00
|
|
|
|
2021-03-22 18:19:39 +04:30
|
|
|
BOOLEAN
|
|
|
|
|
IsTagExist(UINT64 Tag);
|
2020-08-28 04:03:12 -07:00
|
|
|
|
2021-05-30 20:25:07 +04:30
|
|
|
UINT64
|
|
|
|
|
DebuggerGetNtoskrnlBase();
|
|
|
|
|
|
2024-07-12 18:25:34 +09:00
|
|
|
UINT64
|
|
|
|
|
DebuggerGetKernelBase();
|
|
|
|
|
|
2021-03-22 18:19:39 +04:30
|
|
|
BOOLEAN
|
|
|
|
|
DebuggerPauseDebuggee();
|
2021-01-16 14:16:20 -08:00
|
|
|
|
2023-03-22 17:45:52 +09:00
|
|
|
VOID
|
|
|
|
|
FreeEventsAndActionsMemory(PDEBUGGER_GENERAL_EVENT_DETAIL Event,
|
|
|
|
|
PDEBUGGER_GENERAL_ACTION ActionBreakToDebugger,
|
|
|
|
|
PDEBUGGER_GENERAL_ACTION ActionCustomCode,
|
|
|
|
|
PDEBUGGER_GENERAL_ACTION ActionScript);
|
2022-05-09 01:34:07 +04:30
|
|
|
|
2020-05-27 09:59:17 -07:00
|
|
|
BOOLEAN
|
|
|
|
|
SendEventToKernel(PDEBUGGER_GENERAL_EVENT_DETAIL Event,
|
2023-03-22 17:45:52 +09:00
|
|
|
UINT32 EventBufferLength);
|
2020-05-27 09:59:17 -07:00
|
|
|
|
|
|
|
|
BOOLEAN
|
2022-05-09 01:34:07 +04:30
|
|
|
RegisterActionToEvent(PDEBUGGER_GENERAL_EVENT_DETAIL Event,
|
2023-03-22 17:45:52 +09:00
|
|
|
PDEBUGGER_GENERAL_ACTION ActionBreakToDebugger,
|
|
|
|
|
UINT32 ActionBreakToDebuggerLength,
|
|
|
|
|
PDEBUGGER_GENERAL_ACTION ActionCustomCode,
|
|
|
|
|
UINT32 ActionCustomCodeLength,
|
|
|
|
|
PDEBUGGER_GENERAL_ACTION ActionScript,
|
|
|
|
|
UINT32 ActionScriptLength);
|
2020-07-16 06:12:03 -07:00
|
|
|
|
2021-03-22 18:19:39 +04:30
|
|
|
BOOLEAN
|
|
|
|
|
InterpretGeneralEventAndActionsFields(
|
2024-07-30 18:44:15 +09:00
|
|
|
vector<CommandToken> * CommandTokens,
|
2023-03-22 17:45:52 +09:00
|
|
|
VMM_EVENT_TYPE_ENUM EventType,
|
|
|
|
|
PDEBUGGER_GENERAL_EVENT_DETAIL * EventDetailsToFill,
|
|
|
|
|
PUINT32 EventBufferLength,
|
|
|
|
|
PDEBUGGER_GENERAL_ACTION * ActionDetailsToFillBreakToDebugger,
|
|
|
|
|
PUINT32 ActionBufferLengthBreakToDebugger,
|
|
|
|
|
PDEBUGGER_GENERAL_ACTION * ActionDetailsToFillCustomCode,
|
|
|
|
|
PUINT32 ActionBufferLengthCustomCode,
|
|
|
|
|
PDEBUGGER_GENERAL_ACTION * ActionDetailsToFillScript,
|
|
|
|
|
PUINT32 ActionBufferLengthScript,
|
2021-08-21 20:48:17 +04:30
|
|
|
PDEBUGGER_EVENT_PARSING_ERROR_CAUSE ReasonForErrorInParsing);
|
2021-03-22 18:19:39 +04:30
|
|
|
|
2022-03-06 02:43:58 +03:30
|
|
|
BOOLEAN
|
2023-03-22 17:45:52 +09:00
|
|
|
CallstackReturnAddressToCallingAddress(UCHAR * ReturnAddress, PUINT32 IndexOfCallFromReturnAddress);
|
2022-03-06 02:43:58 +03:30
|
|
|
|
2023-03-22 17:45:52 +09:00
|
|
|
VOID
|
|
|
|
|
CallstackShowFrames(PDEBUGGER_SINGLE_CALLSTACK_FRAME CallstackFrames,
|
|
|
|
|
UINT32 FrameCount,
|
|
|
|
|
DEBUGGER_CALLSTACK_DISPLAY_METHOD DisplayMethod,
|
|
|
|
|
BOOLEAN Is32Bit);
|
2022-03-06 02:43:58 +03:30
|
|
|
|
2021-03-22 18:19:39 +04:30
|
|
|
UINT64
|
|
|
|
|
GetNewDebuggerEventTag();
|
|
|
|
|
|
2021-09-23 23:29:29 +03:30
|
|
|
DWORD WINAPI
|
|
|
|
|
ListeningSerialPauseDebuggeeThread(PVOID Param);
|
|
|
|
|
|
|
|
|
|
DWORD WINAPI
|
|
|
|
|
ListeningSerialPauseDebuggerThread(PVOID Param);
|
|
|
|
|
|
2023-03-22 17:45:52 +09:00
|
|
|
VOID
|
2026-05-31 18:34:03 +02:00
|
|
|
LogopenSaveToFile(const CHAR * Text);
|
2021-03-22 18:19:39 +04:30
|
|
|
|
2023-03-22 17:45:52 +09:00
|
|
|
BOOL
|
|
|
|
|
BreakController(DWORD CtrlType);
|
2021-03-22 18:19:39 +04:30
|
|
|
|
2023-03-22 17:45:52 +09:00
|
|
|
VOID
|
|
|
|
|
CommandEventsShowEvents();
|
2020-08-28 04:03:12 -07:00
|
|
|
|
2021-02-22 12:57:09 -08:00
|
|
|
BOOLEAN
|
2023-03-22 17:45:52 +09:00
|
|
|
CommandEventsModifyAndQueryEvents(UINT64 Tag,
|
|
|
|
|
DEBUGGER_MODIFY_EVENTS_TYPE TypeOfAction);
|
2020-08-28 04:03:12 -07:00
|
|
|
|
2023-03-22 17:45:52 +09:00
|
|
|
VOID
|
|
|
|
|
CommandEventsHandleModifiedEvent(
|
|
|
|
|
UINT64 Tag,
|
2021-03-22 18:19:39 +04:30
|
|
|
PDEBUGGER_MODIFY_EVENTS ModifyEventRequest);
|
2021-02-22 07:21:44 -08:00
|
|
|
|
2023-03-22 17:45:52 +09:00
|
|
|
VOID
|
|
|
|
|
CommandEventsClearAllEventsAndResetTags();
|
2021-09-03 02:09:33 +04:30
|
|
|
|
2023-03-22 17:45:52 +09:00
|
|
|
VOID
|
|
|
|
|
CommandFlushRequestFlush();
|
2020-08-28 04:03:12 -07:00
|
|
|
|
2026-08-09 21:13:11 +02:00
|
|
|
BOOLEAN
|
2026-07-19 18:09:33 +03:30
|
|
|
CommandCpuidRequestCpuid(UINT32 FunctionId, UINT32 SubFunctionId);
|
|
|
|
|
|
2026-07-22 21:21:17 +03:30
|
|
|
VOID
|
2026-07-23 10:03:35 +02:00
|
|
|
CommandShowUserCpuidMessage(UINT32 FunctionId,
|
|
|
|
|
UINT32 SubFunctionId,
|
2026-07-22 21:21:17 +03:30
|
|
|
PDEBUGGER_CPUID_REQUEST_RESPONSE CpuidRequest);
|
|
|
|
|
|
2026-08-09 21:13:11 +02:00
|
|
|
BOOLEAN
|
2026-08-06 21:11:59 +03:30
|
|
|
CommandUserInRequest(DEBUGGER_USER_IN_REQUEST_RESPONSE InRequest);
|
|
|
|
|
|
2026-08-09 21:13:11 +02:00
|
|
|
BOOLEAN
|
|
|
|
|
CommandUserOutRequest(DEBUGGER_USER_OUT_REQUEST_RESPONSE OutRequest);
|
|
|
|
|
|
2026-08-06 21:11:59 +03:30
|
|
|
VOID
|
|
|
|
|
CommandShowUserInMessage(USHORT UserChosenRegister,
|
|
|
|
|
USHORT PortAddress,
|
|
|
|
|
ULONG Data);
|
|
|
|
|
|
|
|
|
|
VOID
|
|
|
|
|
CommandShowUserOutMessage(USHORT UserChosenRegister,
|
|
|
|
|
USHORT PortAddress,
|
|
|
|
|
UINT32 Value);
|
|
|
|
|
|
2021-03-22 18:19:39 +04:30
|
|
|
UINT64
|
2023-03-22 17:45:52 +09:00
|
|
|
GetCommandAttributes(const string & FirstCommand);
|
2020-09-17 04:03:06 -07:00
|
|
|
|
2023-03-22 17:45:52 +09:00
|
|
|
VOID
|
|
|
|
|
DetachFromProcess();
|
2020-12-28 13:16:49 -08:00
|
|
|
|
2023-03-22 17:45:52 +09:00
|
|
|
VOID
|
|
|
|
|
CommandPauseRequest();
|
2021-04-28 02:16:33 +04:30
|
|
|
|
2023-03-22 17:45:52 +09:00
|
|
|
VOID
|
|
|
|
|
CommandGRequest();
|
2023-05-05 22:03:00 +09:00
|
|
|
|
2025-07-09 13:37:01 +02:00
|
|
|
BOOLEAN
|
2024-06-27 19:41:32 +09:00
|
|
|
CommandBpRequest(UINT64 Address, UINT32 Pid, UINT32 Tid, UINT32 CoreNumer);
|
|
|
|
|
|
2023-05-05 22:03:00 +09:00
|
|
|
VOID
|
2026-05-31 18:34:03 +02:00
|
|
|
CommandTrackHandleReceivedInstructions(UCHAR * BufferToDisassemble,
|
|
|
|
|
UINT32 BuffLength,
|
|
|
|
|
BOOLEAN Isx86_64,
|
|
|
|
|
UINT64 RipAddress);
|
2023-05-07 02:45:44 +09:00
|
|
|
|
|
|
|
|
VOID
|
2026-05-31 18:34:03 +02:00
|
|
|
CommandTrackHandleReceivedCallInstructions(const CHAR * NameOfFunctionFromSymbols,
|
2023-05-07 02:45:44 +09:00
|
|
|
UINT64 ComputedAbsoluteAddress);
|
|
|
|
|
|
|
|
|
|
VOID
|
|
|
|
|
CommandTrackHandleReceivedRetInstructions(UINT64 CurrentRip);
|
2024-07-07 22:23:24 +09:00
|
|
|
|
2024-07-10 20:21:31 +09:00
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgWriteMemory(PVOID DestinationAddress,
|
|
|
|
|
DEBUGGER_EDIT_MEMORY_TYPE MemoryType,
|
|
|
|
|
UINT32 ProcessId,
|
|
|
|
|
PVOID SourceAddress,
|
|
|
|
|
UINT32 NumberOfBytes);
|
|
|
|
|
|
2024-07-07 22:23:24 +09:00
|
|
|
//////////////////////////////////////////////////
|
2024-12-30 04:37:15 +01:00
|
|
|
// Misc //
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
|
CommandApicSendRequest(DEBUGGER_APIC_REQUEST_TYPE ApicType,
|
|
|
|
|
PVOID ApicBuffer,
|
|
|
|
|
UINT32 ExpectedRequestSize,
|
|
|
|
|
PBOOLEAN IsUsingX2APIC);
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
// SDK Servicing Routines //
|
2024-07-07 22:23:24 +09:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgReadAllRegisters(GUEST_REGS * GuestRegisters, GUEST_EXTRA_REGISTERS * ExtraRegisters);
|
|
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgReadTargetRegister(REGS_ENUM RegisterId, UINT64 * TargetRegister);
|
|
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgWriteTargetRegister(REGS_ENUM RegisterId, UINT64 Value);
|
|
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgRegisterShowAll();
|
|
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgRegisterShowTargetRegister(REGS_ENUM RegisterId);
|
2024-07-12 19:51:00 +09:00
|
|
|
|
|
|
|
|
BOOLEAN
|
2024-07-25 17:45:55 +09:00
|
|
|
HyperDbgDebugRemoteDeviceUsingComPort(const CHAR * PortName, DWORD Baudrate, BOOLEAN PauseAfterConnection);
|
2024-07-12 19:51:00 +09:00
|
|
|
|
|
|
|
|
BOOLEAN
|
2024-07-25 17:45:55 +09:00
|
|
|
HyperDbgDebugRemoteDeviceUsingNamedPipe(const CHAR * NamedPipe, BOOLEAN PauseAfterConnection);
|
2024-07-12 19:51:00 +09:00
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgDebugCurrentDeviceUsingComPort(const CHAR * PortName, DWORD Baudrate);
|
2024-08-15 14:14:28 +09:00
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgDebugCloseRemoteDebugger();
|
2024-11-09 00:12:34 +01:00
|
|
|
|
|
|
|
|
BOOLEAN
|
2024-11-09 15:08:32 +01:00
|
|
|
HyperDbgGetLocalApic(PLAPIC_PAGE LocalApic, PBOOLEAN IsUsingX2APIC);
|
2024-11-19 13:56:22 +01:00
|
|
|
|
2024-11-20 14:44:03 +01:00
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgGetIoApic(IO_APIC_ENTRY_PACKETS * IoApic);
|
|
|
|
|
|
2024-11-19 13:56:22 +01:00
|
|
|
BOOLEAN
|
2024-12-30 04:37:15 +01:00
|
|
|
HyperDbgGetIdtEntry(INTERRUPT_DESCRIPTOR_TABLE_ENTRIES_PACKETS * IdtPacket);
|
2025-01-25 16:38:46 +01:00
|
|
|
|
2025-08-02 23:18:18 +02:00
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgPerformSmiOperation(SMI_OPERATION_PACKETS * SmiOperation);
|
|
|
|
|
|
2025-01-25 16:38:46 +01:00
|
|
|
BOOLEAN
|
2025-06-11 01:43:19 +02:00
|
|
|
HyperDbgEnableTransparentMode(UINT32 ProcessId, CHAR * ProcessName, BOOLEAN IsProcessId);
|
2025-01-25 16:38:46 +01:00
|
|
|
|
2026-06-05 18:55:16 +01:00
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgEnableTransparentModeEx(UINT32 ProcessId, CHAR * ProcessName, BOOLEAN IsProcessId, UINT32 EvadeMask);
|
|
|
|
|
|
2025-01-25 16:38:46 +01:00
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgDisableTransparentMode();
|
2026-05-04 00:29:54 +02:00
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgLbrdumpSendRequest(HYPERTRACE_LBR_DUMP_PACKETS * LbrdumpRequest);
|
2026-06-04 01:55:42 +02:00
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgPerformPtOperation(HYPERTRACE_PT_OPERATION_PACKETS * PtRequest);
|
|
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
|
HyperDbgPtMmapSendRequest(HYPERTRACE_PT_MMAP_PACKETS * MmapRequest);
|