|
HyperDbg Debugger
|
routines to kernel debugging More...
#include "pch.h"Functions | |
| BOOLEAN | KdCheckForTheEndOfTheBuffer (PUINT32 CurrentLoopIndex, BYTE *Buffer) |
| compares the buffer with a string | |
| BOOLEAN | KdCompareBufferWithString (CHAR *Buffer, const CHAR *CompareBuffer) |
| compares the buffer with a string | |
| BYTE | KdComputeDataChecksum (PVOID Buffer, UINT32 Length) |
| calculate the checksum of received buffer from debugger | |
| VOID | KdInterpretPausedDebuggee () |
| Interpret the packets from debuggee in the case of paused. | |
| BOOLEAN | KdSendContinuePacketToDebuggee () |
| Sends a continue or 'g' command packet to the debuggee. | |
| BOOLEAN | KdSendSwitchCorePacketToDebuggee (UINT32 NewCore) |
| Sends a change core or '~ x' command packet to the debuggee. | |
| BOOLEAN | KdSendShortCircuitingEventToDebuggee (BOOLEAN IsEnabled) |
| Sends a short-circuiting event request to debuggee. | |
| BOOLEAN | KdSendEventQueryAndModifyPacketToDebuggee (UINT64 Tag, DEBUGGER_MODIFY_EVENTS_TYPE TypeOfAction, BOOLEAN *IsEnabled) |
| Sends a query or request to enable/disable/clear for event. | |
| BOOLEAN | KdSendFlushPacketToDebuggee () |
| Send a flush request to the debuggee. | |
| BOOLEAN | KdSendCallStackPacketToDebuggee (UINT64 BaseAddress, UINT32 Size, DEBUGGER_CALLSTACK_DISPLAY_METHOD DisplayMethod, BOOLEAN Is32Bit) |
| Send a callstack request to the debuggee. | |
| BOOLEAN | KdSendTestQueryPacketToDebuggee (DEBUGGER_TEST_QUERY_STATE Type) |
| Send a test query request to the debuggee. | |
| BOOLEAN | KdSendTestQueryPacketWithContextToDebuggee (DEBUGGER_TEST_QUERY_STATE Type, UINT64 Context) |
| Send a test query request to the debuggee with the specified context. | |
| BOOLEAN | KdSendSymbolReloadPacketToDebuggee (UINT32 ProcessId) |
| Send symbol reload packet to the debuggee. | |
| BOOLEAN | KdSendReadRegisterPacketToDebuggee (PDEBUGGEE_REGISTER_READ_DESCRIPTION RegDes, UINT32 RegBuffSize) |
| Send a read register packet to the debuggee. | |
| BOOLEAN | KdSendWriteRegisterPacketToDebuggee (PDEBUGGEE_REGISTER_WRITE_DESCRIPTION RegDes) |
| Send a write register packet to the debuggee. | |
| BOOLEAN | KdSendReadMemoryPacketToDebuggee (PDEBUGGER_READ_MEMORY ReadMem, UINT32 RequestSize) |
| Send a Read memory packet to the debuggee. | |
| BOOLEAN | KdSendEditMemoryPacketToDebuggee (PDEBUGGER_EDIT_MEMORY EditMem, UINT32 Size) |
| Send an Edit memory packet to the debuggee. | |
| PDEBUGGER_EVENT_AND_ACTION_RESULT | KdSendRegisterEventPacketToDebuggee (PDEBUGGER_GENERAL_EVENT_DETAIL Event, UINT32 EventBufferLength) |
| Send a register event request to the debuggee. | |
| PDEBUGGER_EVENT_AND_ACTION_RESULT | KdSendAddActionToEventPacketToDebuggee (PDEBUGGER_GENERAL_ACTION GeneralAction, UINT32 GeneralActionLength) |
| Send an add action to event request to the debuggee. | |
| BOOLEAN | KdSendSwitchProcessPacketToDebuggee (DEBUGGEE_DETAILS_AND_SWITCH_PROCESS_TYPE ActionType, UINT32 NewPid, UINT64 NewProcess, BOOLEAN SetChangeByClockInterrupt, PDEBUGGEE_PROCESS_LIST_NEEDED_DETAILS SymDetailsForProcessList) |
| Sends a change process or show process details packet to the debuggee. | |
| BOOLEAN | KdSendSwitchThreadPacketToDebuggee (DEBUGGEE_DETAILS_AND_SWITCH_THREAD_TYPE ActionType, UINT32 NewTid, UINT64 NewThread, BOOLEAN CheckByClockInterrupt, PDEBUGGEE_THREAD_LIST_NEEDED_DETAILS SymDetailsForThreadList) |
| Sends a change thread or show threads detail packet to the debuggee. | |
| BOOLEAN | KdSendPtePacketToDebuggee (PDEBUGGER_READ_PAGE_TABLE_ENTRIES_DETAILS PtePacket) |
| Sends a PTE or '!pte' command packet to the debuggee. | |
| BOOLEAN | KdSendPageinPacketToDebuggee (PDEBUGGER_PAGE_IN_REQUEST PageinPacket) |
| Sends a page-in or '.pagein' command packet to the debuggee. | |
| BOOLEAN | KdSendVa2paAndPa2vaPacketToDebuggee (PDEBUGGER_VA2PA_AND_PA2VA_COMMANDS Va2paAndPa2vaPacket) |
| Sends VA2PA and PA2VA packest, or '!va2pa' and '!pa2va' commands packet to the debuggee. | |
| BOOLEAN | KdSendApicActionPacketsToDebuggee (PDEBUGGER_APIC_REQUEST ApicRequest, UINT32 ExpectedRequestSize) |
| Send requests for APIC packet to the debuggee. | |
| BOOLEAN | KdSendSmiPacketsToDebuggee (PSMI_OPERATION_PACKETS SmiOperationRequest, UINT32 ExpectedRequestSize) |
| Send requests for SMI operation packet to the debuggee. | |
| BOOLEAN | KdSendHyperTraceLbrdumpPacketsToDebuggee (PHYPERTRACE_LBR_DUMP_PACKETS HyperTraceLbrdumpRequest, UINT32 ExpectedRequestSize) |
| Send requests for HyperTrace LBR dump packet to the debuggee. | |
| BOOLEAN | KdSendHyperTracePtPacketsToDebuggee (PHYPERTRACE_PT_OPERATION_PACKETS HyperTracePtOperationRequest, UINT32 ExpectedRequestSize) |
| Send requests for HyperTrace PT operation packet to the debuggee. | |
| BOOLEAN | KdSendQueryIdtPacketsToDebuggee (PINTERRUPT_DESCRIPTOR_TABLE_ENTRIES_PACKETS IdtRequest) |
| Send requests for IDT packet to the debuggee. | |
| BOOLEAN | KdSendBpPacketToDebuggee (PDEBUGGEE_BP_PACKET BpPacket) |
| Sends a breakpoint set or 'bp' command packet to the debuggee. | |
| BOOLEAN | KdSendListOrModifyPacketToDebuggee (PDEBUGGEE_BP_LIST_OR_MODIFY_PACKET ListOrModifyPacket) |
| Sends a breakpoint list or modification packet to the debuggee. | |
| BOOLEAN | KdSendScriptPacketToDebuggee (UINT64 BufferAddress, UINT32 BufferLength, UINT32 Pointer, BOOLEAN IsFormat) |
| Sends a script packet to the debuggee. | |
| BOOLEAN | KdSendUserInputPacketToDebuggee (const CHAR *Sendbuf, INT Len, BOOLEAN IgnoreBreakingAgain) |
| Sends user input packet to the debuggee. | |
| BOOLEAN | KdSendSearchRequestPacketToDebuggee (UINT64 *SearchRequestBuffer, UINT32 SearchRequestBufferSize) |
| Sends search query request packet to the debuggee. | |
| BOOLEAN | KdSendStepPacketToDebuggee (DEBUGGER_REMOTE_STEPPING_REQUEST StepRequestType) |
| Sends p (step out) and t (step in) packet to the debuggee. | |
| BOOLEAN | KdSendPausePacketToDebuggee () |
| Sends a PAUSE packet to the debuggee. | |
| BOOLEAN | KdGetWindowVersion (CHAR *BufferToSave) |
| Get Windows name, version and build to send to debugger. | |
| BOOLEAN | KdReceivePacketFromDebuggee (CHAR *BufferToSave, UINT32 *LengthReceived) |
| Receive packet from the debuggee. | |
| BOOLEAN | KdReceivePacketFromDebugger (CHAR *BufferToSave, UINT32 *LengthReceived) |
| Receive packet from the debugger. | |
| BOOLEAN | KdSendPacketToDebuggee (const CHAR *Buffer, UINT32 Length, BOOLEAN SendEndOfBuffer) |
| Sends a special packet to the debuggee. | |
| BOOLEAN | KdCommandPacketToDebuggee (DEBUGGER_REMOTE_PACKET_TYPE PacketType, DEBUGGER_REMOTE_PACKET_REQUESTED_ACTION RequestedAction) |
| Sends a HyperDbg packet to the debuggee. | |
| BOOLEAN | KdCommandPacketAndBufferToDebuggee (DEBUGGER_REMOTE_PACKET_TYPE PacketType, DEBUGGER_REMOTE_PACKET_REQUESTED_ACTION RequestedAction, CHAR *Buffer, UINT32 BufferLength) |
| Sends a HyperDbg packet + a buffer to the debuggee. | |
| VOID | KdBreakControlCheckAndPauseDebugger (BOOLEAN SignalRunningFlag) |
| check if the debuggee needs to be paused | |
| VOID | KdSetStatusAndWaitForPause () |
| Set the status of the debuggee to wait for the pause. | |
| VOID | KdBreakControlCheckAndContinueDebugger () |
| check if the debuggee needs to be continued | |
| BOOLEAN | KdSendResponseOfThePingPacket () |
| Respond to the debuggee with the version and build date of the debugger. | |
| VOID | KdTheRemoteSystemIsRunning () |
| wait for a event to be triggered and if the debuggee is running it just halts the system | |
| BOOLEAN | KdPrepareSerialConnectionToRemoteSystem (HANDLE SerialHandle, BOOLEAN IsNamedPipe, BOOLEAN PauseAfterConnection) |
| Prepare serial to connect to the remote server. | |
| BOOLEAN | KdCheckIfDebuggerIsListening (HANDLE ComPortHandle) |
| Check and handshake to make sure if the remote debugger is listening. | |
| BOOLEAN | KdPrepareAndConnectDebugPort (const CHAR *PortName, DWORD Baudrate, UINT32 Port, BOOLEAN IsPreparing, BOOLEAN IsNamedPipe, BOOLEAN PauseAfterConnection) |
| Prepare and initialize COM port. | |
| BOOLEAN | KdSendGeneralBuffersFromDebuggeeToDebugger (DEBUGGER_REMOTE_PACKET_REQUESTED_ACTION RequestedAction, PVOID Buffer, UINT32 BufferLength, BOOLEAN PauseDebuggeeWhenSent) |
| Send general buffer from debuggee to debugger. | |
| BOOLEAN | KdReloadSymbolsInDebuggee (BOOLEAN PauseDebuggee, UINT32 UserProcessId) |
| Send the packets of reloading symbols to build a new symbol table to the debugger and send the finished packet to the debugger. | |
| BOOLEAN | KdCloseConnection () |
| Send close packet to the debuggee and debugger. | |
| BOOLEAN | KdRegisterEventInDebuggee (PDEBUGGER_GENERAL_EVENT_DETAIL EventRegBuffer, UINT32 Length) |
| Register an event in the debuggee. | |
| BOOLEAN | KdAddActionToEventInDebuggee (PDEBUGGER_GENERAL_ACTION ActionAddingBuffer, UINT32 Length) |
| Add action to an event in the debuggee. | |
| BOOLEAN | KdSendModifyEventInDebuggee (PDEBUGGER_MODIFY_EVENTS ModifyEvent, BOOLEAN SendTheResultBackToDebugger) |
| Modify the event ioctl in the debuggee. | |
| VOID | KdHandleUserInputInDebuggee (DEBUGGEE_USER_INPUT_PACKET *Descriptor) |
| Handle user-input in debuggee. | |
| VOID | KdSendUsermodePrints (CHAR *Input, UINT32 Length) |
| Send result of user-mode ShowMessages to debuggee. | |
| VOID | KdSendSymbolDetailPacket (PMODULE_SYMBOL_DETAIL SymbolDetailPacket, UINT32 CurrentSymbolInfoIndex, UINT32 TotalSymbols) |
| Send each packet of debugging information (PDB) to the debugger. | |
| VOID | KdUninitializeConnection () |
| Uninitialize everything in both debuggee and debugger. | |
| BOOLEAN | KdSendPcitreePacketToDebuggee (PDEBUGGEE_PCITREE_REQUEST_RESPONSE_PACKET PcitreePacket) |
| Sends '!pcitree' command, including buffer, to the debuggee. | |
| BOOLEAN | KdSendPcidevinfoPacketToDebuggee (PDEBUGGEE_PCIDEVINFO_REQUEST_RESPONSE_PACKET PciepinfoPacket) |
| Request PCI device info (CAM). Current consumers include '!pcicam'. | |
Variables | |
| HANDLE | g_SerialListeningThreadHandle |
| In debuggee and debugger, we save the handle of the user-mode listening thread for pauses here. | |
| HANDLE | g_SerialRemoteComPortHandle |
| In debugger (not debuggee), we save the handle of the user-mode listening thread for remote system here. | |
| HANDLE | g_DebuggeeStopCommandEventHandle |
| An event to make sure that the user won't give any command in debuggee and all the commands are coming from just the debugger. | |
| DEBUGGER_SYNCRONIZATION_EVENTS_STATE | g_KernelSyncronizationObjectsHandleTable [DEBUGGER_MAXIMUM_SYNCRONIZATION_KERNEL_DEBUGGER_OBJECTS] |
| In debugger (not debuggee), we save the handle of the user-mode listening thread for pauses here for kernel debugger. | |
| BYTE | g_CurrentRunningInstruction [MAXIMUM_INSTR_SIZE] |
| Current executing instructions. | |
| BOOLEAN | g_IsConnectedToHyperDbgLocally |
| Shows whether the user is allowed to use 'load' command to load modules locally in VMI (virtual machine introspection) mode. | |
| DEBUGGER_EVENT_AND_ACTION_RESULT | g_DebuggeeResultOfRegisteringEvent |
| Holds the result of registering events from the remote debuggee. | |
| DEBUGGER_EVENT_AND_ACTION_RESULT | g_DebuggeeResultOfAddingActionsToEvent |
| Holds the result of adding action to events from the remote debuggee. | |
| BOOLEAN | g_IsSerialConnectedToRemoteDebuggee |
| Shows if the debugger was connected to remote debuggee over (A remote guest). | |
| BOOLEAN | g_IsSerialConnectedToRemoteDebugger |
| Shows if the debugger was connected to remote debugger (A remote host). | |
| BOOLEAN | g_IsDebuggerConntectedToNamedPipe |
| Shows if the debugger is connected to the guest using named pipe. | |
| BOOLEAN | g_IsDebuggeeRunning |
| Shows if the debuggee is running or not. | |
| BOOLEAN | g_IsKdModuleLoaded |
| shows whether the kernel debugger (KD) module is loaded or not | |
| BOOLEAN | g_IsVmmModuleLoaded |
| shows whether the VMM module is loaded or not | |
| BOOLEAN | g_SerialConnectionAlreadyClosed |
| In both debuggee and debugger we save the state of the closed connection to avoid double close. | |
| BOOLEAN | g_IgnoreNewLoggingMessages |
| Shows if the debugger should show debuggee's messages or not. | |
| BOOLEAN | g_SharedEventStatus |
| This is an OVERLAPPED structure for managing simultaneous read and writes for debugger (in current design debuggee is not needed to write simultaneously but it's needed for write). | |
| BOOLEAN | g_IsRunningInstruction32Bit |
| whether the Current executing instructions is 32-bit or 64 bit | |
| BOOLEAN | g_IgnorePauseRequests |
| Show whether the pause request (CTRL+C or CTRL+BREAK) should be ignored or not. | |
| BOOLEAN | g_IsDebuggeeInHandshakingPhase |
| Shows if the debuggee is in the handshake phase or not. | |
| BOOLEAN | g_ShouldPreviousCommandBeContinued |
| Shows whether the previous command should be continued or not. | |
| BYTE | g_EndOfBufferCheckSerial [4] |
| the buffer that we set at the end of buffers for serial | |
| ULONG | g_CurrentRemoteCore |
| Current core that the debuggee is debugging. | |
routines to kernel debugging
| BOOLEAN KdAddActionToEventInDebuggee | ( | PDEBUGGER_GENERAL_ACTION | ActionAddingBuffer, |
| UINT32 | Length ) |
Add action to an event in the debuggee.
| ActionAddingBuffer | |
| Length |
| VOID KdBreakControlCheckAndContinueDebugger | ( | ) |
check if the debuggee needs to be continued
| VOID KdBreakControlCheckAndPauseDebugger | ( | BOOLEAN | SignalRunningFlag | ) |
check if the debuggee needs to be paused
| SignalRunningFlag |
compares the buffer with a string
| CurrentLoopIndex | Number of previously read bytes |
| Buffer |
| BOOLEAN KdCheckIfDebuggerIsListening | ( | HANDLE | ComPortHandle | ) |
Check and handshake to make sure if the remote debugger is listening.
| ComPortHandle |
| BOOLEAN KdCloseConnection | ( | ) |
Send close packet to the debuggee and debugger.
This function close the connection in both debuggee and debugger both of the debuggee and debugger can use this function
| BOOLEAN KdCommandPacketAndBufferToDebuggee | ( | DEBUGGER_REMOTE_PACKET_TYPE | PacketType, |
| DEBUGGER_REMOTE_PACKET_REQUESTED_ACTION | RequestedAction, | ||
| CHAR * | Buffer, | ||
| UINT32 | BufferLength ) |
Sends a HyperDbg packet + a buffer to the debuggee.
| RequestedAction | |
| Buffer | |
| BufferLength |
| BOOLEAN KdCommandPacketToDebuggee | ( | DEBUGGER_REMOTE_PACKET_TYPE | PacketType, |
| DEBUGGER_REMOTE_PACKET_REQUESTED_ACTION | RequestedAction ) |
Sends a HyperDbg packet to the debuggee.
| RequestedAction |
calculate the checksum of received buffer from debugger
| Buffer | |
| LengthReceived |
Get Windows name, version and build to send to debugger.
| BufferToSave |
| VOID KdHandleUserInputInDebuggee | ( | DEBUGGEE_USER_INPUT_PACKET * | Descriptor | ) |
Handle user-input in debuggee.
| Descriptor |
| VOID KdInterpretPausedDebuggee | ( | ) |
Interpret the packets from debuggee in the case of paused.
| BOOLEAN KdPrepareAndConnectDebugPort | ( | const CHAR * | PortName, |
| DWORD | Baudrate, | ||
| UINT32 | Port, | ||
| BOOLEAN | IsPreparing, | ||
| BOOLEAN | IsNamedPipe, | ||
| BOOLEAN | PauseAfterConnection ) |
Prepare and initialize COM port.
| PortName | |
| Baudrate | |
| Port | |
| IsPreparing | |
| IsNamedPipe | |
| PauseAfterConnection |
| BOOLEAN KdPrepareSerialConnectionToRemoteSystem | ( | HANDLE | SerialHandle, |
| BOOLEAN | IsNamedPipe, | ||
| BOOLEAN | PauseAfterConnection ) |
Prepare serial to connect to the remote server.
wait to connect to debuggee (this is debugger)
| SerialHandle | |
| IsNamedPipe | |
| PauseAfterConnection |
Receive packet from the debuggee.
| BufferToSave | |
| LengthReceived |
Receive packet from the debugger.
| BufferToSave | |
| LengthReceived |
| BOOLEAN KdRegisterEventInDebuggee | ( | PDEBUGGER_GENERAL_EVENT_DETAIL | EventRegBuffer, |
| UINT32 | Length ) |
Register an event in the debuggee.
| EventRegBuffer | |
| Length |
Send the packets of reloading symbols to build a new symbol table to the debugger and send the finished packet to the debugger.
| PauseDebuggee | |
| UserProcessId |
| PDEBUGGER_EVENT_AND_ACTION_RESULT KdSendAddActionToEventPacketToDebuggee | ( | PDEBUGGER_GENERAL_ACTION | GeneralAction, |
| UINT32 | GeneralActionLength ) |
Send an add action to event request to the debuggee.
as this command uses one global variable to transfer the buffers so should not be called simultaneously
| GeneralAction | |
| GeneralActionLength |
| BOOLEAN KdSendApicActionPacketsToDebuggee | ( | PDEBUGGER_APIC_REQUEST | ApicRequest, |
| UINT32 | ExpectedRequestSize ) |
Send requests for APIC packet to the debuggee.
| ApicPage | |
| ExpectedRequestSize |
| BOOLEAN KdSendBpPacketToDebuggee | ( | PDEBUGGEE_BP_PACKET | BpPacket | ) |
Sends a breakpoint set or 'bp' command packet to the debuggee.
| BpPacket |
| BOOLEAN KdSendCallStackPacketToDebuggee | ( | UINT64 | BaseAddress, |
| UINT32 | Size, | ||
| DEBUGGER_CALLSTACK_DISPLAY_METHOD | DisplayMethod, | ||
| BOOLEAN | Is32Bit ) |
Send a callstack request to the debuggee.
| BaseAddress | |
| Size | |
| DisplayMethod | |
| Is32Bit |
| BOOLEAN KdSendContinuePacketToDebuggee | ( | ) |
Sends a continue or 'g' command packet to the debuggee.
| BOOLEAN KdSendEditMemoryPacketToDebuggee | ( | PDEBUGGER_EDIT_MEMORY | EditMem, |
| UINT32 | Size ) |
Send an Edit memory packet to the debuggee.
| EditMem | |
| Size |
| BOOLEAN KdSendEventQueryAndModifyPacketToDebuggee | ( | UINT64 | Tag, |
| DEBUGGER_MODIFY_EVENTS_TYPE | TypeOfAction, | ||
| BOOLEAN * | IsEnabled ) |
Sends a query or request to enable/disable/clear for event.
if IsQueryState is TRUE then TypeOfAction is ignored
| Tag | |
| TypeOfAction | |
| IsEnabled | If it's a query state then this argument can be used |
| BOOLEAN KdSendFlushPacketToDebuggee | ( | ) |
Send a flush request to the debuggee.
| BOOLEAN KdSendGeneralBuffersFromDebuggeeToDebugger | ( | DEBUGGER_REMOTE_PACKET_REQUESTED_ACTION | RequestedAction, |
| PVOID | Buffer, | ||
| UINT32 | BufferLength, | ||
| BOOLEAN | PauseDebuggeeWhenSent ) |
Send general buffer from debuggee to debugger.
| RequestedAction | |
| Buffer | |
| Length | |
| PauseDebuggeeWhenSent |
| BOOLEAN KdSendHyperTraceLbrdumpPacketsToDebuggee | ( | PHYPERTRACE_LBR_DUMP_PACKETS | HyperTraceLbrdumpRequest, |
| UINT32 | ExpectedRequestSize ) |
Send requests for HyperTrace LBR dump packet to the debuggee.
| HyperTraceLbrdumpRequest |
| BOOLEAN KdSendHyperTracePtPacketsToDebuggee | ( | PHYPERTRACE_PT_OPERATION_PACKETS | HyperTracePtOperationRequest, |
| UINT32 | ExpectedRequestSize ) |
Send requests for HyperTrace PT operation packet to the debuggee.
| HyperTracePtOperationRequest |
| BOOLEAN KdSendListOrModifyPacketToDebuggee | ( | PDEBUGGEE_BP_LIST_OR_MODIFY_PACKET | ListOrModifyPacket | ) |
Sends a breakpoint list or modification packet to the debuggee.
| ListOrModifyPacket |
| BOOLEAN KdSendModifyEventInDebuggee | ( | PDEBUGGER_MODIFY_EVENTS | ModifyEvent, |
| BOOLEAN | SendTheResultBackToDebugger ) |
Modify the event ioctl in the debuggee.
| ModifyEvent | |
| SendTheResultBackToDebugger |
Sends a special packet to the debuggee.
| Buffer | |
| Length |
| BOOLEAN KdSendPageinPacketToDebuggee | ( | PDEBUGGER_PAGE_IN_REQUEST | PageinPacket | ) |
Sends a page-in or '.pagein' command packet to the debuggee.
| PageinPacket |
| BOOLEAN KdSendPausePacketToDebuggee | ( | ) |
Sends a PAUSE packet to the debuggee.
| BOOLEAN KdSendPcidevinfoPacketToDebuggee | ( | PDEBUGGEE_PCIDEVINFO_REQUEST_RESPONSE_PACKET | PciepinfoPacket | ) |
Request PCI device info (CAM). Current consumers include '!pcicam'.
| PciepinfoPacket |
| BOOLEAN KdSendPcitreePacketToDebuggee | ( | PDEBUGGEE_PCITREE_REQUEST_RESPONSE_PACKET | PcitreePacket | ) |
Sends '!pcitree' command, including buffer, to the debuggee.
| PcitreePacket |
| BOOLEAN KdSendPtePacketToDebuggee | ( | PDEBUGGER_READ_PAGE_TABLE_ENTRIES_DETAILS | PtePacket | ) |
Sends a PTE or '!pte' command packet to the debuggee.
| PtePacket |
| BOOLEAN KdSendQueryIdtPacketsToDebuggee | ( | PINTERRUPT_DESCRIPTOR_TABLE_ENTRIES_PACKETS | IdtRequest | ) |
Send requests for IDT packet to the debuggee.
| IdtRequest |
| BOOLEAN KdSendReadMemoryPacketToDebuggee | ( | PDEBUGGER_READ_MEMORY | ReadMem, |
| UINT32 | RequestSize ) |
Send a Read memory packet to the debuggee.
| ReadMem | |
| Size |
| BOOLEAN KdSendReadRegisterPacketToDebuggee | ( | PDEBUGGEE_REGISTER_READ_DESCRIPTION | RegDes, |
| UINT32 | RegBuffSize ) |
Send a read register packet to the debuggee.
| RegDes | |
| RegBuffSize |
| PDEBUGGER_EVENT_AND_ACTION_RESULT KdSendRegisterEventPacketToDebuggee | ( | PDEBUGGER_GENERAL_EVENT_DETAIL | Event, |
| UINT32 | EventBufferLength ) |
Send a register event request to the debuggee.
as this command uses one global variable to transfer the buffers so should not be called simultaneously
| Event | |
| EventBufferLength |
| BOOLEAN KdSendResponseOfThePingPacket | ( | ) |
Respond to the debuggee with the version and build date of the debugger.
| BOOLEAN KdSendScriptPacketToDebuggee | ( | UINT64 | BufferAddress, |
| UINT32 | BufferLength, | ||
| UINT32 | Pointer, | ||
| BOOLEAN | IsFormat ) |
Sends a script packet to the debuggee.
| BufferAddress | |
| BufferLength | |
| Pointer | |
| IsFormat |
| BOOLEAN KdSendSearchRequestPacketToDebuggee | ( | UINT64 * | SearchRequestBuffer, |
| UINT32 | SearchRequestBufferSize ) |
Sends search query request packet to the debuggee.
| SearchRequestBuffer | |
| SearchRequestBufferSize |
Sends a short-circuiting event request to debuggee.
| IsEnabled |
| BOOLEAN KdSendSmiPacketsToDebuggee | ( | PSMI_OPERATION_PACKETS | SmiOperationRequest, |
| UINT32 | ExpectedRequestSize ) |
Send requests for SMI operation packet to the debuggee.
| SmiOperationRequest |
| BOOLEAN KdSendStepPacketToDebuggee | ( | DEBUGGER_REMOTE_STEPPING_REQUEST | StepRequestType | ) |
Sends p (step out) and t (step in) packet to the debuggee.
Sends a change core or '~ x' command packet to the debuggee.
| BOOLEAN KdSendSwitchProcessPacketToDebuggee | ( | DEBUGGEE_DETAILS_AND_SWITCH_PROCESS_TYPE | ActionType, |
| UINT32 | NewPid, | ||
| UINT64 | NewProcess, | ||
| BOOLEAN | SetChangeByClockInterrupt, | ||
| PDEBUGGEE_PROCESS_LIST_NEEDED_DETAILS | SymDetailsForProcessList ) |
Sends a change process or show process details packet to the debuggee.
| ActionType | |
| NewPid | |
| NewProcess | |
| SetChangeByClockInterrupt | |
| SymDetailsForProcessList |
| BOOLEAN KdSendSwitchThreadPacketToDebuggee | ( | DEBUGGEE_DETAILS_AND_SWITCH_THREAD_TYPE | ActionType, |
| UINT32 | NewTid, | ||
| UINT64 | NewThread, | ||
| BOOLEAN | CheckByClockInterrupt, | ||
| PDEBUGGEE_THREAD_LIST_NEEDED_DETAILS | SymDetailsForThreadList ) |
Sends a change thread or show threads detail packet to the debuggee.
| ActionType | |
| NewTid | |
| NewThread | |
| CheckByClockInterrupt | |
| SymDetailsForThreadList |
| VOID KdSendSymbolDetailPacket | ( | PMODULE_SYMBOL_DETAIL | SymbolDetailPacket, |
| UINT32 | CurrentSymbolInfoIndex, | ||
| UINT32 | TotalSymbols ) |
Send each packet of debugging information (PDB) to the debugger.
| SymbolDetailPacket | |
| CurrentSymbolInfoIndex | |
| TotalSymbols |
Send symbol reload packet to the debuggee.
| BOOLEAN KdSendTestQueryPacketToDebuggee | ( | DEBUGGER_TEST_QUERY_STATE | Type | ) |
Send a test query request to the debuggee.
| Type |
| BOOLEAN KdSendTestQueryPacketWithContextToDebuggee | ( | DEBUGGER_TEST_QUERY_STATE | Type, |
| UINT64 | Context ) |
Send a test query request to the debuggee with the specified context.
| Type | |
| Context |
| BOOLEAN KdSendUserInputPacketToDebuggee | ( | const CHAR * | Sendbuf, |
| INT | Len, | ||
| BOOLEAN | IgnoreBreakingAgain ) |
Sends user input packet to the debuggee.
| Sendbuf | |
| Len | |
| IgnoreBreakingAgain |
Send result of user-mode ShowMessages to debuggee.
| Input | |
| Length |
| BOOLEAN KdSendVa2paAndPa2vaPacketToDebuggee | ( | PDEBUGGER_VA2PA_AND_PA2VA_COMMANDS | Va2paAndPa2vaPacket | ) |
Sends VA2PA and PA2VA packest, or '!va2pa' and '!pa2va' commands packet to the debuggee.
| Va2paAndPa2vaPacket |
| BOOLEAN KdSendWriteRegisterPacketToDebuggee | ( | PDEBUGGEE_REGISTER_WRITE_DESCRIPTION | RegDes | ) |
Send a write register packet to the debuggee.
| RegDes |
| VOID KdSetStatusAndWaitForPause | ( | ) |
Set the status of the debuggee to wait for the pause.
| VOID KdTheRemoteSystemIsRunning | ( | ) |
wait for a event to be triggered and if the debuggee is running it just halts the system
| VOID KdUninitializeConnection | ( | ) |
Uninitialize everything in both debuggee and debugger.
This function close the connection in both debuggee and debugger both of the debuggee and debugger can use this function
|
extern |
Current core that the debuggee is debugging.
|
extern |
Current executing instructions.
|
extern |
Holds the result of adding action to events from the remote debuggee.
|
extern |
Holds the result of registering events from the remote debuggee.
|
extern |
An event to make sure that the user won't give any command in debuggee and all the commands are coming from just the debugger.
|
extern |
the buffer that we set at the end of buffers for serial
|
extern |
Shows if the debugger should show debuggee's messages or not.
|
extern |
Show whether the pause request (CTRL+C or CTRL+BREAK) should be ignored or not.
|
extern |
Shows whether the user is allowed to use 'load' command to load modules locally in VMI (virtual machine introspection) mode.
|
extern |
Shows if the debuggee is in the handshake phase or not.
|
extern |
Shows if the debuggee is running or not.
|
extern |
Shows if the debugger is connected to the guest using named pipe.
|
extern |
shows whether the kernel debugger (KD) module is loaded or not
|
extern |
whether the Current executing instructions is 32-bit or 64 bit
|
extern |
Shows if the debugger was connected to remote debuggee over (A remote guest).
|
extern |
Shows if the debugger was connected to remote debugger (A remote host).
|
extern |
shows whether the VMM module is loaded or not
|
extern |
In debugger (not debuggee), we save the handle of the user-mode listening thread for pauses here for kernel debugger.
|
extern |
In both debuggee and debugger we save the state of the closed connection to avoid double close.
|
extern |
In debuggee and debugger, we save the handle of the user-mode listening thread for pauses here.
|
extern |
In debugger (not debuggee), we save the handle of the user-mode listening thread for remote system here.
|
extern |
This is an OVERLAPPED structure for managing simultaneous read and writes for debugger (in current design debuggee is not needed to write simultaneously but it's needed for write).
Shows whether the queried event is enabled or disabled
|
extern |
Shows whether the previous command should be continued or not.