• 03 February 2025 (3 messages)
  • @instw0 ↶ Reply to #8616 #8635 06:17 AM, 03 Feb 2025
    only cpuid? or rdtsc to?
  • It's applid to the VM-exit handler, so it's for all instructions and in your case, both of them.
  • @temp1234temp #8637 12:29 PM, 03 Feb 2025
    Joined.
  • 05 February 2025 (3 messages)
  • @6176993302 #8638 08:54 PM, 05 Feb 2025
    Hi guys .. sometimes I got this error / exception
  • @6176993302 #8640 08:56 PM, 05 Feb 2025
    It's a page fault exception so maybe I'm trying to put a hook on a paged out address?but I'm pretty sure that's not the case because i put it exactly on a kernel address located in the non paged pool
  • 06 February 2025 (19 messages)
  • @HyperDbgBot #8642 b o t 04:25 AM, 06 Feb 2025
    [discord] <rol0807_03449> Hi. It's not possible to do such - using $pid ?
    `!epthook ntdll!NtCreateUserProcess pid $pid`
  • @HyperDbgBot #8643 b o t 04:25 AM, 06 Feb 2025
    [discord] <rol0807_03449> After .process, $pid should be set?
  • @HyperDbgBot #8644 b o t 04:28 AM, 06 Feb 2025
    [discord] <rol0807_03449> [reply]: I to have this issue sometime. Dont know why. Usually restart hyperdbg-client.exe and it stops.
  • Hi,
    This error means that there is an error happened in VMX-root mode.
  • @HughEverett #8646 11:00 AM, 06 Feb 2025
    In order to debug that, you should comment this line:

    https://github.com/HyperDbg/HyperDbg/blob/136ba94c293558410cce8994f24460d3760d50b8/hyperdbg/hyperhv/code/vmm/vmx/IdtEmulation.c#L171

    and then recompile HyperDbg.
    HyperDbg/hyperdbg/hyperhv/code/vmm/vmx/IdtEmulation.c at 136ba94c293558410cce8994f24460d3760d50b8 · HyperDbg/HyperDbg

    State-of-the-art native debugging tools. Contribute to HyperDbg/HyperDbg development by creating an account on GitHub.

  • @HughEverett #8647 11:03 AM, 06 Feb 2025
    Once you run your new recompiled version of HyperDbg, if you can reproduce the error again, windbg will give you a crash analysis (!analyze -v).
  • And then we could further investigate the error.
  • @6176993302 #8649 11:04 AM, 06 Feb 2025
    Bro when I see IDT 👀 exception I know that it will be a headache 😂
  • It's a valid script but does not make sense in VMI mode (and most of the time in the debugger mode). You're putting a hidden breakpoint on HyperDbg's calls on this function which might break the ability of hyperdbg to run a process. Maybe you're trying to do sth else? Can you explain what you're trying to do with this?
  • No, these kinds of errors are usually easy to debug.
  • You could also send steps we could reproduce the error, this way we could also reproduce and fix it.
  • @6176993302 #8653 11:14 AM, 06 Feb 2025
    I will do that ... I will prepare a good tea 🍵 and make it crash again and I will send you the steps xd
  • @6176993302 #8654 02:13 PM, 06 Feb 2025
    here is the result of the crash related to access to paged out memory space
  • @6176993302 #8655 02:13 PM, 06 Feb 2025
    *******************************************************************************
    * *
    * Bugcheck Analysis *
    * *
    *******************************************************************************

    DRIVER_IRQL_NOT_LESS_OR_EQUAL (d1)
    An attempt was made to access a pageable (or completely invalid) address at an
    interrupt request level (IRQL) that is too high. This is usually
    caused by drivers using improper addresses.
    If kernel debugger is available get stack backtrace.
    Arguments:
    Arg1: 0000000000000000, memory referenced
    Arg2: 00000000000000ff, IRQL
    Arg3: 0000000000000078, value 0 = read operation, 1 = write operation
    Arg4: 0000000000000000, address which referenced memory

    Debugging Details:
    ------------------

    Press ctrl-c (cdb, kd, ntsd) or ctrl-break (windbg) to abort symbol loads that take too long.
    Run !sym noisy before .reload to track down problems loading symbols.

    Press ctrl-c (cdb, kd, ntsd) or ctrl-break (windbg) to abort symbol loads that take too long.
    Run !sym noisy before .reload to track down problems loading symbols.

    KEY_VALUES_STRING: 1

    Key : Analysis.CPU.mSec
    Value: 12640

    Key : Analysis.Elapsed.mSec
    Value: 453336

    Key : Analysis.IO.Other.Mb
    Value: 1

    Key : Analysis.IO.Read.Mb
    Value: 8

    Key : Analysis.IO.Write.Mb
    Value: 13

    Key : Analysis.Init.CPU.mSec
    Value: 4937

    Key : Analysis.Init.Elapsed.mSec
    Value: 2406923

    Key : Analysis.Memory.CommitPeak.Mb
    Value: 98

    Key : Analysis.Version.DbgEng
    Value: 10.0.27725.1000

    Key : Analysis.Version.Description
    Value: 10.2408.27.01 amd64fre

    Key : Analysis.Version.Ext
    Value: 1.2408.27.1

    Key : Bugcheck.Code.KiBugCheckData
    Value: 0xd1

    Key : Bugcheck.Code.LegacyAPI
    Value: 0xd1

    Key : Bugcheck.Code.TargetModel
    Value: 0xd1

    Key : Failure.Bucket
    Value: DISABLED_INTERRUPT_FAULT_CODE_AV_NULL_IP_nt!KiPageFault

    Key : Failure.Hash
    Value: {e278d0dd-1b4e-69e0-8914-52640838b8ec}

    Key : Hypervisor.Enlightenments.Value
    Value: 12576

    Key : Hypervisor.Enlightenments.ValueHex
    Value: 3120

    Key : Hypervisor.Flags.AnyHypervisorPresent
    Value: 1

    Key : Hypervisor.Flags.ApicEnlightened
    Value: 0

    Key : Hypervisor.Flags.ApicVirtualizationAvailable
    Value: 0

    Key : Hypervisor.Flags.AsyncMemoryHint
    Value: 0

    Key : Hypervisor.Flags.CoreSchedulerRequested
    Value: 0

    Key : Hypervisor.Flags.CpuManager
    Value: 0

    Key : Hypervisor.Flags.DeprecateAutoEoi
    Value: 1

    Key : Hypervisor.Flags.DynamicCpuDisabled
    Value: 0

    Key : Hypervisor.Flags.Epf
    Value: 0

    Key : Hypervisor.Flags.ExtendedProcessorMasks
    Value: 0

    Key : Hypervisor.Flags.HardwareMbecAvailable
    Value: 1

    Key : Hypervisor.Flags.MaxBankNumber
    Value: 0

    Key : Hypervisor.Flags.MemoryZeroingControl
    Value: 0

    Key : Hypervisor.Flags.NoExtendedRangeFlush
    Value: 1

    Key : Hypervisor.Flags.NoNonArchCoreSharing
    Value: 0

    Key : Hypervisor.Flags.Phase0InitDone
    Value: 1

    Key : Hypervisor.Flags.PowerSchedulerQos
    Value: 0

    Key : Hypervisor.Flags.RootScheduler
    Value: 0

    Key : Hypervisor.Flags.SynicAvailable
    Value: 1

    Key : Hypervisor.Flags.UseQpcBias
    Value: 0

    Key : Hypervisor.Flags.Value
    Value: 667704

    Key : Hypervisor.Flags.ValueHex
    Value: a3038

    Key : Hypervisor.Flags.VpAssistPage
    Value: 1

    Key : Hypervisor.Flags.VsmAvailable
    Value: 0

    Key : Hypervisor.RootFlags.AccessStats
    Value: 0

    Key : Hypervisor.RootFlags.CrashdumpEnlightened
    Value: 0

    Key : Hypervisor.RootFlags.CreateVirtualProcessor
    Value: 0

    Key : Hypervisor.RootFlags.DisableHyperthreading
    Value: 0

    Key : Hypervisor.RootFlags.HostTimelineSync
    Value: 0
  • @6176993302 #8656 02:13 PM, 06 Feb 2025
    Key : Hypervisor.RootFlags.HypervisorDebuggingEnabled
    Value: 0

    Key : Hypervisor.RootFlags.IsHyperV
    Value: 0

    Key : Hypervisor.RootFlags.LivedumpEnlightened
    Value: 0

    Key : Hypervisor.RootFlags.MapDeviceInterrupt
    Value: 0

    Key : Hypervisor.RootFlags.MceEnlightened
    Value: 0

    Key : Hypervisor.RootFlags.Nested
    Value: 0

    Key : Hypervisor.RootFlags.StartLogicalProcessor
    Value: 0

    Key : Hypervisor.RootFlags.Value
    Value: 0

    Key : Hypervisor.RootFlags.ValueHex
    Value: 0

    Key : SecureKernel.HalpHvciEnabled
    Value: 0

    Key : Stack.Pointer
    Value: Invalid

    Key : WER.OS.Branch
    Value: vb_release

    Key : WER.OS.Version
    Value: 10.0.19041.1

    BUGCHECK_CODE: d1

    BUGCHECK_P1: 0

    BUGCHECK_P2: ff

    BUGCHECK_P3: 78

    BUGCHECK_P4: 0

    FAULTING_THREAD: ffffd888c7afa080

    READ_ADDRESS: unable to get nt!PspSessionIdBitmap
    0000000000000000

    PROCESS_NAME: VMwareResolutionSet.exe

    ADDITIONAL_DEBUG_TEXT: The fault occurred while interrupts were disabled on the processor.

    TRAP_FRAME: ffffd888c23a1d60 -- (.trap 0xffffd888c23a1d60)
    NOTE: The trap frame does not contain all registers.
    Some register values may be zeroed or incorrect.
    rax=0000000000000000 rbx=0000000000000000 rcx=ef374989c59c0000
    rdx=0000000000000000 rsi=0000000000000000 rdi=0000000000000000
    rip=0000000000000000 rsp=ffffd888c23a1ef0 rbp=fffff287566525c9
    r8=ffffd888e1601fe0 r9=0000000000000000 r10=ffffd888c2400160
    r11=ffffd888c23a1df0 r12=0000000000000000 r13=0000000000000000
    r14=0000000000000000 r15=0000000000000000
    iopl=0 nv up di ng nz na po nc
    00000000`00000000 ?? ???
    Resetting default scope

    IP_IN_FREE_BLOCK: 0

    FAILED_INSTRUCTION_ADDRESS:
    +0
    BAD_STACK_POINTER: ffffd888c23a1468

    STACK_TEXT:
    ffffd888`c23a1468 fffff800`75319522 : ffffd888`c23a15d0 fffff800`7517f9e0 00000000`00000000 00000000`00000000 : nt!DbgBreakPointWithStatus
    ffffd888`c23a1470 fffff800`75318b06 : 00000000`00000003 ffffd888`c23a15d0 fffff800`75216940 00000000`000000d1 : nt!KiBugCheckDebugBreak+0x12
    ffffd888`c23a14d0 fffff800`751fe9f7 : ffffffff`ffffffff 00000000`00000001 00000000`00000001 ffffd888`e0e01fe0 : nt!KeBugCheck2+0x946
    ffffd888`c23a1be0 fffff800`752131a9 : 00000000`0000000a 00000000`00000000 00000000`000000ff 00000000`00000078 : nt!KeBugCheckEx+0x107
    ffffd888`c23a1c20 fffff800`7520eb78 : ffffd888`e06ff000 ffffd888`c23a1dc9 ffffd888`e0eff000 ffffd888`c23a1dd0 : nt!KiBugCheckDispatch+0x69
    ffffd888`c23a1d60 00000000`00000000 : 00000001`00000002 ffffd888`c2303238 00000000`00000000 00000000`00000000 : nt!KiPageFault+0x478

    SYMBOL_NAME: nt!KiPageFault+478

    MODULE_NAME: nt

    IMAGE_NAME: ntkrnlmp.exe

    STACK_COMMAND: .process /r /p 0xffffd888ca960340; .thread 0xffffd888c7afa080 ; kb

    BUCKET_ID_FUNC_OFFSET: 478

    FAILURE_BUCKET_ID: DISABLED_INTERRUPT_FAULT_CODE_AV_NULL_IP_nt!KiPageFault

    OS_VERSION: 10.0.19041.1

    BUILDLAB_STR: vb_release

    OSPLATFORM_TYPE: x64

    OSNAME: Windows 10

    FAILURE_ID_HASH: {e278d0dd-1b4e-69e0-8914-52640838b8ec}

    Followup: MachineOwner
    ---------
  • @6176993302 #8657 02:14 PM, 06 Feb 2025
    to reproduce the bug i was putting a monitor breakpoint on the token field of each newly created process
  • @instw0 #8658 02:43 PM, 06 Feb 2025
    does the new hyperdbg version support debugging over ethernet?
  • @instw0 #8659 02:44 PM, 06 Feb 2025
    remote debugger...
  • @HyperDbgBot #8660 b o t 04:48 PM, 06 Feb 2025
    [discord] <10g1c.> [reply]: no i belive its still over serial
  • 07 February 2025 (9 messages)
  • @395437265 #8661 01:34 PM, 07 Feb 2025
    heyy.. anyone tried to run debugger on linux ? i mean Debugger-PC(Linux) -> VMWare(Windows) ?
  • The error is not from hyperhv.dll or hyperkd.sys. It's from NTOSKRNL.
  • So, it seems that HyperDbg changes the system state in a way that causes problem for NTOSKRNL.
  • Did you change anything in the !monitor script? Like accessing anything in the memory?
  • No, not yet. I recently went through it but it seems that we need to re-write the drivers for Intel E1000 NICs, so it's kinda challenging.
  • I think as long as you could forward the serial connection over two VMs, it should be fine. Though I never test it this way.
  • @395437265 ↶ Reply to #8666 #8667 03:47 PM, 07 Feb 2025
    Ok, that's was my idea :) will try soon
  • @6176993302 ↶ Reply to #8663 #8668 03:51 PM, 07 Feb 2025
    No i didn't change the monitor script internals I'm like just consuming the API , I'm putting my own monitor monitor points by calling: ConfigureEptHookMonitor(KeGetCurrentProcessorNumberEx(NULL), &HookingAddress, HANDLE_TO_UINT32(PsGetCurrentProcessId()));
  • @8151247610 #8669 11:08 PM, 07 Feb 2025
    Joined.
  • 08 February 2025 (13 messages)
  • So, you didn't use the !monitor command and call the API functions directly?
  • The same behavior also applies to HyperDbg when you use the '!monitor' command? Or only the API is problematic?
  • @6176993302 #8672 10:50 AM, 08 Feb 2025
    i didn't try to use !monitor the command itself but what i have done is that i tried to understand how !monitor works internally and i found out it relies on this API so i took this API and fill the Hooking description structure : HookingAddress.StartAddress = MyTokenAddress;
    HookingAddress.EndAddress = MyTokenAddress;
    HookingAddress.SetHookForRead = TRUE;
    HookingAddress.SetHookForWrite = TRUE;
    HookingAddress.SetHookForExec = FALSE;
    HookingAddress.MemoryType = DEBUGGER_MEMORY_HOOK_VIRTUAL_ADDRESS;
    HookingAddress.Tag = 0;
  • @6176993302 #8673 10:51 AM, 08 Feb 2025
    and then call the ConfigureEptHookMonitor(KeGetCurrentProcessorNumberEx(NULL), &HookingAddress, HANDLE_TO_UINT32(PsGetCurrentProcessId()));
  • @6176993302 #8674 10:51 AM, 08 Feb 2025
    and this occur for every created process
  • @6176993302 #8675 11:04 AM, 08 Feb 2025
    and for information im running the code in a high performace server with almost 32 cores and 64Gb of memory so i dont see why the system to use pagging a lot
  • Can you try to use the !monitor command on this address and see if it works of not?

    I just tested the !monitor on the whole _EPROCESS (including token) and it works. I couldn't reproduce the error.
  • @6176993302 #8677 04:53 PM, 08 Feb 2025
    Oh i knows it works .. i tested the !monitor command in the whole EPROCESS too , everything looks normal
  • @6176993302 #8678 04:53 PM, 08 Feb 2025
    But maybe when a lot of of monitor points are set (on different EPROCESS structures) something happened
  • Like how many !monitor(s)?
  • @6176993302 ↶ Reply to #8679 #8680 05:01 PM, 08 Feb 2025
    For the command !monitor(s) not that much .. but in theory I was consuming the same API consumed by !monitor in the same way so I expect that probably the same predicted behavior... (if I'm right if I tried to monitor like more than 50 EPROCESS/TOKEN processes In this way the bug is generated)
  • @6176993302 #8681 05:02 PM, 08 Feb 2025
    Ah also before starting calling the API I had to request a 0x1000 pre allocated buffers to cover the maximum processes I can
  • @6176993302 #8682 05:02 PM, 08 Feb 2025
    I don't know if it will influence something
  • 09 February 2025 (9 messages)
  • That is weird. Can you share your PoC? I mean the code in which automatically puts monitor on 50 EPROCESS tokens.
  • @6176993302 #8684 12:25 AM, 09 Feb 2025
    Ok
  • @6176993302 #8685 12:31 AM, 09 Feb 2025
    void
    ProcessCreationNotificationRoutineEx(PEPROCESS Process, HANDLE ProcessId, PPS_CREATE_NOTIFY_INFO CreateInfo)

    {
    UNICODE_STRING CmdPath;


    UINT64 MyTokenAddress = (UINT64)Process + 0x4b8;


    BOOLEAN Result = TRUE;
    EPT_HOOKS_ADDRESS_DETAILS_FOR_MEMORY_MONITOR HookingAddress = {0};
    UINT32 TempProcessId = HANDLE_TO_UINT32(PsGetCurrentProcessId());

    HookingAddress.StartAddress = MyTokenAddress;
    HookingAddress.EndAddress = MyTokenAddress;
    HookingAddress.SetHookForRead = TRUE;
    HookingAddress.SetHookForWrite = TRUE;
    HookingAddress.SetHookForExec = FALSE;
    HookingAddress.MemoryType = DEBUGGER_MEMORY_HOOK_VIRTUAL_ADDRESS;
    HookingAddress.Tag = 0;


    //
    // check if the process has been created or it is in the phase of exiting
    //

    if (CreateInfo)
    {

    Result = ConfigureEptHookMonitor(KeGetCurrentProcessorNumberEx(NULL), &HookingAddress, TempProcessId);

    if (Result == TRUE)
    {
    LogInfo("A monitor point was added with success to monitor read/write to the token %llx associated to the process id %llx", MyTokenAddress, ProcessId);
    }
    else
    {
    LogInfo("An error occured while setting a read/write monitor point to the token address %llx associated to the process id %llx", MyTokenAddress, ProcessId);
    }



    }


    else
    {

    Result = FALSE;

    while (Result == FALSE) //loop until the unkook works
    {
    Result = ConfigureEptHookUnHookSingleAddress(MyTokenAddress, VirtualAddressToPhysicalAddress(MyTokenAddress), TempProcessId);

    if (Result == TRUE)
    {
    LogInfo("A monitor point of the token address %llx assoicated to the process %llx was removed with the success ", MyTokenAddress, ProcessId);

    break;
    }


    }

    }

    }
  • @6176993302 #8686 12:33 AM, 09 Feb 2025
    so i register this notification routine with PsSetCreateProcessNotifyRoutineEx so if 50 processes will be created later it means we will set up 50 monitor points
  • Great. Thanks. I'll test it hopefully this week.
  • @6176993302 #8689 01:57 PM, 09 Feb 2025
    U welcome bro^^
  • @just1234just #8690 05:49 PM, 09 Feb 2025
    Joined.
  • @just1234just #8691 05:51 PM, 09 Feb 2025
    Hi all, an advice please...
    Is HyperDbg compatible with Intel I5-14600 ? If not what other recent (last 2 years) Intel CPUs are on the compatibility list?
  • Yes, it should be compatible with this processor.
  • 10 February 2025 (8 messages)
  • @HyperDbgBot #8693 b o t 06:58 AM, 10 Feb 2025
    [discord] <rol0807_03449> how to load symbols for usermode without debugee run away? setting !epthook on kernel32 not possible because symbol not loaded. ok for nt! and ntdll! but nothing else?
  • @HyperDbgBot #8694 b o t 06:59 AM, 10 Feb 2025
    [discord] <rol0807_03449> even for bp in process context the function address returns error
  • @HyperDbgBot #8695 b o t 06:59 AM, 10 Feb 2025
    [discord] <rol0807_03449> if for kernel32
  • @HyperDbgBot #8696 b o t 07:10 AM, 10 Feb 2025
    [discord] <rol0807_03449> maybe this is problem from wow64...
  • @AnungUnnRama #8697 01:31 PM, 10 Feb 2025
    Joined.
  • You need to load the symbols for the process once it's loaded. After that, you could close the process and open it again (and the symbols are still available from the previous run).
  • If you're debugging in the debugger mode, there is a bunch of solutions for bypassing the 'demand paging' if the page is not available in the memory.

    https://docs.hyperdbg.org/tips-and-tricks/considerations/accessing-invalid-address
    Accessing Invalid Address | HyperDbg Documentation

    Considerations for accessing memory in different modes

  • Ah, for kernel32 for some reasons (that I didn't understand), kernelbase and kernel32 does not return anything (from Microsoft DIA SDK). That's kinda weird, but it's fine with other DLLs and SYS files.
  • 11 February 2025 (1 messages)
  • @pedbap #8701 07:13 PM, 11 Feb 2025
    Joined.
  • 13 February 2025 (1 messages)
  • @D4Draco #8702 06:46 PM, 13 Feb 2025
    Joined.
  • 14 February 2025 (3 messages)
  • I went through this code today. At first, it causes BSOD with the same reason (page-fault) in my system. But then I commented the #PF interception in VMX-root mode and I couldn't reproduce the same error (in ~2 hours).
  • You can go through this branch, if you want to test it, but I'm not sure if it will fix your problem since you also commented the #PF at some points. But, might be worth a try.

    https://github.com/HyperDbg/HyperDbg/tree/fix-24h2-issues
    GitHub - HyperDbg/HyperDbg at fix-24h2-issues

    State-of-the-art native debugging tools. Contribute to HyperDbg/HyperDbg development by creating an account on GitHub.

  • @HughEverett #8705 06:24 PM, 14 Feb 2025
    I used a 14 gen Meteor Lake processor along with Win 11 24h2.
  • 15 February 2025 (34 messages)
  • @HyperDbgBot #8706 b o t 01:08 AM, 15 Feb 2025
    [discord] <rayanfam> @.wxg I went through fixing the memory access of MMIO regions (physical mem read) and now it's merged to the 'dev' branch. In case, if you want to use it, you could switch to the 'dev'.
  • @HyperDbgBot #8707 b o t 01:10 AM, 15 Feb 2025
    [discord] <rayanfam> The patch will be available from the next version (v0.13). Sorry, it took a bit, I did wrote the patch but for some reasons that I don't remember, I didn't merge it. Now, it's merged and it's tested on both the debugger and VMI mode in a physical machine as well as a nested virtualization machine.
  • @HughEverett #8708 01:14 AM, 15 Feb 2025
    @instw0 did you find time to test the new patch (anti-debugging) method for the technique you mentioned earlier? was that effective and bypassed that anti-debugging method?
  • @6176993302 #8709 09:36 PM, 15 Feb 2025
    I'm thinking about checking the possibility to add a feature to automatically monitor/assign physical addresses to user land virtual pages no need to inject PF to bring in a page to the physical ram , what do you think guys
  • @6176993302 #8710 09:36 PM, 15 Feb 2025
    That will be a good exercise for me too😅😂
  • @honorary_bot #8711 09:49 PM, 15 Feb 2025
    With regards to paged out addresses and hypervisors I used to use the following trick.
    In order to improve load times, windows uses a global tracking for image loaded bases, including ASLR. It is used for COW and image code reuse among processes. You don’t want this code to be relocated in every process, because you would need to recalculate relocations every time and spend more memory for that. If you try to explicitly load a DLL to an occupied address for example, you’ll get a new module instance in the kernel.
    Anyway, the trick is to write a simple application that would load all the DLLs of interest and then run a thread that would probe every page of those loaded DLLs periodically. Once a second should be enough to keep those pages paged in and with fixed PFNs, because you won’t give a chance for a memory deduplication and compression to steal it from you. From there you can safely assume that even if your process has them paged out (pages are paged in when probed), those are the same pages as in your “warming up” process.
  • That's a super cool trick, but it's like a so much Windows-based trick that only applies to Windows. I mean we do have a lot of code that actually works only for Windows but generally, we try to avoid OS-specific tricks as much as we can. Non of the HyperDbg events are OS-dependent. Though some features are Windows-dependent for sure.
  • @honorary_bot #8713 09:54 PM, 15 Feb 2025
    Do you support Linux targets?
  • There is an api called LockMemory, you could use that instead
  • That requires privileges
  • @honorary_bot #8716 09:54 PM, 15 Feb 2025
    I didn’t have those
  • Privilege to lock your own memory? Didn’t know that
  • SeLockMemoryPrivilege
  • It's not really your in this case, PFN is OS's
  • Not yet, but we're currently doing a massive code refactoring to remove or create several platform-specific functions. The goal is to support Linux hopefully in 1 or 2 years.
  • @honorary_bot #8721 09:56 PM, 15 Feb 2025
    So you're kind of stealing a PFN from the memory manager
  • @honorary_bot #8722 09:57 PM, 15 Feb 2025
    Anyways, just sharing my tips. Use at your discression.
  • I actually saw that Petr in the vmi-rs project offers this functionality:

    https://github.com/vmi-rs/vmi?tab=readme-ov-file#utilities
    GitHub - vmi-rs/vmi: Modular and extensible library for Virtual Machine Introspection

    Modular and extensible library for Virtual Machine Introspection - vmi-rs/vmi

  • I didn't see the code but I assume he uses EPT hooks on page-table addresses, not sure how it's exactly implemented (or maybe Xen offers the same functionality).
  • @HughEverett #8725 09:59 PM, 15 Feb 2025
    This is the main description of this feature:
    https://docs.rs/vmi/latest/vmi/utils/ptm/enum.PageTableMonitorEvent.html#variant.PageIn
  • @HughEverett #8726 09:59 PM, 15 Feb 2025
    If it's possible to monitor page-tables, I think we could also offer the same functionality.
  • @6176993302 #8727 10:01 PM, 15 Feb 2025
    Yes
  • @6176993302 #8728 10:01 PM, 15 Feb 2025
    That's exactly what
  • @6176993302 #8729 10:01 PM, 15 Feb 2025
    I have read
  • @6176993302 #8730 10:01 PM, 15 Feb 2025
    In a research paper
  • @6176993302 #8731 10:01 PM, 15 Feb 2025
    They track changes in the pages tables associated to each process
  • @6176993302 #8732 10:02 PM, 15 Feb 2025
    And from theses events they can know if the page is paged out or it has an equivalent in the physical ram
  • Did they monitor page tables using EPT?
  • Can you send the research paper here?
  • @6176993302 ↶ Reply to #8733 #8735 10:12 PM, 15 Feb 2025
    Yes
  • @6176993302 ↶ Reply to #8734 #8736 10:12 PM, 15 Feb 2025
    Sure
  • @6176993302 #8737 10:14 PM, 15 Feb 2025
  • Thanks
  • @6176993302 #8739 10:20 PM, 15 Feb 2025
    U welcome
  • 16 February 2025 (3 messages)
  • @instw0 ↶ Reply to #8708 #8740 05:07 AM, 16 Feb 2025
    I'm sorry for the long answer, I didn't have a chance to check earlier.
    Everything is working perfectly!
  • Oh, that's great.

    And of course thanks to the contributor who implements that functionality in HyperDbg (if he is in this group). 👌
  • @hanslnh #8743 08:50 PM, 16 Feb 2025
    Joined.
  • 17 February 2025 (22 messages)
  • @sannian11 #8744 07:50 AM, 17 Feb 2025
    Joined.
  • @HyperDbgBot #8745 b o t 08:07 AM, 17 Feb 2025
    [discord] <dexus1337> Hello! I got a question regarding the "!monitor" command. Is there a way to get the data that is being read/written without performing a manual read to the address $context gives? I want to debug mmio access between a kernel driver and pcie device, where reading a mmio address after the kernel performed a write will not necessarily give me the value the kernel has written, since it may be to a address the pcie device uses as a control register.
  • @HyperDbgBot #8746 b o t 08:26 AM, 17 Feb 2025
    [discord] <dexus1337> Also, when the trigger flag is rw, how do i know if its a read or a write in my event script?
  • Hi,

    That's a really good point. I’ve never thought about it, but yeah, I think we need this as a feature to read values that will be written into MMIO addresses.

    Generally, for memory reads/writes in the RAM, we have pre- and post-events, which means you can read the data before and after it is modified, as described here:
    https://docs.hyperdbg.org/tips-and-tricks/misc/event-calling-stage

    However, for MMIO device addresses, this mechanism doesn't work. From what I know, there is no VMCS field that tells us the value that is about to be written to the target address once a VM-exit (EPT violation) happens. In that case, I don't know how we could get the value for the MMIO addresses.

    One solution that comes to mind is interpreting the instruction operands (e.g., registers) to determine the values that are supposed to be written to the MMIO memory, but that would be a slow approach. I’m not sure if there are any other solutions for reading what is trying to be written once an EPT violation occurs.
  • The solution to this, would be using two different events, one of them with 'r' and one of them with 'w' with different scripts.
  • Pinging @honorary_bot or anyone else who can think of any solution for this problem.
  • @HughEverett #8750 08:38 PM, 17 Feb 2025
    🤔
  • There is literally no good solution. You'd need a simple disasm for that. Sorry.
  • @honorary_bot #8752 08:40 PM, 17 Feb 2025
    I've been complaining about this for years
  • @honorary_bot #8753 08:40 PM, 17 Feb 2025
    AMD has last instruction bytes in its vmcb, Intel does not
  • @honorary_bot #8754 08:41 PM, 17 Feb 2025
    Which is a bummer, because those bytes and disasm IS available in the ucode
  • 👍
  • @honorary_bot #8756 08:44 PM, 17 Feb 2025
    PulseDbg design requires trapping APIC access in order to track INIT requests to different cores. It is fine when the guest uses x2apic and you only have to trap ICR MSR, and the value is always in rcx. Sadly, xapic is often used and from there you need to trap the access with virtual apic page or EPT, read the guest code, disasm it and then resume with MTF
  • Ah, in this case, the only solution is writing a disasm parser.
  • @honorary_bot #8758 08:53 PM, 17 Feb 2025
    It is an MMIO case btw
  • @honorary_bot #8759 08:53 PM, 17 Feb 2025
    MMIO has side effects, even for reading
  • @honorary_bot #8760 08:54 PM, 17 Feb 2025
    i.e. you could read a MMIO register multiple times and get a different result, altering it finite state machine
  • @honorary_bot #8761 08:54 PM, 17 Feb 2025
    So the only way to track it is to track what is about to be written there
  • @honorary_bot #8762 08:55 PM, 17 Feb 2025
    OR realistically it might be easier to log a breakpoint on a driver function that read or writes mmio
  • @honorary_bot #8763 08:55 PM, 17 Feb 2025
    Often it is a separate function
  • @HyperDbgBot #8764 b o t 11:09 PM, 17 Feb 2025
    [discord] <dexus1337> Thank you all for your replies! My knowledge regarding hypervisors is limited, but arent there shadow pages that could be used for this? So if the driver tries to write to an mmio address (which is backed by a shadow Page), the hv breaks, reads what the driver wrote to the Shadow page and mimics the write to the actual physical page. Overhead could be an issue but the general approach may work, no?
  • Depends on the MMIO actually. That might work for a PCI device MMIO, can't see why not. In other cases like trapping APIC access it might not work. Imagine a scenario - you've trapped a write to xAPIC, the trap happens BEFORE any data was written, so you need to single step to get the data on your "shadow" page (which is just a different EPT). But now you would need to emulate that write to a real MMIO. In case of local APIC it would influence your hypervisor execution instead of a guest one that would otherwise give you another vm exit. So.. it depends..
  • 18 February 2025 (10 messages)
  • @HyperDbgBot #8766 b o t 10:35 AM, 18 Feb 2025
    [discord] <dexus1337> [reply]: Perfect, debugging pcie decives was what i was trying to do anyways. I might give it a shot then
  • @HyperDbgBot #8767 b o t 10:38 AM, 18 Feb 2025
    [discord] <dexus1337> Another question. Inside the event script for monitor, i cannot use dd to read the memory accessed. i get the following error message:
    HyperDbg> (10:33:58.161 - core : 0 - vmx-root? yes) [+] Information (DebuggerPerformRunScript:1651) | err, ScriptEngineExecute, function = FUNC_DD

    this is my script:
    !monitor r 81ff0000 81ffffff pa imm no stage post script {
    printf("reading: %llx -> %x\n", $context, dd($context) );
    }

    It works fine without the dd part, printing out the valid physical addresses accessed.

    Am i doing something wrong here?
  • @eynariver #8768 12:10 PM, 18 Feb 2025
    Joined.
  • @NAW021 #8769 12:11 PM, 18 Feb 2025
    Joined.
  • @HyperDbgBot #8771 b o t 03:57 PM, 18 Feb 2025
    [discord] <rayanfam> [reply]: Hi. Do you have the same problem with 'poi' or 'dq' or 'db'?
  • @HyperDbgBot #8772 b o t 04:01 PM, 18 Feb 2025
    [discord] <rayanfam> [reply]: Ah, I see! You're using the physical address. I'm not sure if I use the '$context' as a physical address or a virtual address. Is the $context a physical address?
  • @HyperDbgBot #8773 b o t 04:02 PM, 18 Feb 2025
    [discord] <rayanfam> [reply]: If it's a physical address, the 'dd' and all of its variants (dq, db, poi) are only compatible with the virtual address, not physical address.
  • @HyperDbgBot #8774 b o t 04:07 PM, 18 Feb 2025
    [discord] <dexus1337> [reply]: Ahh i see the issue. I thought dd reads physical mem, similar to the HyperDbg Function. But within the script it means something different. Since "physical_to_virtual" script function is labeled with "This function is not working. PLEASE DO NOT USE IT FOR NOW. It will be fixed in future versions." there is no way (currently) to read physical memory in events, right?
  • @HyperDbgBot #8775 b o t 04:11 PM, 18 Feb 2025
    [discord] <rayanfam> [reply]: Converting physical to virtual address have technical problems, like we don't have a solution for it. But, adding support for reading physical memory should be easy since we have plenty of functions for reading physical memory in the VMX-root mode. It just needs to be exported. I'll add these functions in the coming version (v0.13).
  • @HyperDbgBot #8776 b o t 04:13 PM, 18 Feb 2025
    [discord] <dexus1337> [reply]: Perfect, thanks a lot! In general, i really like the HyperDbg Project. Very clean code aswell! Good job!
  • 19 February 2025 (21 messages)
  • @6176993302 #8777 12:50 PM, 19 Feb 2025
    One weird behavior of the API PhysicalAddressToVirtualAddressByProcessId (according to my analysis I may be wrong )
  • @6176993302 #8778 12:51 PM, 19 Feb 2025
    Normally the API accept two arguments : (UINT64 PhysicalAddress , UINT32 ProcessId)
  • @6176993302 #8779 12:52 PM, 19 Feb 2025
    However when I compare what the result of the API (ProcesdPid = 0x4 in this case) is pointing too and the command dq of windbg ... they are different
  • @6176993302 #8780 12:52 PM, 19 Feb 2025
    What's can be wrong
  • @6176993302 #8781 08:24 PM, 19 Feb 2025
    My mistake guys .. it turns out that mmGetVirtualForPhysical works correctly "only in theory" for a physical address whose primary virtual address is in system space ... and since I was trying to play with pages tables of a user land process ...things didn't get well
  • Not sure if I understand correctly, but yeah, this function might not work correctly in many cases.
  • @6176993302 #8783 11:34 PM, 19 Feb 2025
    The context is that I was trying to code a driver (with the help of hyperdbg API(s)) that will monitor page tables of running processes, so I need first to mimic the work of !vpot command of windbg .. so I started with PML4E it was easy to get its physical address (thanks to EPROCESS structure) and then when I want to go further and continue 5he translation I had to dereference PML4E but I only have its physical address so I was thinking to get the virtual address (from the kernel vision since my code run in the kernel land) at this point i called mmGetVirtualForPhysical but i got the wrong virtual address in output and after some investigation i figure out that this API works correctly only for a physical address whose primary virtual address is in a system space (like token , or EPRocess but not peb since peb lives in the user land )
  • @6176993302 #8784 11:34 PM, 19 Feb 2025
    Sorry for the long message '
  • @honorary_bot #8785 11:37 PM, 19 Feb 2025
    If you're in a driver, just try MmMapIoSpace. Though not 100% if the OS allows that for page tables
  • HyperDbg has a equivalent command for that, but same as WinDbg it might not work in all situations with the same reason:
    https://docs.hyperdbg.org/commands/extension-commands/pa2va
  • But generally, I think you could use the '!mode' command (using its API) to achieve your goal (if I didn't mistakenly understand your description).

    https://docs.hyperdbg.org/commands/extension-commands/mode
  • @6176993302 ↶ Reply to #8785 #8788 11:42 PM, 19 Feb 2025
    I was thinking about that too but it seems that windows prevent usage of MmMapIoSpace for page tables (something called hyperspace if im not wrong)?!
  • @honorary_bot #8789 11:42 PM, 19 Feb 2025
    Hyperspace is a working set area but yeah, I would not allow to do that if I were Windows hehe
  • @6176993302 ↶ Reply to #8787 #8790 11:43 PM, 19 Feb 2025
    I will check that too... I'm just trying bro to use the internal API of hyperdbg in ordrr to understand deeply the project how it was built so i can contribute in futur thats why i try to avoid direct uage of command at this point
  • @6176993302 ↶ Reply to #8789 #8791 11:43 PM, 19 Feb 2025
    That will be a nice trick haha
  • Nice trick is to go and manipulate page tables directly. But that's a bad advice and you should not listen to me
  • For remapping physical pages to your predefined virtual address I mean
  • @6176993302 #8794 11:47 PM, 19 Feb 2025
    Yes i got your point , since MmMapIospace give you the possibility to get a virtual vision from the kernel perspective of an already existing physical address
  • @6176993302 #8795 11:47 PM, 19 Feb 2025
    If I'm not wrong
  • It literally just builds a page table entry for a given physical address and maps it somewhere in kernel space. So it's totally reproducible, just because it is the way CPU works
  • @6176993302 #8797 11:49 PM, 19 Feb 2025
    Yeah in the end the cpu have to deal with a virtual address..not a physical one
  • 21 February 2025 (1 messages)
  • @Gorestriker #8798 11:12 AM, 21 Feb 2025
    Joined.
  • 22 February 2025 (31 messages)
  • @6176993302 #8801 01:50 PM, 22 Feb 2025
    Go away we are developing a debugger Here
  • These are automated scamming bots
  • Btw you mentioned you bought an MTL machine. Which one?
  • @honorary_bot #8804 03:10 PM, 22 Feb 2025
    *meteor lake
  • I do have a Core Ultra 7 155h but I mainly work on my raptor lake laptop at the moment.
  • @honorary_bot #8806 03:13 PM, 22 Feb 2025
    I mean is it a NUC? Which model/oem?
  • No it's not. It's a System76 laptop.
  • @honorary_bot #8808 03:13 PM, 22 Feb 2025
    I see, cool
  • @HughEverett #8809 03:13 PM, 22 Feb 2025
    Clevo is the odm.
  • @honorary_bot #8810 03:14 PM, 22 Feb 2025
    I got atomman x7 and its firmware sucks
  • Is there anything wrong with meteor lake laptops right now?
  • @honorary_bot #8812 03:14 PM, 22 Feb 2025
    No, they are fine and a good case for HV testing
  • @honorary_bot #8813 03:14 PM, 22 Feb 2025
    MTL has three! different types of cores
  • @honorary_bot #8814 03:16 PM, 22 Feb 2025
    LNL is much better though, but it's almost impssible to buy a NUC with it at the moment
  • @honorary_bot #8815 03:16 PM, 22 Feb 2025
    *lunar lake
  • @honorary_bot #8816 03:16 PM, 22 Feb 2025
    Sorry, I am too used to intel abbreviations
  • Honestly, I really don't understand the new naming scheme of Intel anymore. It's so complicated, you see different code names with different generations, different family name of architecture and now the model of processor no longer shows its generation. It's so complicated.
  • @HughEverett #8818 03:19 PM, 22 Feb 2025
    😵‍💫😵‍💫
  • I've also asked ChatGPT.
    ChatGPT does not know either. 🤦‍♂
  • @honorary_bot #8820 03:20 PM, 22 Feb 2025
    The concept of generations was somewhat clear with performance cores. Since CPUs are hybrid now, they have a mix of different core types and generations, so you can't really name a specific gen for a CPU
  • You mean p-core and e-core?
  • @honorary_bot #8822 03:21 PM, 22 Feb 2025
    And generation itself does not reflect features as well, it's more about uarch
  • @honorary_bot #8823 03:22 PM, 22 Feb 2025
    Even in the past atom cores had more features than bit cores
  • Yeah
  • @honorary_bot #8825 03:22 PM, 22 Feb 2025
    MTL even has three types of core, p core and two different e core types
  • @honorary_bot #8826 03:23 PM, 22 Feb 2025
    It is also possible for one package to have different VMCS revision, so watch out :)
  • @kaganim #8827 08:45 PM, 22 Feb 2025
    Has anyone deal with the new anti-debug & anti-vm techniques in VMP 3.9.3? It can detect even when HyperDbg’s !hide is active.
  • The '!hide' command is changed (in the 'dev' branch). You might wanted to test it from 'dev' branch.
  • @kaganim ↶ Reply to #8828 #8829 08:47 PM, 22 Feb 2025
    trying now chief
  • @FlamestoN #8830 11:28 PM, 22 Feb 2025
    Joined.
  • @FlamestoN #8831 11:49 PM, 22 Feb 2025
    Joined.
  • 23 February 2025 (4 messages)
  • @HyperDbgBot #8832 b o t 10:00 PM, 23 Feb 2025
    [discord] <rayanfam> @dexus1337 I added the functions for reading and writing to physical memory. To use these new functions (and keywords), you need to switch to the 'dev' branch and recompile.

    Please check:
    https://docs.hyperdbg.org/commands/scripting-language/assumptions-and-evaluations#keywords
    https://docs.hyperdbg.org/commands/scripting-language/functions/memory/eb_pa-ed_pa-eq_pa
    https://docs.hyperdbg.org/commands/scripting-language/functions/memory/memcpy_pa
    Assumptions & Evaluations | HyperDbg Documentation

    Description of keywords, operators, pseudo-registers, number prefixes, and pre-defined functions

  • @HyperDbgBot #8833 b o t 10:00 PM, 23 Feb 2025
    [discord] <rayanfam> You can use: poi_pa, hi_pa, low_pa, dw_pa, and dq_pa keywords as well as eq_pa also a separate function (memcpy_pa) is added.
  • @HyperDbgBot #8834 b o t 10:00 PM, 23 Feb 2025
    [discord] <rayanfam> Please don't use db_pa, dd_pa and eb_pa, ed_pa for now as it has a small problem which will be fixed, other than that, all of the above functions are tested and in a working state.
  • @HyperDbgBot #8835 b o t 10:24 PM, 23 Feb 2025
    [discord] <dexus1337> [reply]: Thanks a lot!
  • 24 February 2025 (1 messages)
  • @7229234024 #8836 02:58 PM, 24 Feb 2025
    Joined.
  • 25 February 2025 (3 messages)
  • @HyperDbgChannel #8837 08:42 AM, 25 Feb 2025
    HyperDbg v0.13 is out! 🎉

    This version comes with a new command '!pcicam' for dumping and interpreting PCIe CAM, new anti-anti-hypervisor methods, improved MMIO scripting, plus lots of bug fixes & improvements.

    Big thanks to @0Xiphorus & @AbbasMasoumiG.

    https://github.com/HyperDbg/HyperDbg/releases/tag/v0.13

    More details are available here:
    https://docs.hyperdbg.org/commands/extension-commands/pcicam
    Release v0.13 · HyperDbg/HyperDbg

    HyperDbg v0.13 is released! If you’re enjoying HyperDbg, don’t forget to give a star 🌟 on GitHub! Please visit Build & Install to configure the environment for running HyperDbg. Check out the Q...

  • Thanks to @Reverser69 who is in this group for finalizing the command parser.
  • @ilk3rk #8839 11:45 AM, 25 Feb 2025
    Joined.
  • 26 February 2025 (1 messages)
  • @marv111n #8840 09:33 AM, 26 Feb 2025
    Joined.
  • 27 February 2025 (18 messages)
  • @6176993302 #8841 12:59 PM, 27 Feb 2025
    The "tag" field in the structure EPT_HOOKS_ADDRESS_DETAILS_FOR_MEMORY_MONITOR
  • @6176993302 #8842 12:59 PM, 27 Feb 2025
    Is it used for some internal purposes 🤔?
  • @6176993302 #8843 12:59 PM, 27 Feb 2025
    I'm thinking about using to to define classes of addresses that I'm trying to monitor
  • @6176993302 #8844 01:00 PM, 27 Feb 2025
    For example if tag ==0 it means the address that I'm trying to monitor is a user land addresse if tag ==1 it's a kernel address
  • @6176993302 #8845 01:01 PM, 27 Feb 2025
    What do you think guys
  • Yes, I think we added a tag for the monitor in v0.9 or v0.10. This is the best implementation of the !monitor hook so far, and we haven't received any reports (GitHub issues) indicating that it fails. The tag used in this structure is the same as the Event Tag.
  • @HughEverett #8847 01:25 PM, 27 Feb 2025
    In previous versions, we didn't use a tag because we directly saved the physical address of the memory we wanted to monitor and checked the EPT violation with that. After some time, we received a GitHub issue reporting that HyperDbg's !monitor command failed to detect certain memory writes at specific locations (which we couldn't reproduce), and the issue remained unsolved for a year.
  • @HughEverett #8848 01:25 PM, 27 Feb 2025
    Later, one of the users provided us with access to a VMware snapshot where we could reproduce the error. Based on our investigations, we discovered that Windows sometimes does not allocate two (or more) contiguous virtual memory regions continuously in physical memory. For example, 0xfffff801deadb000 might be allocated at the physical address 0xc1b000, but 0xfffff801deadc000 could be allocated at 0xa15000, causing HyperDbg to miss triggering or not triggering an event.
  • @HughEverett #8849 01:26 PM, 27 Feb 2025
    With the new tag-based approach, these scenarios are handled correctly. As far as I know, we haven't received any complaints or bug reports about the latest implementation in almost a year. So, this is more or less the best implementation of !monitor so far.
  • @6176993302 #8850 01:33 PM, 27 Feb 2025
    Okay got your point bro excellent work 👏 👌
  • @6176993302 #8851 01:34 PM, 27 Feb 2025
    In my context I will try to define a set of tags
  • @6176993302 #8852 01:34 PM, 27 Feb 2025
    That are maineful
  • @6176993302 #8853 01:34 PM, 27 Feb 2025
    For example, I'm designing a solution based on hyperdbg that will monitor pages tables of processes
  • 👍
  • @6176993302 #8855 01:35 PM, 27 Feb 2025
    After some coding I discovered that this kind of physical address need a special tag otherwise the code will be a miss and I had
  • @6176993302 #8856 01:36 PM, 27 Feb 2025
    To process all possibilities (if it's a ept violation caused by a page table event or a ept violation caused by an address of a user land process etc
  • @6176993302 #8857 01:36 PM, 27 Feb 2025
    So the tag will save a lot of work for me
  • yes, exactly. If you don't provide a unique tag for each !monitor hook, it won't trigger anything.