Commit graph

14 commits

Author SHA1 Message Date
sina
f4c77abb75 update and cleanup CPUID 2 plus fixing build error 2026-07-21 15:27:22 +02:00
Sina Karvandi
6324c1d718
Merge pull request #650 from nikzad66/feature-cpuid-command
Feature cpuid command
2026-07-21 14:28:37 +02:00
Nikzad
0564b729c9 kernel: implement CPUID command handling in kernel mode- Add DebuggerCommandCpuid() for CPUID execution
- Implement IOCTL_DEBUGGER_CPUID handler
- Fill CPUID response with register values and leaf data
- Add max sub-leaf detection for some special leaves like 0x4, 0xB and...
- Add SGX support detection via leaf 7
2026-07-19 18:12:45 +03:30
munraimix
7436b35fd0 Fix DRIVER_IRQL_NOT_LESS_OR_EQUAL when reading registers on a manually-halted core
In Debugger Mode, breaking the debuggee and then reading registers (e.g. the
'r' command) could bugcheck the debuggee with DRIVER_IRQL_NOT_LESS_OR_EQUAL
(0xD1) at IRQL 0xff.

Root cause: DebuggerCommandReadRegisters() copies GUEST_REGS from
DbgState->Regs, but the per-core DbgState->Regs is only populated on the
event-triggered halt paths. A core halted via a manual break
(DEBUGGER_VMCALL_VM_EXIT_HALT_SYSTEM) or via the NMI broadcast (KdHandleNmi)
never had DbgState->Regs set, so it was NULL and the GUEST_REGS memcpy
dereferenced address 0.

Fix:
- Add VmFuncGetGuestRegs(CoreId) returning g_GuestState[CoreId].Regs (the
  guest GP registers saved on the last vm-exit).
- Populate DbgState->Regs from it on the two manual-halt entry points
  (DEBUGGER_VMCALL_VM_EXIT_HALT_SYSTEM and KdHandleNmi) so register reads on a
  manually-halted core return the correct values.
- Add a defensive NULL check in DebuggerCommandReadRegisters().
2026-07-19 16:53:34 +10:00
sina
ef2a482c45 refactor doxygen, variables, function names 6 2026-05-31 18:59:52 +02:00
copilot-swe-agent[bot]
774d61782f
fix: correct typos and one copy-paste error in comments and messages
Agent-Logs-Url: https://github.com/HyperDbg/HyperDbg/sessions/0817c887-8808-4080-a701-6a0211b10595

Co-authored-by: SinaKarvandi <13383992+SinaKarvandi@users.noreply.github.com>
2026-04-23 12:38:48 +00:00
unknown
a869065718 add support to the registers command to the user debugger 2025-08-31 01:53:29 +02:00
sina
3ce7e7d92b
update preactivating mode command messages 2025-08-17 22:57:46 +02:00
sina
61a0ae4553 fix the issue of reading and writing device memory 2025-02-13 16:13:00 +01:00
SinaKarvandi
4b41b42d6c use MmMapIoSpaceEx for reading MMIO physical memory 2024-08-21 19:28:38 +09:00
SinaKarvandi
15c94d0b0e Fix crash on editing invalid physical addresses (#424) 2024-07-13 20:16:13 +09:00
SinaKarvandi
139be97b81 fix memory writing sdk error 2024-07-10 21:00:23 +09:00
SinaKarvandi
556efd2bd3 add a unified memory reading function 2024-07-06 21:16:45 +09:00
SinaKarvandi
48c362255e build based on new libhyperdbg 2024-06-24 18:05:54 +09:00
Renamed from hyperdbg/hprdbgkd/code/debugger/commands/DebuggerCommands.c (Browse further)