HyperDbg Debugger
|
Implementation of debugger functions for terminating events. More...
#include "pch.h"
Functions | |
VOID | TerminateExternalInterruptEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for external-interrupts. | |
VOID | TerminateHiddenHookReadAndWriteAndExecuteEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for hidden hook read/write/execute. | |
VOID | TerminateHiddenHookExecCcEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for hidden hook (hidden breakpoints) | |
VOID | TerminateHiddenHookExecDetoursEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for hidden hook (detours) | |
VOID | TerminateRdmsrExecutionEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for msr read events. | |
VOID | TerminateWrmsrExecutionEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for msr write events. | |
VOID | TerminateExceptionEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for exception events. | |
VOID | TerminateInInstructionExecutionEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for IN instruction events. | |
VOID | TerminateOutInstructionExecutionEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for OUT Instructions events. | |
VOID | TerminateVmcallExecutionEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for VMCALL Instruction events. | |
VOID | TerminateExecTrapModeChangedEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for user-mode, kernel-mode exec trap events. | |
VOID | TerminateCpuidExecutionEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for CPUID Instruction events. | |
VOID | TerminateTscEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for RDTSC/RDTSCP Instruction events. | |
VOID | TerminatePmcEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for RDPMC Instruction events. | |
VOID | TerminateControlRegistersEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for MOV to control registers events. | |
VOID | TerminateDebugRegistersEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for MOV to debug registers events. | |
VOID | TerminateSyscallHookEferEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for SYSCALL Instruction events. | |
VOID | TerminateSysretHookEferEvent (PDEBUGGER_EVENT Event, BOOLEAN InputFromVmxRoot) |
Termination function for SYSRET Instruction events. | |
BOOLEAN | TerminateQueryDebuggerResourceExceptionBitmap (UINT32 CoreId, UINT32 *BitmapMask, PROTECTED_HV_RESOURCES_PASSING_OVERS PassOver) |
Check and modify state of exception bitmap. | |
BOOLEAN | TerminateQueryDebuggerResourceExternalInterruptExiting (UINT32 CoreId, PROTECTED_HV_RESOURCES_PASSING_OVERS PassOver) |
Check and modify state of external interrupt exiting. | |
BOOLEAN | TerminateQueryDebuggerResourceTscExiting (UINT32 CoreId, PROTECTED_HV_RESOURCES_PASSING_OVERS PassOver) |
Check and modify state of TSC exiting. | |
BOOLEAN | TerminateQueryDebuggerResourceMov2DebugRegExiting (UINT32 CoreId, PROTECTED_HV_RESOURCES_PASSING_OVERS PassOver) |
Check and modify state of mov 2 debug regs exiting. | |
BOOLEAN | TerminateQueryDebuggerResourceMovControlRegsExiting (UINT32 CoreId, PROTECTED_HV_RESOURCES_PASSING_OVERS PassOver) |
Check and modify state of move to control register exiting. | |
BOOLEAN | TerminateQueryDebuggerResourceMovToCr3Exiting (UINT32 CoreId, PROTECTED_HV_RESOURCES_PASSING_OVERS PassOver) |
Check and modify state of move to cr3 control register exiting. | |
BOOLEAN | TerminateEptHookUnHookSingleAddressFromVmxRootAndApplyInvalidation (UINT64 VirtualAddress, UINT64 PhysAddress) |
Remove single hook from the hooked pages list and invalidate TLB. | |
BOOLEAN | TerminateEptHookUnHookAllHooksByHookingTagFromVmxRootAndApplyInvalidation (UINT64 HookingTag) |
Remove all hooks from the hooked pages list and invalidate TLB using hooking tag. | |
BOOLEAN | TerminateQueryDebuggerResource (UINT32 CoreId, PROTECTED_HV_RESOURCES_TYPE ResourceType, PVOID Context, PROTECTED_HV_RESOURCES_PASSING_OVERS PassOver) |
Termination query state of debugger. | |
Implementation of debugger functions for terminating events.
VOID TerminateControlRegistersEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for MOV to control registers events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateCpuidExecutionEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for CPUID Instruction events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateDebugRegistersEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for MOV to debug registers events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
BOOLEAN TerminateEptHookUnHookAllHooksByHookingTagFromVmxRootAndApplyInvalidation | ( | UINT64 | HookingTag | ) |
Remove all hooks from the hooked pages list and invalidate TLB using hooking tag.
Should be called from vmx root-mode
HookingTag | The hooking tag to unhook |
BOOLEAN TerminateEptHookUnHookSingleAddressFromVmxRootAndApplyInvalidation | ( | UINT64 | VirtualAddress, |
UINT64 | PhysAddress ) |
Remove single hook from the hooked pages list and invalidate TLB.
Should be called from vmx root-mode
VirtualAddress | Virtual address to unhook (optional) |
PhysAddress | Physical address to unhook (optional) |
VOID TerminateExceptionEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for exception events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateExecTrapModeChangedEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for user-mode, kernel-mode exec trap events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateExternalInterruptEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for external-interrupts.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateHiddenHookExecCcEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for hidden hook (hidden breakpoints)
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateHiddenHookExecDetoursEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for hidden hook (detours)
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateHiddenHookReadAndWriteAndExecuteEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for hidden hook read/write/execute.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateInInstructionExecutionEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for IN instruction events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateOutInstructionExecutionEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for OUT Instructions events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminatePmcEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for RDPMC Instruction events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
BOOLEAN TerminateQueryDebuggerResource | ( | UINT32 | CoreId, |
PROTECTED_HV_RESOURCES_TYPE | ResourceType, | ||
PVOID | Context, | ||
PROTECTED_HV_RESOURCES_PASSING_OVERS | PassOver ) |
Termination query state of debugger.
CoreId | Core specific resource |
ResourceType | Type of resource |
Context | The context specified to the resource |
PassOver | The pass over option |
BOOLEAN TerminateQueryDebuggerResourceExceptionBitmap | ( | UINT32 | CoreId, |
UINT32 * | BitmapMask, | ||
PROTECTED_HV_RESOURCES_PASSING_OVERS | PassOver ) |
Check and modify state of exception bitmap.
CoreId | Core specific resource |
BitmapMask | The current bitmask of the resource |
PassOver | The pass over option |
BOOLEAN TerminateQueryDebuggerResourceExternalInterruptExiting | ( | UINT32 | CoreId, |
PROTECTED_HV_RESOURCES_PASSING_OVERS | PassOver ) |
Check and modify state of external interrupt exiting.
CoreId | Core specific resource |
PassOver | The pass over option |
BOOLEAN TerminateQueryDebuggerResourceMov2DebugRegExiting | ( | UINT32 | CoreId, |
PROTECTED_HV_RESOURCES_PASSING_OVERS | PassOver ) |
Check and modify state of mov 2 debug regs exiting.
CoreId | Core specific resource |
PassOver | The pass over option |
BOOLEAN TerminateQueryDebuggerResourceMovControlRegsExiting | ( | UINT32 | CoreId, |
PROTECTED_HV_RESOURCES_PASSING_OVERS | PassOver ) |
Check and modify state of move to control register exiting.
CoreId | Core specific resource |
PassOver | The pass over option |
BOOLEAN TerminateQueryDebuggerResourceMovToCr3Exiting | ( | UINT32 | CoreId, |
PROTECTED_HV_RESOURCES_PASSING_OVERS | PassOver ) |
Check and modify state of move to cr3 control register exiting.
CoreId | Core specific resource |
PassOver | The pass over option |
BOOLEAN TerminateQueryDebuggerResourceTscExiting | ( | UINT32 | CoreId, |
PROTECTED_HV_RESOURCES_PASSING_OVERS | PassOver ) |
Check and modify state of TSC exiting.
CoreId | Core specific resource |
PassOver | The pass over option |
VOID TerminateRdmsrExecutionEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for msr read events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateSyscallHookEferEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for SYSCALL Instruction events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateSysretHookEferEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for SYSRET Instruction events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateTscEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for RDTSC/RDTSCP Instruction events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateVmcallExecutionEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for VMCALL Instruction events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |
VOID TerminateWrmsrExecutionEvent | ( | PDEBUGGER_EVENT | Event, |
BOOLEAN | InputFromVmxRoot ) |
Termination function for msr write events.
Event | Target Event Object |
InputFromVmxRoot | Whether the input comes from VMX root-mode or IOCTL |