Initialize the VMM and Debugger.
20{
23
24
25
26
28
29
30
31
35
36
37
38
43
44
45
46
55
56
57
58
68
69
70
71
73
74
75
76
78 {
79
80
81
83 {
84 LogDebugInfo(
"HyperDbg's hypervisor loaded successfully");
85
86
87
88
90 {
92
93
94
95
97
99 }
100 else
101 {
102 LogError(
"Err, HyperDbg's debugger was not loaded");
103 }
104 }
105 else
106 {
107 LogError(
"Err, HyperDbg's hypervisor was not loaded");
108 }
109 }
110 else
111 {
112 LogError(
"Err, HyperDbg's message tracing module was not loaded");
113 }
114
115
116
117
119
121}
BOOLEAN AttachingHandleCr3VmexitsForThreadInterception(UINT32 CoreId, CR3_TYPE NewCr3)
Handle the cr3 vm-exits for thread interception.
Definition Attaching.c:1036
BOOLEAN AttachingCheckPageFaultsWithUserDebugger(UINT32 CoreId, UINT64 Address, UINT32 PageFaultErrorCode)
Check page-faults with user-debugger.
Definition Attaching.c:621
BOOLEAN AttachingCheckUnhandledEptViolation(UINT32 CoreId, UINT64 ViolationQualification, UINT64 GuestPhysicalAddr)
handling unhandled EPT violations
Definition Attaching.c:1102
#define TRUE
Definition BasicTypes.h:55
#define FALSE
Definition BasicTypes.h:54
BOOLEAN BreakpointHandleBreakpoints(UINT32 CoreId)
Handle breakpoint vm-exits (#BP)
Definition BreakpointCommands.c:685
BOOLEAN BreakpointCheckAndHandleDebugBreakpoint(UINT32 CoreId)
Check and handle debug breakpoint exceptions.
Definition BreakpointCommands.c:238
BOOLEAN BreakpointCheckAndHandleReApplyingBreakpoint(UINT32 CoreId)
Check and reapply breakpoint.
Definition BreakpointCommands.c:442
BOOLEAN LogCallbackSendMessageToQueue(UINT32 OperationCode, BOOLEAN IsImmediateMessage, CHAR *LogMessage, UINT32 BufferLen, BOOLEAN Priority)
routines callback for sending message to queue
Definition Callback.c:71
BOOLEAN LogCallbackCheckIfBufferIsFull(BOOLEAN Priority)
routines callback for checking if buffer is full
Definition Callback.c:100
BOOLEAN LogCallbackSendBuffer(_In_ UINT32 OperationCode, _In_reads_bytes_(BufferLength) PVOID Buffer, _In_ UINT32 BufferLength, _In_ BOOLEAN Priority)
routines callback for sending buffer
Definition Callback.c:123
BOOLEAN DebuggerInitialize()
Initialize Debugger Structures and Routines.
Definition Debugger.c:56
VMM_CALLBACK_TRIGGERING_EVENT_STATUS_TYPE DebuggerTriggerEvents(VMM_EVENT_TYPE_ENUM EventType, VMM_CALLBACK_EVENT_CALLING_STAGE_TYPE CallingStage, PVOID Context, BOOLEAN *PostEventRequired, GUEST_REGS *Regs)
Trigger events of a special type to be managed by debugger.
Definition Debugger.c:1110
VOID DebuggerSetLastError(UINT32 LastError)
Debugger set the last error.
Definition Debugger.c:44
BOOLEAN DebuggerCheckProcessOrThreadChange(_In_ UINT32 CoreId)
Handle process or thread switches.
Definition DebuggerEvents.c:114
BOOLEAN DebuggerVmcallHandler(UINT32 CoreId, UINT64 VmcallNumber, UINT64 OptionalParam1, UINT64 OptionalParam2, UINT64 OptionalParam3)
Termination function for external-interrupts.
Definition DebuggerVmcalls.c:27
BOOLEAN VmFuncVmxGetCurrentExecutionMode()
Get the current VMX operation state.
Definition Export.c:552
BOOLEAN VmFuncInitVmm(VMM_CALLBACKS *VmmCallbacks)
Initializes hypervisor.
Definition Export.c:530
#define LogDebugInfo(format,...)
Log, initialize boot information and debug information.
Definition HyperDbgHyperLogIntrinsics.h:155
#define LogError(format,...)
Log in the case of error.
Definition HyperDbgHyperLogIntrinsics.h:113
BOOLEAN KdCheckImmediateMessagingMechanism(UINT32 OperationCode)
Checks whether the immediate messaging mechism is needed or not.
Definition Kd.c:120
_Use_decl_annotations_ VOID KdHandleRegisteredMtfCallback(UINT32 CoreId)
Handle #DBs and #BPs for kernel debugger.
Definition Kd.c:1143
VOID KdHandleNmiBroadcastDebugBreaks(UINT32 CoreId, BOOLEAN IsOnVmxNmiHandler)
Handle broadcast NMIs for halting cores in vmx-root mode.
Definition Kd.c:1062
_Use_decl_annotations_ BOOLEAN KdCheckAndHandleNmiCallback(UINT32 CoreId)
Handle NMI vm-exits.
Definition Kd.c:1322
_Use_decl_annotations_ BOOLEAN KdLoggingResponsePacketToDebugger(CHAR *OptionalBuffer, UINT32 OptionalBufferLength, UINT32 OperationCode)
Sends a HyperDbg logging response packet to the debugger.
Definition Kd.c:372
BOOLEAN KdQueryDebuggerQueryThreadOrProcessTracingDetailsByCoreId(UINT32 CoreId, DEBUGGER_THREAD_PROCESS_TRACING TracingType)
Query for process/thread interception status.
Definition Kd.c:219
BOOLEAN LogInitialize(MESSAGE_TRACING_CALLBACKS *MsgTracingCallbacks)
Initialize the buffer relating to log message tracing.
Definition Logging.c:98
BOOLEAN LogCallbackPrepareAndSendMessageToQueueWrapper(UINT32 OperationCode, BOOLEAN IsImmediateMessage, BOOLEAN ShowCurrentSystemTime, BOOLEAN Priority, const char *Fmt, va_list ArgList)
Prepare a printf-style message mapping and send string messages and tracing for logging and monitorin...
Definition Logging.c:976
VOID ProcessTriggerCr3ProcessChange(UINT32 CoreId)
handle process changes for cr3 registers
Definition Process.c:22
BOOLEAN TerminateQueryDebuggerResource(UINT32 CoreId, PROTECTED_HV_RESOURCES_TYPE ResourceType, PVOID Context, PROTECTED_HV_RESOURCES_PASSING_OVERS PassOver)
Termination query state of debugger.
Definition Termination.c:1713
BOOLEAN UdCheckForCommand()
Check for the user-mode commands.
Definition Ud.c:257
BOOLEAN UserAccessCheckForLoadedModuleDetails(UINT32 CoreId)
Checks whether the loaded module is available or not.
Definition UserAccess.c:854
Prototype of each function needed by message tracer.
Definition HyperLog.h:49
SEND_IMMEDIATE_MESSAGE SendImmediateMessage
Definition HyperLog.h:52
CHECK_IMMEDIATE_MESSAGE_SENDING CheckImmediateMessageSending
Definition HyperLog.h:51
CHECK_VMX_OPERATION VmxOperationCheck
Definition HyperLog.h:50
Prototype of each function needed by VMM module.
Definition VMM.h:181
BREAKPOINT_CHECK_AND_HANDLE_REAPPLYING_BREAKPOINT BreakpointCheckAndHandleReApplyingBreakpoint
Definition VMM.h:216
DEBUGGING_CALLBACK_HANDLE_DEBUG_BREAKPOINT_EXCEPTION DebuggingCallbackHandleDebugBreakpointException
Definition VMM.h:205
INTERCEPTION_CALLBACK_TRIGGER_CLOCK_AND_IPI DebuggerCheckProcessOrThreadChange
Definition VMM.h:220
DEBUGGING_CALLBACK_CONDITIONAL_PAGE_FAULT_EXCEPTION DebuggingCallbackConditionalPageFaultException
Definition VMM.h:206
VMM_CALLBACK_NMI_BROADCAST_REQUEST_HANDLER VmmCallbackNmiBroadcastRequestHandler
Definition VMM.h:196
LOG_CALLBACK_SEND_BUFFER LogCallbackSendBuffer
Definition VMM.h:187
VMM_CALLBACK_VMCALL_HANDLER VmmCallbackVmcallHandler
Definition VMM.h:195
VMM_CALLBACK_REGISTERED_MTF_HANDLER VmmCallbackRegisteredMtfHandler
Definition VMM.h:219
LOG_CALLBACK_CHECK_IF_BUFFER_IS_FULL LogCallbackCheckIfBufferIsFull
Definition VMM.h:188
VMM_CALLBACK_SET_LAST_ERROR VmmCallbackSetLastError
Definition VMM.h:194
LOG_CALLBACK_PREPARE_AND_SEND_MESSAGE_TO_QUEUE LogCallbackPrepareAndSendMessageToQueueWrapper
Definition VMM.h:185
LOG_CALLBACK_SEND_MESSAGE_TO_QUEUE LogCallbackSendMessageToQueue
Definition VMM.h:186
INTERCEPTION_CALLBACK_TRIGGER_CR3_CHANGE InterceptionCallbackTriggerCr3ProcessChange
Definition VMM.h:211
VMM_CALLBACK_RESTORE_EPT_STATE VmmCallbackRestoreEptState
Definition VMM.h:198
ATTACHING_HANDLE_CR3_EVENTS_FOR_THREAD_INTERCEPTION AttachingHandleCr3VmexitsForThreadInterception
Definition VMM.h:221
VMM_CALLBACK_CHECK_UNHANDLED_EPT_VIOLATION VmmCallbackCheckUnhandledEptViolations
Definition VMM.h:199
UD_CHECK_FOR_COMMAND UdCheckForCommand
Definition VMM.h:217
KD_CHECK_AND_HANDLE_NMI_CALLBACK KdCheckAndHandleNmiCallback
Definition VMM.h:218
DEBUGGING_CALLBACK_HANDLE_BREAKPOINT_EXCEPTION DebuggingCallbackHandleBreakpointException
Definition VMM.h:204
VMM_CALLBACK_TRIGGER_EVENTS VmmCallbackTriggerEvents
Definition VMM.h:193
KD_QUERY_DEBUGGER_THREAD_OR_PROCESS_TRACING_DETAILS_BY_CORE_ID KdQueryDebuggerQueryThreadOrProcessTracingDetailsByCoreId
Definition VMM.h:222
VMM_CALLBACK_QUERY_TERMINATE_PROTECTED_RESOURCE VmmCallbackQueryTerminateProtectedResource
Definition VMM.h:197