HyperDbg Debugger
Toggle main menu visibility
Loading...
Searching...
No Matches
ud.h
Go to the documentation of this file.
1
12
#pragma once
13
15
// Structures //
17
23
typedef
struct
_ACTIVE_DEBUGGING_PROCESS
24
{
25
BOOLEAN
IsActive
;
26
UINT64
ProcessDebuggingToken
;
27
UINT32
ProcessId
;
28
UINT32
ThreadId
;
29
BOOLEAN
IsPaused
;
30
GUEST_REGS
Registers
;
// thread registers
31
UINT64
Context
;
// $context
32
UINT64
Rip
;
33
BOOLEAN
Is32Bit
;
34
BYTE
InstructionBytesOnRip
[
MAXIMUM_INSTR_SIZE
];
35
36
}
ACTIVE_DEBUGGING_PROCESS
, *
PACTIVE_DEBUGGING_PROCESS
;
37
39
// Functions //
41
42
VOID
43
UdInitializeUserDebugger
();
44
45
VOID
46
UdUninitializeUserDebugger
();
47
48
VOID
49
UdRemoveActiveDebuggingProcess
();
50
51
VOID
52
UdHandleUserDebuggerPausing
(
PDEBUGGEE_UD_PAUSED_PACKET
PausePacket);
53
54
VOID
55
UdSetActiveDebuggingProcess
(UINT64 DebuggingId,
56
UINT64 Rip,
57
UINT32
ProcessId,
58
UINT32
ThreadId,
59
BOOLEAN
Is32Bit,
60
BOOLEAN
IsPaused,
61
BYTE
InstructionBytesOnRip[]);
62
63
BOOLEAN
64
UdSendStepPacketToDebuggee
(UINT64 ThreadDetailToken,
65
UINT32
TargetThreadId,
66
DEBUGGER_REMOTE_STEPPING_REQUEST
StepType);
67
68
BOOLEAN
69
UdSetActiveDebuggingThreadByPidOrTid
(
UINT32
TargetPidOrTid,
BOOLEAN
IsTid);
70
71
BOOLEAN
72
UdSetActiveDebuggingThreadByPidOrTid
(
UINT32
TargetPidOrTid,
BOOLEAN
IsTid);
73
74
BOOLEAN
75
UdShowListActiveDebuggingProcessesAndThreads
();
76
77
BOOLEAN
78
UdListProcessThreads
(
DWORD
OwnerPID);
79
80
BOOLEAN
81
UdCheckThreadByProcessId
(
DWORD
Pid,
DWORD
Tid);
82
83
BOOLEAN
84
UdAttachToProcess
(
UINT32
TargetPid,
85
const
WCHAR * TargetFileAddress,
86
const
WCHAR * CommandLine,
87
BOOLEAN
RunCallbackAtTheFirstInstruction);
88
89
BOOLEAN
90
UdKillProcess
(
UINT32
TargetPid);
91
92
BOOLEAN
93
UdDetachProcess
(
UINT32
TargetPid, UINT64 ProcessDetailToken);
94
95
BOOLEAN
96
UdContinueProcess
(UINT64 ProcessDebuggingToken);
97
98
BOOLEAN
99
UdPauseProcess
(UINT64 ProcessDebuggingToken);
100
101
BOOLEAN
102
UdSendCommand
(UINT64 ProcessDetailToken,
103
UINT32
ThreadId,
104
DEBUGGER_UD_COMMAND_ACTION_TYPE
ActionType,
105
PVOID
OptionalBuffer,
106
UINT32
OptionalBufferSize,
107
BOOLEAN
ApplyToAllPausedThreads,
108
BOOLEAN
WaitForEventCompletion,
109
UINT64 OptionalParam1,
110
UINT64 OptionalParam2,
111
UINT64 OptionalParam3,
112
UINT64 OptionalParam4);
113
114
BOOLEAN
115
UdSendScriptBufferToProcess
(UINT64 ProcessDetailToken,
116
UINT32
TargetThreadId,
117
UINT64 BufferAddress,
118
UINT32
BufferLength,
119
UINT32
Pointer,
120
BOOLEAN
IsFormat);
121
122
BOOLEAN
123
UdSendReadRegisterToUserDebugger
(UINT64 ProcessDetailToken,
124
UINT32
TargetThreadId,
125
PDEBUGGEE_REGISTER_READ_DESCRIPTION
RegDes,
126
UINT32
RegBuffSize);
BOOLEAN
UCHAR BOOLEAN
Definition
BasicTypes.h:35
PVOID
void * PVOID
Definition
BasicTypes.h:56
BYTE
unsigned char BYTE
Definition
BasicTypes.h:40
DWORD
unsigned long DWORD
Definition
BasicTypes.h:38
UINT32
unsigned int UINT32
Definition
BasicTypes.h:54
MAXIMUM_INSTR_SIZE
#define MAXIMUM_INSTR_SIZE
maximum instruction size in Intel
Definition
Constants.h:470
PDEBUGGEE_UD_PAUSED_PACKET
struct _DEBUGGEE_UD_PAUSED_PACKET * PDEBUGGEE_UD_PAUSED_PACKET
DEBUGGER_UD_COMMAND_ACTION_TYPE
enum _DEBUGGER_UD_COMMAND_ACTION_TYPE DEBUGGER_UD_COMMAND_ACTION_TYPE
User-mode debugging actions.
PDEBUGGEE_REGISTER_READ_DESCRIPTION
struct _DEBUGGEE_REGISTER_READ_DESCRIPTION * PDEBUGGEE_REGISTER_READ_DESCRIPTION
DEBUGGER_REMOTE_STEPPING_REQUEST
enum _DEBUGGER_REMOTE_STEPPING_REQUEST DEBUGGER_REMOTE_STEPPING_REQUEST
stepping and tracking types
UdListProcessThreads
BOOLEAN UdListProcessThreads(DWORD OwnerPID)
List of threads by owner process id.
Definition
ud.cpp:206
UdSetActiveDebuggingThreadByPidOrTid
BOOLEAN UdSetActiveDebuggingThreadByPidOrTid(UINT32 TargetPidOrTid, BOOLEAN IsTid)
Set the active debugging thread by process id or thread id.
Definition
ud.cpp:1314
UdPauseProcess
BOOLEAN UdPauseProcess(UINT64 ProcessDebuggingToken)
Pause the target process.
Definition
ud.cpp:865
UdSendScriptBufferToProcess
BOOLEAN UdSendScriptBufferToProcess(UINT64 ProcessDetailToken, UINT32 TargetThreadId, UINT64 BufferAddress, UINT32 BufferLength, UINT32 Pointer, BOOLEAN IsFormat)
Send script buffer to the user debugger.
Definition
ud.cpp:1176
UdSetActiveDebuggingProcess
VOID UdSetActiveDebuggingProcess(UINT64 DebuggingId, UINT64 Rip, UINT32 ProcessId, UINT32 ThreadId, BOOLEAN Is32Bit, BOOLEAN IsPaused, BYTE InstructionBytesOnRip[])
set the current active debugging process (thread)
Definition
ud.cpp:112
UdSendCommand
BOOLEAN UdSendCommand(UINT64 ProcessDetailToken, UINT32 ThreadId, DEBUGGER_UD_COMMAND_ACTION_TYPE ActionType, PVOID OptionalBuffer, UINT32 OptionalBufferSize, BOOLEAN ApplyToAllPausedThreads, BOOLEAN WaitForEventCompletion, UINT64 OptionalParam1, UINT64 OptionalParam2, UINT64 OptionalParam3, UINT64 OptionalParam4)
Send the command to the user debugger.
Definition
ud.cpp:1010
UdInitializeUserDebugger
VOID UdInitializeUserDebugger()
initialize user debugger
Definition
Ud.c:21
PACTIVE_DEBUGGING_PROCESS
struct _ACTIVE_DEBUGGING_PROCESS * PACTIVE_DEBUGGING_PROCESS
UdSendReadRegisterToUserDebugger
BOOLEAN UdSendReadRegisterToUserDebugger(UINT64 ProcessDetailToken, UINT32 TargetThreadId, PDEBUGGEE_REGISTER_READ_DESCRIPTION RegDes, UINT32 RegBuffSize)
Send the command to the user debugger.
Definition
ud.cpp:1142
UdRemoveActiveDebuggingProcess
VOID UdRemoveActiveDebuggingProcess()
Remove the current active debugging process (thread).
Definition
ud.cpp:152
UdDetachProcess
BOOLEAN UdDetachProcess(UINT32 TargetPid, UINT64 ProcessDetailToken)
Detach the target process.
Definition
ud.cpp:786
ACTIVE_DEBUGGING_PROCESS
struct _ACTIVE_DEBUGGING_PROCESS ACTIVE_DEBUGGING_PROCESS
structures related to current thread debugging state
UdSendStepPacketToDebuggee
BOOLEAN UdSendStepPacketToDebuggee(UINT64 ThreadDetailToken, UINT32 TargetThreadId, DEBUGGER_REMOTE_STEPPING_REQUEST StepType)
Send stepping instructions packet to user debugger.
Definition
ud.cpp:1246
UdShowListActiveDebuggingProcessesAndThreads
BOOLEAN UdShowListActiveDebuggingProcessesAndThreads()
Show list of active debugging processes and threads.
Definition
ud.cpp:1397
UdCheckThreadByProcessId
BOOLEAN UdCheckThreadByProcessId(DWORD Pid, DWORD Tid)
Check if a thread belongs to special process.
Definition
ud.cpp:266
UdUninitializeUserDebugger
VOID UdUninitializeUserDebugger()
uninitialize user debugger
Definition
Ud.c:90
UdContinueProcess
BOOLEAN UdContinueProcess(UINT64 ProcessDebuggingToken)
Continue the target process.
Definition
ud.cpp:933
UdKillProcess
BOOLEAN UdKillProcess(UINT32 TargetPid)
Kill the target process from kernel.
Definition
ud.cpp:688
UdHandleUserDebuggerPausing
VOID UdHandleUserDebuggerPausing(PDEBUGGEE_UD_PAUSED_PACKET PausePacket)
Handle pause packets from user debugger.
Definition
user-listening.cpp:29
UdAttachToProcess
BOOLEAN UdAttachToProcess(UINT32 TargetPid, const WCHAR *TargetFileAddress, const WCHAR *CommandLine, BOOLEAN RunCallbackAtTheFirstInstruction)
Attach to target process.
Definition
ud.cpp:372
_ACTIVE_DEBUGGING_PROCESS
structures related to current thread debugging state
Definition
ud.h:24
_ACTIVE_DEBUGGING_PROCESS::ProcessId
UINT32 ProcessId
Definition
ud.h:27
_ACTIVE_DEBUGGING_PROCESS::Context
UINT64 Context
Definition
ud.h:31
_ACTIVE_DEBUGGING_PROCESS::Rip
UINT64 Rip
Definition
ud.h:32
_ACTIVE_DEBUGGING_PROCESS::Registers
GUEST_REGS Registers
Definition
ud.h:30
_ACTIVE_DEBUGGING_PROCESS::IsActive
BOOLEAN IsActive
Definition
ud.h:25
_ACTIVE_DEBUGGING_PROCESS::ThreadId
UINT32 ThreadId
Definition
ud.h:28
_ACTIVE_DEBUGGING_PROCESS::ProcessDebuggingToken
UINT64 ProcessDebuggingToken
Definition
ud.h:26
_ACTIVE_DEBUGGING_PROCESS::InstructionBytesOnRip
BYTE InstructionBytesOnRip[MAXIMUM_INSTR_SIZE]
Definition
ud.h:34
_ACTIVE_DEBUGGING_PROCESS::Is32Bit
BOOLEAN Is32Bit
Definition
ud.h:33
_ACTIVE_DEBUGGING_PROCESS::IsPaused
BOOLEAN IsPaused
Definition
ud.h:29
GUEST_REGS
Definition
BasicTypes.h:136
hyperdbg
libhyperdbg
header
ud.h
Generated by
1.17.0