|
HyperDbg Debugger
|
headers for user-mode debugging routines More...
Go to the source code of this file.
Classes | |
| struct | _ACTIVE_DEBUGGING_PROCESS |
| structures related to current thread debugging state More... | |
Typedefs | |
| typedef struct _ACTIVE_DEBUGGING_PROCESS | ACTIVE_DEBUGGING_PROCESS |
| structures related to current thread debugging state | |
| typedef struct _ACTIVE_DEBUGGING_PROCESS * | PACTIVE_DEBUGGING_PROCESS |
Functions | |
| VOID | UdInitializeUserDebugger () |
| initialize user debugger | |
| VOID | UdUninitializeUserDebugger () |
| uninitialize user debugger | |
| VOID | UdRemoveActiveDebuggingProcess () |
| Remove the current active debugging process (thread). | |
| VOID | UdHandleUserDebuggerPausing (PDEBUGGEE_UD_PAUSED_PACKET PausePacket) |
| Handle pause packets from user debugger. | |
| VOID | UdSetActiveDebuggingProcess (UINT64 DebuggingId, UINT64 Rip, UINT32 ProcessId, UINT32 ThreadId, BOOLEAN Is32Bit, BOOLEAN IsPaused, BYTE InstructionBytesOnRip[]) |
| set the current active debugging process (thread) | |
| BOOLEAN | UdSendStepPacketToDebuggee (UINT64 ThreadDetailToken, UINT32 TargetThreadId, DEBUGGER_REMOTE_STEPPING_REQUEST StepType) |
| Send stepping instructions packet to user debugger. | |
| BOOLEAN | UdSetActiveDebuggingThreadByPidOrTid (UINT32 TargetPidOrTid, BOOLEAN IsTid) |
| Set the active debugging thread by process id or thread id. | |
| BOOLEAN | UdShowListActiveDebuggingProcessesAndThreads () |
| Show list of active debugging processes and threads. | |
| BOOLEAN | UdListProcessThreads (DWORD OwnerPID) |
| List of threads by owner process id. | |
| BOOLEAN | UdCheckThreadByProcessId (DWORD Pid, DWORD Tid) |
| Check if a thread belongs to special process. | |
| BOOLEAN | UdAttachToProcess (UINT32 TargetPid, const WCHAR *TargetFileAddress, const WCHAR *CommandLine, BOOLEAN RunCallbackAtTheFirstInstruction) |
| Attach to target process. | |
| BOOLEAN | UdKillProcess (UINT32 TargetPid) |
| Kill the target process from kernel. | |
| BOOLEAN | UdDetachProcess (UINT32 TargetPid, UINT64 ProcessDetailToken) |
| Detach the target process. | |
| BOOLEAN | UdContinueProcess (UINT64 ProcessDebuggingToken) |
| Continue the target process. | |
| BOOLEAN | UdPauseProcess (UINT64 ProcessDebuggingToken) |
| Pause the target process. | |
| 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. | |
| BOOLEAN | UdSendScriptBufferToProcess (UINT64 ProcessDetailToken, UINT32 TargetThreadId, UINT64 BufferAddress, UINT32 BufferLength, UINT32 Pointer, BOOLEAN IsFormat) |
| Send script buffer to the user debugger. | |
| BOOLEAN | UdSendReadRegisterToUserDebugger (UINT64 ProcessDetailToken, UINT32 TargetThreadId, PDEBUGGEE_REGISTER_READ_DESCRIPTION RegDes, UINT32 RegBuffSize) |
| Send the command to the user debugger. | |
headers for user-mode debugging routines
| typedef struct _ACTIVE_DEBUGGING_PROCESS ACTIVE_DEBUGGING_PROCESS |
structures related to current thread debugging state
| typedef struct _ACTIVE_DEBUGGING_PROCESS * PACTIVE_DEBUGGING_PROCESS |
| BOOLEAN UdAttachToProcess | ( | UINT32 | TargetPid, |
| const WCHAR * | TargetFileAddress, | ||
| const WCHAR * | CommandLine, | ||
| BOOLEAN | RunCallbackAtTheFirstInstruction ) |
Attach to target process.
this function will not check whether the process id is valid or not
| TargetPid | |
| TargetFileAddress | |
| CommandLine | |
| RunCallbackAtTheFirstInstruction |
Check if a thread belongs to special process.
| Pid | Process id |
| Tid | Thread id |
| BOOLEAN UdContinueProcess | ( | UINT64 | ProcessDebuggingToken | ) |
Continue the target process.
| ProcessDebuggingToken |
Detach the target process.
this function will not check whether the process id and thread id is valid or not
| TargetPid | |
| ProcessDetailToken |
| VOID UdHandleUserDebuggerPausing | ( | PDEBUGGEE_UD_PAUSED_PACKET | PausePacket | ) |
Handle pause packets from user debugger.
| PausePacket |
| VOID UdInitializeUserDebugger | ( | ) |
initialize user debugger
this function should be called on vmx non-root
Kill the target process from kernel.
this function will not check whether the process id and thread id is valid or not
| TargetPid |
List of threads by owner process id.
| OwnerPID |
| BOOLEAN UdPauseProcess | ( | UINT64 | ProcessDebuggingToken | ) |
Pause the target process.
| ProcessDebuggingToken |
| VOID UdRemoveActiveDebuggingProcess | ( | ) |
Remove the current active debugging process (thread).
| 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.
| ProcessDetailToken | |
| ThreadId | |
| ActionType | |
| OptionalBuffer | |
| OptionalBufferSize | |
| ApplyToAllPausedThreads | |
| WaitForEventCompletion | |
| OptionalParam1 | |
| OptionalParam2 | |
| OptionalParam3 | |
| OptionalParam4 |
| BOOLEAN UdSendReadRegisterToUserDebugger | ( | UINT64 | ProcessDetailToken, |
| UINT32 | TargetThreadId, | ||
| PDEBUGGEE_REGISTER_READ_DESCRIPTION | RegDes, | ||
| UINT32 | RegBuffSize ) |
Send the command to the user debugger.
| ProcessDetailToken | |
| TargetThreadId | |
| RegDes | |
| RegBuffSize |
| BOOLEAN UdSendScriptBufferToProcess | ( | UINT64 | ProcessDetailToken, |
| UINT32 | TargetThreadId, | ||
| UINT64 | BufferAddress, | ||
| UINT32 | BufferLength, | ||
| UINT32 | Pointer, | ||
| BOOLEAN | IsFormat ) |
Send script buffer to the user debugger.
| ProcessDetailToken | |
| TargetThreadId | |
| BufferAddress | |
| BufferLength | |
| Pointer |
| BOOLEAN UdSendStepPacketToDebuggee | ( | UINT64 | ProcessDetailToken, |
| UINT32 | TargetThreadId, | ||
| DEBUGGER_REMOTE_STEPPING_REQUEST | StepType ) |
Send stepping instructions packet to user debugger.
| ProcessDetailToken | |
| TargetThreadId | |
| StepType |
| VOID UdSetActiveDebuggingProcess | ( | UINT64 | DebuggingId, |
| UINT64 | Rip, | ||
| UINT32 | ProcessId, | ||
| UINT32 | ThreadId, | ||
| BOOLEAN | Is32Bit, | ||
| BOOLEAN | IsPaused, | ||
| BYTE | InstructionBytesOnRip[] ) |
set the current active debugging process (thread)
| DebuggingId | |
| Rip | |
| ProcessId | |
| ThreadId | |
| Is32Bit | |
| InstructionBytesOnRip |
Set the active debugging thread by process id or thread id.
| TargetPidOrTid | |
| IsTid |
| BOOLEAN UdShowListActiveDebuggingProcessesAndThreads | ( | ) |
Show list of active debugging processes and threads.
| VOID UdUninitializeUserDebugger | ( | ) |
uninitialize user debugger
this function should be called on vmx non-root