@hyperdbg

@hyperdbg / Public archive of HyperDbg Telegram messages.

  • 2025

    • Mar 2025 (385)
    • Feb 2025 (220)
    • Jan 2025 (167)
  • 2024

    • Dec 2024 (72)
    • Nov 2024 (235)
    • Oct 2024 (83)
    • Sep 2024 (263)
    • Aug 2024 (332)
    • Jul 2024 (403)
    • Jun 2024 (570)
    • May 2024 (245)
    • Apr 2024 (156)
    • Mar 2024 (90)
    • Feb 2024 (134)
    • Jan 2024 (309)
  • 2023

    • Dec 2023 (62)
    • Nov 2023 (326)
    • Oct 2023 (76)
    • Sep 2023 (315)
    • Aug 2023 (757)
    • Jul 2023 (2215)
    • Jun 2023 (778)
    • May 2023 (300)
    • Apr 2023 (1)
    • Feb 2023 (5)
    • Jan 2023 (1)
  • 2022

    • Nov 2022 (1)
    • Oct 2022 (2)
    • Sep 2022 (1)
    • Aug 2022 (1)
    • Jul 2022 (39)
    • Jun 2022 (23)
    • May 2022 (256)
  • 2021

    • Dec 2021 (1)
    • Oct 2021 (82)
    • Jun 2021 (1)
    • Feb 2021 (1)
    • Jan 2021 (2)
  • 2020

    • Dec 2020 (1)
    • Nov 2020 (2)
RSS feed.    Made with tg-archive
  • 01 August 2024 (8 messages)
  • @HyperDbgBot #7422 b o t 04:48 PM, 01 Aug 2024
    [discord] <ohault> I wonder what could be the best way to monitor the filesystem access of a VM through HyperDbg?
  • @HughEverett ↶ Reply to #7422 #7423 05:15 PM, 01 Aug 2024
    You have plenty of options as long as you know the functions that are trying to communicate with the filesystem.

    Probably the easiest one is using a simple '!epthook' to monitor your target function.

    Please see:
    https://youtu.be/tjsFRBFGis4?si=llWvBcDxY8-31qMO

    Or if you want to monitor the PCIe buffer accesses for the filesystem, you could use the '!monitor' command as well.
  • @HyperDbgBot #7424 b o t 05:24 PM, 01 Aug 2024
    [discord] <ohault> Would it be possible to map the Windows semantics about well known topics like file, registry, process, network interface, …. towards whatever external monitor agents?
  • @hostar222 #7425 05:52 PM, 01 Aug 2024
    Joined.
  • @HughEverett ↶ Reply to #7424 #7426 06:01 PM, 01 Aug 2024
    We can add Windows stuff to HyperDbg, but we've tried to keep HyperDbg as OS-independent as possible so we can easily port it to other systems in the future. (Though we did end up using a lot of Windows semantics in it.) Right now, we're planning to move those OS-specific parts to the script engine and create standard libraries to handle different symbols and structures there. @xmaple555 is currently working on adding types to the script engine. Once that's done, we'll start making standard functions to analyze, view, or modify the Windows-specific stuff in the scriptsl libraries.
  • @HyperDbgBot #7427 b o t 06:37 PM, 01 Aug 2024
    [discord] <ohault> That’s really interesting. It is somehow similar to Nitro backends
  • @HughEverett ↶ Reply to #7427 #7428 06:56 PM, 01 Aug 2024
    Nitro? 🤨
  • @HyperDbgBot #7429 b o t 07:13 PM, 01 Aug 2024
    [discord] <ohault> [reply]: https://github.com/KVM-VMI/nitro/blob/master/doc/source/architecture.rst
    nitro/doc/source/architecture.rst at master · KVM-VMI/nitro

    Contribute to KVM-VMI/nitro development by creating an account on GitHub.

  • 02 August 2024 (7 messages)
  • @6803116215 #7431 05:38 AM, 02 Aug 2024
    Joined.
  • @HughEverett ↶ Reply to #7429 #7432 06:31 AM, 02 Aug 2024
    👍
  • @395437265 #7433 09:17 AM, 02 Aug 2024
    hey hey, long time no see, sorry.
    @HughEverett is it possible to add showing some messages on debugee ?
  • @395437265 #7434 09:17 AM, 02 Aug 2024
    like show message on debugee from script
  • @HughEverett ↶ Reply to #7433 #7435 11:07 AM, 02 Aug 2024
    Hi! 👋
    There is debuggee operation code (bit), if you set this bit, instead of sending message to the debugger, it'll be delivered to the debugge.

    photo_2024-08-02_11-07-03.jpg
  • @395437265 #7436 11:19 AM, 02 Aug 2024
    great!
  • @msdousti #7437 08:24 PM, 02 Aug 2024
    Joined.
  • 04 August 2024 (1 messages)
  • @Dr_secretstar #7438 05:05 PM, 04 Aug 2024
    Joined.
  • 05 August 2024 (8 messages)
  • @HughEverett #7440 10:16 AM, 05 Aug 2024
    Hi guys!

    FYI, the #Discord server and #matrix group are added (and synchronized) to the HyperDbg groups. 🎉🥂

    Telegram Group: https://t.me/HyperDbg

    Discord Server: https://discord.gg/anSPsGUtzN

    Matrix Group: https://matrix.to/#/#hyperdbg-discussion:matrix.org

    Twitter: https://twitter.com/HyperDbg
  • @HughEverett ↶ Reply to #7440 #7441 10:16 AM, 05 Aug 2024
    None
  • @mutin_sa #7442 10:30 AM, 05 Aug 2024
    Joined.
  • @bsdb0y #7443 10:37 AM, 05 Aug 2024
    Joined.
  • @sarebour #7444 10:40 AM, 05 Aug 2024
    Joined.
  • @Thepenguin360 #7445 11:32 AM, 05 Aug 2024
    Joined.
  • @Mehrshad_owl #7446 12:12 PM, 05 Aug 2024
    Joined.
  • @arnotic #7447 07:00 PM, 05 Aug 2024
    Joined.
  • 06 August 2024 (19 messages)
  • @xiayu379 #7448 02:00 AM, 06 Aug 2024
    Joined.
  • @SinaMobasheri #7449 02:23 AM, 06 Aug 2024
    Joined.
  • @HyperDbgBot #7450 b o t 02:44 AM, 06 Aug 2024
    [discord] <.wxg> Why, i can't read MMIO space
    https://cdn.discordapp.com/attachments/962350355839066130/1270210765051134086/image.png?ex=66b2df75&is=66b18df5&hm=576bc55650fa2e4608c0d6db0e4b0a3f28ab9aac56db29a73fdfd7b6fdabb82b&
    None
  • @HughEverett ↶ Reply to #7450 #7451 02:52 AM, 06 Aug 2024
    Is it only for the MMIO space? Or do you see the same error for other physical addresses as well?
  • @HyperDbgBot #7452 b o t 02:55 AM, 06 Aug 2024
    [discord] <.wxg> [reply]: yep. only MMIO can't work
  • @HughEverett ↶ Reply to #7452 #7453 03:46 AM, 06 Aug 2024
    Are you sure that this MMIO region is readable? Did you check the same with WinDbg? Does it read it?
  • @HughEverett ↶ Reply to #7452 #7454 03:47 AM, 06 Aug 2024
    As long as I remember (not sure) some MMIO regions that try transfer buffers to the target device (e.g., DMA regions) are not readable. Isn't it because of this? 🤨
  • @HyperDbgBot #7455 b o t 03:54 AM, 06 Aug 2024
    [discord] <.wxg> [reply]: readable.

    from rweverything
    https://cdn.discordapp.com/attachments/962350355839066130/1270228406906257408/image.png?ex=66b2efe3&is=66b19e63&hm=0e913626e26e5270ec1a3f61311bac6a4807952d066e3592c983721d96eca48d&
    None
  • @390284538 #7456 04:51 AM, 06 Aug 2024
    Joined.
  • @CheraghiMilad1997 #7457 05:20 AM, 06 Aug 2024
    Joined.
  • @HughEverett ↶ Reply to #7455 #7458 05:40 AM, 06 Aug 2024
    🤔
  • @HughEverett ↶ Reply to #7455 #7459 05:40 AM, 06 Aug 2024
    Is it an open-source tool? Don't have any idea what's going wrong there.
  • @HughEverett #7460 05:41 AM, 06 Aug 2024
    Maybe cache policy?
  • @HyperDbgBot #7461 b o t 05:53 AM, 06 Aug 2024
    [discord] <.wxg> [reply]: yep. I am using the the latest complied binaries
  • @HyperDbgBot #7462 b o t 06:19 AM, 06 Aug 2024
    [discord] <0xkylm> Hello
  • @473323185 #7463 06:57 AM, 06 Aug 2024
    Joined.
  • @rtiwari7 #7464 07:34 AM, 06 Aug 2024
    Joined.
  • @lhecha0s #7465 02:11 PM, 06 Aug 2024
    Joined.
  • @HyperDbgBot #7466 b o t 10:49 PM, 06 Aug 2024
    [discord] <.wxg> [reply]: What is that
  • 07 August 2024 (9 messages)
  • @HughEverett ↶ Reply to #7461 #7467 04:31 AM, 07 Aug 2024
    Could you send me a link to its github or source code?
  • @HughEverett ↶ Reply to #7466 #7468 04:37 AM, 07 Aug 2024
    The cache policy of how to read the memory using different caching methods.

    Windbg has this feature, though HyperDbg does not support caching policy yet:
    https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/-db---dc---dd---dp---dq---du---dw

    photo_2024-08-07_04-37-22.jpg
  • @HughEverett #7469 04:37 AM, 07 Aug 2024
    But I think the problem shouldn't be because of this caching policies. 🤔
  • @HyperDbgBot #7470 b o t 04:44 AM, 07 Aug 2024
    [discord] <.wxg> [reply]: https://github.com/HyperDbg/HyperDbg/releases/tag/v0.10
    Release v0.10 · HyperDbg/HyperDbg

    HyperDbg v0.10 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...

  • @HyperDbgChannel #7474 04:53 AM, 07 Aug 2024
    This is why you should always consider using HyperDbg's script engine to avoid what we refer to as "unsafe behavior".

    Read more:
    https://docs.hyperdbg.org/tips-and-tricks/considerations/the-unsafe-behavior

    photo_2024-08-07_04-53-31.jpg
  • @HyperDbgBot #7475 b o t 04:55 AM, 07 Aug 2024
    [discord] <.wxg> [reply]: Intel Network Adapter MMIO/Space
  • @HyperDbgBot #7478 b o t 05:08 AM, 07 Aug 2024
    [discord] <.wxg> [reply]: The MMIO address shown in my image is an example and not real, as depicted in the sample picture.

    Using MmMapIoSpace access the MMIO space (0x84600000) that hyperDBG cannot access.
    PVOID address = MmMapIoSpaceEx(PhysicalAddress = 0x84600000, 0x100000, PAGE_READWRITE);
    // Access the address;
    https://cdn.discordapp.com/attachments/962350355839066130/1270609529675059251/Windows-cannot-identify-all-the-resources-Code-16.png?ex=66b452d6&is=66b30156&hm=246900c3f925aebc79098106c0949d8fb263eb053564bb3a5b3ef94e161f0b93&
    None
  • @HyperDbgBot #7479 b o t 05:14 AM, 07 Aug 2024
    [discord] <.wxg> [reply]: You can select a device with MMIO space from WDM, such as a network adapter or a graphics card, to check its MMIO space range and attempt to access it.
    Currently, HyperDBG cannot access any MMIO space.
    My system version is Windows 11 23H2 22631.3880.
  • @jashonea #7480 08:54 AM, 07 Aug 2024
    Joined.
  • 08 August 2024 (7 messages)
  • @MattSuckling #7483 03:31 PM, 08 Aug 2024
    Joined.
  • @Cynical9 #7484 09:15 PM, 08 Aug 2024
    Has anyone had success with Debugger mode connecting with 2 physical machines? I am trying to connect via virtual serial port, is there good software that will work or will usb to com port cables work?
  • @honorary_bot #7485 09:18 PM, 08 Aug 2024
    The target machine (the one you want to debug) has to have native serial port. The reason for that is you need drivers for the transport. While writing a driver for serial connection is simple, it is not simple to write one and maintain it coherent with the target OS for USB.
  • @honorary_bot #7486 09:19 PM, 08 Aug 2024
    Simply put, USB to COM converter will only work with the host machine, the target one has to have a netive serial port.
  • @honorary_bot #7487 09:21 PM, 08 Aug 2024
    I know a hypervisor level debugger that can debug physical machines with different transports, but I'm not sure if @HughEverett will appreciate unauthorized ad :)
  • @Cynical9 #7488 09:22 PM, 08 Aug 2024
    Hmm and the VMI debugging is not supported or im assuming not stable in the latest build, this is making it difficult to use as I cant use VMware or Virtualbox as the application I am trying to debug doesn’t run well in these environments
  • @Cynical9 #7489 09:22 PM, 08 Aug 2024
    Sure if you get the go ahead please let me know
  • 09 August 2024 (5 messages)
  • @6435570932 #7490 03:23 AM, 09 Aug 2024
    Hello everyone, I want to learn to make a vt debugger, do you have any other projects besides hydbg, the source code of virtualbox on Windows is somewhat difficult to imitate
  • @HughEverett ↶ Reply to #7487 #7491 04:26 AM, 09 Aug 2024
    Of course, feel free to advertise whatever you want.
  • @HughEverett ↶ Reply to #7487 #7492 04:27 AM, 09 Aug 2024
    I'm pretty sure he's talking about PulseDbg, which is great debugger. 👌
  • @HughEverett ↶ Reply to #7488 #7493 04:27 AM, 09 Aug 2024
    Doesn't run in VMware workstation? 🤨
  • @HughEverett ↶ Reply to #7490 #7494 04:28 AM, 09 Aug 2024
    You can start learning about hypervisors by reading Hypervisor From Scratch series:
    https://rayanfam.com/tutorials/
    Tutorials

    We write about Windows Internals, Hypervisors, Linux, and Networks.

  • 10 August 2024 (21 messages)
  • @yxxyz #7495 01:27 PM, 10 Aug 2024
    Joined.
  • @yxxyz #7496 01:37 PM, 10 Aug 2024
    hello , is possible debug host exception handle? I found my vm stuck if used host nmi

    photo_2024-08-10_13-37-58.jpg
  • @HughEverett ↶ Reply to #7496 #7497 01:43 PM, 10 Aug 2024
    If you comment those lines, all exceptions are passed to the Windows IDT handler, except NMIs that are handled by HyperDbg.
  • @HughEverett #7498 01:43 PM, 10 Aug 2024
    Guest NMIs won't be handled like this, NMIs in guest are handled through a VM-exit.
  • @HughEverett #7499 01:44 PM, 10 Aug 2024
    But, generally I think when an NMI is triggered, all other exceptions/faults/interrupts are masked until next execution of 'iret'.
  • @HughEverett #7500 01:45 PM, 10 Aug 2024
    But it's kinda weird, why are you trying to do that? 🤔
  • @yxxyz #7501 02:07 PM, 10 Aug 2024
    🤣 my system stuck in vmware and i try to find the reason. it work if nmi used windows idt. if nmi use hostidt, windbg respon command extremely slow.
  • @HughEverett ↶ Reply to #7501 #7502 02:23 PM, 10 Aug 2024
    Did you try to change this pragma?

    https://github.com/HyperDbg/HyperDbg/blob/ceca0ae762b09ec9a8d55c94fcd62332e3657e04/hyperdbg/hyperhv/code/vmm/vmx/VmxBroadcast.c#L31
    HyperDbg/hyperdbg/hyperhv/code/vmm/vmx/VmxBroadcast.c at ceca0ae762b09ec9a8d55c94fcd62332e3657e04 · HyperDbg/HyperDbg

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

  • @DK_ZAG #7503 02:28 PM, 10 Aug 2024
    Is there any vt debugger source code that can debug games?
  • @HughEverett ↶ Reply to #7503 #7504 02:33 PM, 10 Aug 2024
    Probably, the only currently maintained VT debugger is HyperDbg. I'm not aware of any other virtualization-based debugger that is currently maintained (working with the latest Windows versions).
  • @DK_ZAG #7505 02:36 PM, 10 Aug 2024
    How to modify so that hyperdbg can debug games?
  • @HughEverett ↶ Reply to #7505 #7506 02:49 PM, 10 Aug 2024
    HyperDbg, by its very design, is not intended for debugging games. Unlike traditional debuggers, it is more stealthy because it doesn't use any Windows debugging APIs. Debugging games are really complicated due to the anti-hypervisor and anti-debugging mechanisms they often use. This requires a deep understanding and advanced techniques to bypass these protections, which go beyond HyperDbg's intended use.

    I see some individuals do modify HyperDbg for such purposes and keep those modifications private for their personal use, but please consider that HyperDbg's philosophy is to offer a powerful VT-based debugger with unique features that are not available in classic debuggers and it's not about facilitating game cheating.
  • @DK_ZAG #7507 02:51 PM, 10 Aug 2024
    👌
  • @yxxyz ↶ Reply to #7502 #7508 06:36 PM, 10 Aug 2024
    it seems have connection with debugpoint and DbgPrintEx in vmm root when uses hostidt on nmi.
  • @HughEverett ↶ Reply to #7508 #7509 06:37 PM, 10 Aug 2024
    HyperDbg doesn't use DbgPrint and it's variants in the vmx root mode.
  • @HughEverett ↶ Reply to #7508 #7510 06:37 PM, 10 Aug 2024
    How did you run HyperDbg? Is there a way I can reproduce your error?
  • @yxxyz ↶ Reply to #7510 #7511 06:41 PM, 10 Aug 2024
    I add some log in hyperhv and it get this problem. If u want to reproduce this problem, you can try adding a breakpoint in vmm code.
  • @HughEverett ↶ Reply to #7511 #7512 06:42 PM, 10 Aug 2024
    You shouldn't use DbgPrint in hyperhv. You need to use the 'LogInfo' and its variants to use custom hyperdbg's logging component instead of DbgPrint.
  • @yxxyz #7513 06:45 PM, 10 Aug 2024
    got that! thank u so much.
  • @HughEverett ↶ Reply to #7251 #7514 06:57 PM, 10 Aug 2024
    @yxxyz take a look at this reply too. It might help if you trying to debug HyperDbg.
  • @1670864595 ↶ Reply to #5016 #7515 09:23 PM, 10 Aug 2024
  • 11 August 2024 (7 messages)
  • @1906828983 #7516 06:03 AM, 11 Aug 2024
    Has anyone encountered this error before? It is triggered when exiting debugging on a real machine (the computer was in sleep for more than 12 hours without being used before).

    1: kd> k
    # Child-SP RetAddr Call Site
    00 ffffab00`d17eb158 fffff806`608fbe2e nt!KeBugCheckEx
    01 ffffab00`d17eb160 fffff806`6080891f nt!HvlpVtlCallExceptionHandler+0x22
    02 ffffab00`d17eb1a0 fffff806`6075f917 nt!RtlpExecuteHandlerForException+0xf
    03 ffffab00`d17eb1d0 fffff806`6075d846 nt!RtlDispatchException+0x297
    04 ffffab00`d17eb8f0 fffff806`607fef42 nt!KiDispatchException+0x186
    05 ffffab00`d17ebfb0 fffff806`607fef10 nt!KxExceptionDispatchOnExceptionStack+0x12
    06 ffffa789`48c2f388 fffff806`608126e5 nt!KiExceptionDispatchOnExceptionStackContinue
    07 ffffa789`48c2f390 fffff806`6080c178 nt!KiExceptionDispatch+0x125
    08 ffffa789`48c2f570 fffff806`860a3fe2 nt!KiInvalidOpcodeFault+0x338
    09 ffffa789`48c2f708 00000dcc`8167789f hprdbghv!AsmVmxVmcall+0x22 [f:\HyperDbg\hyperdbg\hprdbghv\code\assembly\AsmVmxOperation.asm @ 32]
    0a ffffa789`48c2f710 00000000`00000000 0x00000dcc`8167789f
  • @HughEverett ↶ Reply to #7516 #7517 06:21 AM, 11 Aug 2024
    I think a similar issue was discussed previously in the group. At that time, we conclude that there are some situations maybe with ACPI that is not handled correctly in HyperDbg.
  • @HughEverett #7518 06:21 AM, 11 Aug 2024
    But, unfortunately it's really hard to reproduce and find the root cause.
  • @HughEverett ↶ Reply to #7516 #7519 06:24 AM, 11 Aug 2024
    Though, you're callstack is really interesting to me, since it seems that a VMCALL vm-exit happens there which usually happens in the case of Hyper-V. As far as I know, VMware workstation won't use VMCALL instruction within the guest. So, just curious to know, is hyper-v active in your target system? 🤔
  • @1906828983 ↶ Reply to #7519 #7520 06:26 AM, 11 Aug 2024

    photo_2024-08-11_06-26-14.jpg
  • @1906828983 #7521 06:27 AM, 11 Aug 2024

    photo_2024-08-11_06-27-18.jpg
  • @HyperDbgBot #7523 b o t 07:31 PM, 11 Aug 2024
    [discord] <.wxg> [reply]: Did you reproduce it?
  • 12 August 2024 (1 messages)
  • @7064969581 #7526 09:20 PM, 12 Aug 2024
    Joined.
  • 13 August 2024 (4 messages)
  • @HughEverett ↶ Reply to #7520 #7527 03:39 AM, 13 Aug 2024
    Got it thank you.
  • @HughEverett ↶ Reply to #7523 #7528 03:40 AM, 13 Aug 2024
    Not yet, though I'll check it this week.
  • @1906828983 #7529 01:17 PM, 13 Aug 2024
    https://rayanfam.com/topics/defeating-malware-anti-vm-techniques-cpuid-based-instructions/ @HughEverett Is this bypass feature built into hyerdbg? How to enable it?
    Defeating malware’s Anti-VM techniques (CPUID-Based Instructions)

    We write about Windows Internals, Hypervisors, Linux, and Networks.

  • @HughEverett ↶ Reply to #7529 #7530 01:29 PM, 13 Aug 2024
    Nope it's not on HyperDbg but you can write a simple script to achieve the same functionality. Take a look at this video, you'll get an idea how to write it:

    https://youtu.be/H4lrb5x64Ws?si=PKawMAypbHH2gyMd
    Dbg3301: HyperDbg 08 03 CPUID Hooking

    View the full free MOOC at https://ost2.fyi/Dbg3301. This course is an introductory guide to HyperDbg debugger, guiding you through the initial steps of using HyperDbg, covering essential concepts, principles, debugging functionalities, along with practical examples and numerous reverse engineering methods that are unique to HyperDbg. Whether you have an interest in reverse engineering or seek to elevate your reverse engineering skills with hypervisor-assisted approaches, this course provides a solid foundation for starting your journey.

  • 14 August 2024 (16 messages)
  • @1906828983 ↶ Reply to #7516 #7532 08:37 AM, 14 Aug 2024
  • @1906828983 ↶ Reply to #7532 #7533 08:43 AM, 14 Aug 2024
    After waking up the machine I send the exit command triggering this error
  • @HughEverett ↶ Reply to #7532 #7534 09:13 AM, 14 Aug 2024
    is it the process of VMware tools?
  • @1906828983 #7535 09:13 AM, 14 Aug 2024
    I'm running on a real machine
  • @HughEverett ↶ Reply to #7535 #7536 09:21 AM, 14 Aug 2024
    Is it a Windows process? or an anti-hypervisor technique?
  • @1906828983 #7537 09:31 AM, 14 Aug 2024
    The triggered address is invalid, and no other related anti-hypervisor programs are running
  • @1906828983 #7538 09:36 AM, 14 Aug 2024
    Debugger saved IRQL for processor 0x1 -- 2 (DISPATCH_LEVEL)
  • @1906828983 #7539 09:36 AM, 14 Aug 2024
    Process space in system
  • @1906828983 #7540 10:20 AM, 14 Aug 2024
    If you are debugging in a virtual machine, this is the case: manually triggering sleep and then the virtual machine appears to restart immediately. Am I the only one who encounters this situation?

    test NtOpenProcess
    test NtOpenProcess

    the remote connection is closed

    ffffffff: kHyperDbg>
  • @HyperDbgBot #7541 b o t 12:13 PM, 14 Aug 2024
    [discord] <hongjunli> Hi guys How do I use it on xdbg64?
  • @anones123 #7542 01:27 PM, 14 Aug 2024
    Joined.
  • @HughEverett ↶ Reply to #7541 #7543 03:58 PM, 14 Aug 2024
    There are a couple of ways for passing debugging events (e.g., #bp and #db) to the ring 0 or the ring 3 debuggers like using these commands:

    test breakpoint off
    test trap off

    You can use the above commands to pass events to x64dbg or WinDbg.
  • @HughEverett ↶ Reply to #7540 #7544 04:00 PM, 14 Aug 2024
    Is it about executing VMCALL or triggering the bug for sleep? Not sure if we're in the same page. 🤔
  • @HyperDbgBot #7545 b o t 04:02 PM, 14 Aug 2024
    [discord] <rayanfam> [reply]: Also here is a video of debugging WinDbg by using HyperDbg, you might find it helpful:
    https://youtu.be/wL7qDdzq5gA?si=-r8T8aM7guyrr7Sd
    Dbg3301: HyperDbg 11 02 Debugging WinDbg

    View the full free MOOC at https://ost2.fyi/Dbg3301. This course is an introductory guide to HyperDbg debugger, guiding you through the initial steps of using HyperDbg, covering essential concepts, principles, debugging functionalities, along with practical examples and numerous reverse engineering methods that are unique to HyperDbg. Whether you have an interest in reverse engineering or seek to elevate your reverse engineering skills with hypervisor-assisted approaches, this course provides a solid foundation for starting your journey.

  • @1906828983 ↶ Reply to #7544 #7546 04:08 PM, 14 Aug 2024
    I am discussing two issues:
    The first is to install hyperdbg on a real machine (using epthook), sleep and wake up the machine, and then send the exit command to exit and trigger a blue screen.
    The second is to install hyperdbg in vmware (using epthook) and then manually trigger sleep to immediately trigger a restart (no blue screen)
  • @375274303 #7547 10:02 PM, 14 Aug 2024
    Joined.
  • 15 August 2024 (4 messages)
  • @HughEverett ↶ Reply to #7546 #7548 10:54 AM, 15 Aug 2024
    I just tested it on VMware and it just closes the connection.

    photo_2024-08-15_10-54-18.jpg
  • @HughEverett ↶ Reply to #7548 #7549 10:54 AM, 15 Aug 2024
    Which is expected, I didn't see a VMCALL or anything like that. 🤔
  • @HughEverett #7550 10:55 AM, 15 Aug 2024
    Maybe it only happens on a physical machine?
  • @HyperDbgBot #7551 b o t 11:10 AM, 15 Aug 2024
    [discord] <rayanfam> [reply]: I tested it with a sample MMIO address and it works. I don't have an nvidia GPU right now to test it with MMIO address space of a GPU but it seems to work on regular MMIOs.
    https://cdn.discordapp.com/attachments/962350355839066130/1273599714725728337/image.png?ex=66bf33aa&is=66bde22a&hm=50dcc26b2c8bba643660a5fc24fefb43d00aabdd646f6a364fcc4bc47190eaa4&
    None
  • 16 August 2024 (5 messages)
  • @HyperDbgBot #7553 b o t 01:35 AM, 16 Aug 2024
    [discord] <.wxg> [reply]: None of the MMIO accesses work in my case. I am using VMI; could that be related?
  • @HyperDbgBot #7554 b o t 01:41 AM, 16 Aug 2024
    [discord] <.wxg> [reply]: Physical and virtual addresses are working, except for MMIO.
  • @pdnh1723 #7555 02:21 AM, 16 Aug 2024
    Joined.
  • @HughEverett ↶ Reply to #7554 #7556 03:09 PM, 16 Aug 2024
    That's weird. Maybe it's because of specific IO device (GPU in this case). 🤔
  • @HyperDbgBot #7557 b o t 03:45 PM, 16 Aug 2024
    [discord] <.wxg> [reply]: I suspect that the MMIO address of the graphics card in the virtual machine is physical memory space, so it works because this device is a virtual graphics card.

    Have you tried accessing real MMIO addresses?
  • 18 August 2024 (46 messages)
  • @HughEverett ↶ Reply to #7557 #7558 11:11 AM, 18 Aug 2024
    Yeah, it seems you're right.

    photo_2024-08-18_11-11-20.jpg
  • @HughEverett #7559 11:12 AM, 18 Aug 2024
    HyperDbg cannot show MMIO addresses in the physical machine. I'll try to investigate that. 🤔
  • @honorary_bot ↶ Reply to #7559 #7560 11:12 AM, 18 Aug 2024
    How do you implement physical memory access? mapiospace?
  • @HughEverett ↶ Reply to #7560 #7561 11:14 AM, 18 Aug 2024
    No, I think I mapped it to a reserved virtual address directly from PTE.
  • @HughEverett ↶ Reply to #7561 #7562 11:14 AM, 18 Aug 2024
    Is it wrong? 🤨
  • @honorary_bot #7563 11:15 AM, 18 Aug 2024
    Sorry, don’t quite got what you mean. What is a reserved virtual address?
  • @honorary_bot ↶ Reply to #7561 #7564 11:17 AM, 18 Aug 2024
    Two points to consider when working with MMIO: EPT entry for that physical (system) address should be uncached. There are some devices that allow write-combined caching, but in general it is uncached. Second: it should be accessed as dwords (4 bytes)
  • @HughEverett ↶ Reply to #7563 #7565 11:18 AM, 18 Aug 2024
    This function reserves a virtual address without actually allocating physical memory. Then, we could safely modify the PTE entry corresponding to this address and change the PFN of this address and access the physical memory using the same virtual address.

    https://github.com/HyperDbg/HyperDbg/blob/ceca0ae762b09ec9a8d55c94fcd62332e3657e04/hyperdbg/hyperhv/code/memory/MemoryMapper.c#L573
    HyperDbg/hyperdbg/hyperhv/code/memory/MemoryMapper.c at ceca0ae762b09ec9a8d55c94fcd62332e3657e04 · HyperDbg/HyperDbg

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

  • @honorary_bot ↶ Reply to #7565 #7566 11:19 AM, 18 Aug 2024
    Ok understood your implementation, make sure it is mapped as uncached then
  • @HughEverett ↶ Reply to #7566 #7567 11:19 AM, 18 Aug 2024
    So it could be a caching problem?
  • @honorary_bot #7568 11:20 AM, 18 Aug 2024
    And accessed as 4 bytes. memcpy doesn’t work by default
  • @honorary_bot ↶ Reply to #7567 #7569 11:20 AM, 18 Aug 2024
    Most likely one of those two things
  • @honorary_bot #7570 11:21 AM, 18 Aug 2024
    I observed a similar behaviour when I was using 64 bit implementation of memcpy
  • @honorary_bot #7571 11:21 AM, 18 Aug 2024
    Intel devices allow that
  • @honorary_bot #7572 11:21 AM, 18 Aug 2024
    But non Intel - mostly not
  • @HughEverett ↶ Reply to #7568 #7573 11:21 AM, 18 Aug 2024
    4 bytes? You mean reading 8 bytes from the MMIO space doesn't work? 🤨
  • @honorary_bot #7574 11:21 AM, 18 Aug 2024
    I see it’s Realtek
  • @honorary_bot ↶ Reply to #7573 #7575 11:21 AM, 18 Aug 2024
    No, it should not by the PCI spec actually
  • @honorary_bot #7576 11:22 AM, 18 Aug 2024
    It’s just Intel devices on bus 0 (root complex) are not real pci devices :)
  • @honorary_bot #7577 11:22 AM, 18 Aug 2024
    So they allow random width access
  • @honorary_bot #7578 11:22 AM, 18 Aug 2024
    Once it’s random Realtek or something else, it will likely fail
  • @honorary_bot ↶ Reply to #7573 #7579 11:23 AM, 18 Aug 2024
    Your [memcpy] should only operate in aligned 4 bytes chunks there
  • @HughEverett ↶ Reply to #7579 #7580 11:24 AM, 18 Aug 2024
    Not sure if I get it correctly. Reading 8 bytes at a time is not allowed?
  • @honorary_bot ↶ Reply to #7580 #7581 11:24 AM, 18 Aug 2024
    No, just 4 bytes. It’s by the PCI spec
  • @honorary_bot #7582 11:25 AM, 18 Aug 2024
    The mmio from the screenshot is a BAR address
  • @honorary_bot #7583 11:25 AM, 18 Aug 2024
    So, pci
  • @HughEverett ↶ Reply to #7581 #7584 11:26 AM, 18 Aug 2024
    One more question, is there any way to know whether and address is a RAM physical or an MMIO address?
  • @honorary_bot ↶ Reply to #7581 #7585 11:26 AM, 18 Aug 2024
    That also means not 1 or 2 bytes. Only mov dword ptr
  • @honorary_bot ↶ Reply to #7584 #7586 11:26 AM, 18 Aug 2024
    Yes, two ways
  • @HughEverett ↶ Reply to #7584 #7587 11:26 AM, 18 Aug 2024
    As long as I remember, the arrangement of MMIO physical addresses only passes to Windows at startup (from UEFI).
  • @HughEverett ↶ Reply to #7557 #7588 11:29 AM, 18 Aug 2024
    I created this issue for further investigation: https://github.com/HyperDbg/HyperDbg/issues/457
    Problem with reading physical addresses of MMIO devices in the VMI Mode · Issue #457 · HyperDbg/HyperDbg

    Based on the discussion, in the HyperDbg group. It seems that HyperDbg cannot read MMIO physical addresses in the VMI Mode. ref: https://t.me/HyperDbg/7557

  • @honorary_bot #7589 11:29 AM, 18 Aug 2024
    First way is to follow UEFI memory map. UEFI does everything for you
  • @HughEverett ↶ Reply to #7589 #7590 11:30 AM, 18 Aug 2024
    Is it still available once Windows is fully loaded?
  • @honorary_bot #7591 11:30 AM, 18 Aug 2024
    Second - sort of simplistic root complex driver, you can learn reserved memory regions TOLUD, TOLUUD and stuff like that from pci device 0.0.0
  • @honorary_bot ↶ Reply to #7591 #7592 11:30 AM, 18 Aug 2024
    On client systems, doesn’t work for servers!
  • @honorary_bot ↶ Reply to #7590 #7593 11:30 AM, 18 Aug 2024
    No, it’s in the boot services only
  • @honorary_bot #7594 11:31 AM, 18 Aug 2024
    And since you work on windows, there might be a 3rd way - parse pfn database.
  • @honorary_bot #7595 11:31 AM, 18 Aug 2024
    Some reserved memory address ranges are in ram, but you need to treat those as mmios as well
  • @honorary_bot #7596 11:32 AM, 18 Aug 2024
    Like gfx dsm and gsm for instance
  • @HughEverett ↶ Reply to #7589 #7597 11:32 AM, 18 Aug 2024
    Do you have any sample codes for this? e.g., any open source project that did the similar thing?
  • @HughEverett ↶ Reply to #7595 #7598 11:32 AM, 18 Aug 2024
    Ah, kinda complex 🫠
  • @honorary_bot ↶ Reply to #7597 #7599 11:32 AM, 18 Aug 2024
    That I’m not sure, but I can share my pseudo code
  • @honorary_bot #7600 11:33 AM, 18 Aug 2024
    Once I’m at my computer though, I’m travelling atm :)
  • @HughEverett ↶ Reply to #7600 #7601 11:33 AM, 18 Aug 2024
    Great. Thank you. Pls share it with us once you have access to it. 🙏
  • @HyperDbgBot #7602 b o t 01:40 PM, 18 Aug 2024
    [discord] <.wxg> [reply]: 🫡
  • @saitama123a #7603 02:27 PM, 18 Aug 2024
    Joined.
  • 19 August 2024 (3 messages)
  • @395437265 #7604 04:46 PM, 19 Aug 2024
    hey hey, any news about using asm in script body ?
  • @ashnaghad #7605 07:55 PM, 19 Aug 2024
    Joined.
  • @395437265 #7606 08:51 PM, 19 Aug 2024
    some useful script - how to get current time as integers:
    ? {
    void printTime() {
    printf("process pid %d \n",$pid);
    timePtr = $time;
    printf("TIME PTR %x\n", timePtr);

    yearPtr = timePtr - 10;
    year = (db(yearPtr+1) << 8) | db(yearPtr);

    monthPtr = timePtr - E;
    month = (db(monthPtr+1) << 8) | db(monthPtr);

    dayPtr = timePtr - C;
    day = (db(dayPtr+1) << 8) | db(dayPtr);
    hourPtr = timePtr - A;
    hour = (db(hourPtr+1) << 8) | db(hourPtr);
    minPtr = timePtr - 8;
    min = (db(minPtr+1) << 8) | db(minPtr);
    secPtr = timePtr - 6;
    sec = (db(secPtr+1) << 8) | db(secPtr);
    msecPtr = timePtr - 4;
    msec = (db(msecPtr+1) << 8) | db(msecPtr);
    printf("FULL TIME : %d %d %d %d %d %d %d\n", year, month, day, hour, min, sec, msec);
    }
    printTime();
    }
  • 20 August 2024 (31 messages)
  • @6926043556 #7608 12:51 AM, 20 Aug 2024
    Joined.
  • @instw0 #7609 10:05 AM, 20 Aug 2024
    i see project hypervisor from scratch part 8. Help me please for code... HvHandleCpuid(GuestRegs) - the function responsible for processing cpuid?
  • @HughEverett ↶ Reply to #7604 #7610 12:09 PM, 20 Aug 2024
    Will be ready in future versions. @xmaple555 will notify us once he finds time to implement it.
  • @HughEverett ↶ Reply to #7606 #7611 12:09 PM, 20 Aug 2024
    Great. Can you consider creating a PR and add it here? https://github.com/HyperDbg/scripts/tree/master/basics
    scripts/basics at master · HyperDbg/scripts

    A collection of useful HyperDbg scripts. Contribute to HyperDbg/scripts development by creating an account on GitHub.

  • @HughEverett ↶ Reply to #7609 #7612 12:12 PM, 20 Aug 2024
    It's handled from this function:
    https://github.com/HyperDbg/HyperDbg/blob/ceca0ae762b09ec9a8d55c94fcd62332e3657e04/hyperdbg/hyperhv/code/vmm/vmx/Vmexit.c#L168
    HyperDbg/hyperdbg/hyperhv/code/vmm/vmx/Vmexit.c at ceca0ae762b09ec9a8d55c94fcd62332e3657e04 · HyperDbg/HyperDbg

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

  • @395437265 #7613 12:17 PM, 20 Aug 2024
    @HughEverett how do i stop breaking on popfq call ?
  • @HughEverett ↶ Reply to #7613 #7614 12:18 PM, 20 Aug 2024
    Stop on execution of popfq?
  • @395437265 #7615 12:19 PM, 20 Aug 2024
    i mean it automatically stops, i want prevent it
  • @HughEverett ↶ Reply to #7615 #7616 12:19 PM, 20 Aug 2024
    Does it enable a trap flag from the stack?
  • @395437265 ↶ Reply to #7611 #7617 12:21 PM, 20 Aug 2024
    PR created
  • @395437265 ↶ Reply to #7616 #7618 12:21 PM, 20 Aug 2024
    mm i dont know,
    i even dont have any monitor, but vm stops all of sudden:

    3: kHyperDbg> g
    debuggee is running...
    ffff8104`0971da4c 9D popfq

    3: kHyperDbg> g
    debuggee is running...
    ffff8104`0971da4d C3 ret

    3: kHyperDbg> g
    debuggee is running...
    ffff8104`0b81daff F1 int1

    4: kHyperDbg> g
    debuggee is running...
    ffff8104`0b81db01 81 24 24 FF FE FF FF and dword ptr ss:[rsp], 0xFFFFFEFF

    4: kHyperDbg> g
    debuggee is running...
    ffff8104`0b81db08 9D popfq

    4: kHyperDbg> g
    debuggee is running...
    ffff8104`0b81db09 C3 ret

    4: kHyperDbg> g
    debuggee is running...
    ffff8104`096926ff F1 int1

    5: kHyperDbg> g
  • @HughEverett ↶ Reply to #7618 #7619 12:22 PM, 20 Aug 2024
    Check the trap flag before continuing the debuggee.
  • @HughEverett #7620 12:22 PM, 20 Aug 2024
    like:
    r @tf
  • @395437265 #7621 12:23 PM, 20 Aug 2024
    ok.. will wait until next stop and check
  • @HughEverett #7622 12:23 PM, 20 Aug 2024
    It seems to be an anti-debugging method.
  • @HughEverett #7623 12:23 PM, 20 Aug 2024
    If it's because of a trap flag, then you have plenty of options for masking it.
  • @395437265 #7624 12:25 PM, 20 Aug 2024
    i noticed, that it appears when im connecting to vm by RDP
  • @HughEverett ↶ Reply to #7624 #7625 12:30 PM, 20 Aug 2024
    🤨🤨
  • @395437265 #7626 12:36 PM, 20 Aug 2024
    i will let you know, when it stops again, its not so easy to reproduce
  • @instw0 ↶ Reply to #7612 #7627 12:54 PM, 20 Aug 2024
    __vmx_vmwrite(GUEST_RIP, (ULONG64)g_VirtualGuestMemoryAddress) - g_VirtualGuestMemoryAddress - addres starting guest code?
  • @395437265 #7628 06:29 PM, 20 Aug 2024
    @HughEverett got it again:
    0: kHyperDbg> r @tf
    tf=0000000000000001

    0: kHyperDbg> g
    debuggee is running...
    ntkrnlmp!KiSystemCall64+0x3:
    fffff803`6e811d03 65 48 89 24 25 10 00 00 00 mov qword ptr gs:[0x0000000000000010], rsp

    0: kHyperDbg> r @tf
    tf=0000000000000001

    0: kHyperDbg>
  • @6190448061 #7629 06:35 PM, 20 Aug 2024
    😘
  • @HughEverett ↶ Reply to #7627 #7630 06:40 PM, 20 Aug 2024
    yes
  • @HughEverett ↶ Reply to #7628 #7631 06:43 PM, 20 Aug 2024
    Ah, as I told you, it seems to be a anti-debugging method. You have plenty of options here. You can completely disable trap flags (#DBs) and later activate it by using 'test trap off'
  • @HughEverett ↶ Reply to #7631 #7632 06:44 PM, 20 Aug 2024
    or you can write a simple '!epthook' that either masks the trap flag '@tf = 0;' in a script or change the stack value that will be poped later and mask the trap flag.
  • @395437265 ↶ Reply to #7632 #7633 06:51 PM, 20 Aug 2024
    can you help with epthook? on which action hook shall execute ?
  • @HughEverett ↶ Reply to #7633 #7634 06:52 PM, 20 Aug 2024
    I think it needs to be executed after 'popfq'. 🤔
  • @HughEverett #7635 06:54 PM, 20 Aug 2024
    Or if you want to modify stack (since the 'popfq' instruction pops the rflags value from stack) then it should be on the 'popfq' instruction itself. or the instruction before the 'popfq'.
  • @395437265 #7636 06:56 PM, 20 Aug 2024
    im not sure whether popfq comes from debuggable process
  • @HughEverett ↶ Reply to #7636 #7637 06:57 PM, 20 Aug 2024
    debuggable process? HyperDbg doesn't care which process you gonna debug, you can put hooks on whatever system component that you want.
  • @395437265 #7638 06:58 PM, 20 Aug 2024
    ok.. looks like more info needed, i didnt note address which calls popfq
  • 21 August 2024 (75 messages)
  • @instw0 ↶ Reply to #7612 #7639 04:31 AM, 21 Aug 2024
    and in the new version, there is a trap(rflag.tf) processing when executing cpuid?
  • @2125395524 #7640 04:46 AM, 21 Aug 2024
    Joined.
  • @HughEverett ↶ Reply to #7639 #7641 10:25 AM, 21 Aug 2024
    We didn't discover a good solution for it yet!
  • @HughEverett ↶ Reply to #7557 #7642 10:27 AM, 21 Aug 2024
    Regarding this one, I changed the implementation to use 'MmMapIoSpaceEx'. Though, there seem to be a problem in the current implementation as the resulting memory is not equal to WinDbg's memory.

    photo_2024-08-21_10-27-10.jpg
  • @instw0 ↶ Reply to #7641 #7643 10:28 AM, 21 Aug 2024
    as far as I remember, it is necessary to check for the trap flag in vmexit (cpuid), handle the exception, and then the cpuid
  • @HughEverett ↶ Reply to #7643 #7644 10:30 AM, 21 Aug 2024
    But last time that we implemented it, it didn't work, if I remember correctly? 🤔
  • @HughEverett ↶ Reply to #7642 #7645 10:31 AM, 21 Aug 2024
    This is the new implementation of physical memory reading. Though, the above problem exists.
    https://github.com/HyperDbg/HyperDbg/blob/4b41b42d6c356820803322ad0ed30f63384260e0/hyperdbg/hyperhv/code/memory/MemoryManager.c#L174
    HyperDbg/hyperdbg/hyperhv/code/memory/MemoryManager.c at 4b41b42d6c356820803322ad0ed30f63384260e0 · HyperDbg/HyperDbg

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

  • @HughEverett ↶ Reply to #7645 #7646 10:31 AM, 21 Aug 2024
    @honorary_bot do you have any idea regarding this? Is it correctly implemented?
  • @HughEverett ↶ Reply to #7642 #7647 10:32 AM, 21 Aug 2024
    The result of reading physical memory is different from WinDbg's MMIO space.
  • @instw0 ↶ Reply to #7644 #7648 10:32 AM, 21 Aug 2024
    it worked, but periodically the hypervisor began to crash
  • @HughEverett ↶ Reply to #7647 #7649 10:33 AM, 21 Aug 2024
    It works fine with the regular (non-MMIO memory) but for MMIO, the result is invalid.

    photo_2024-08-21_10-33-48.jpg
  • @HughEverett ↶ Reply to #7648 #7650 10:34 AM, 21 Aug 2024
    What was the crash error?
  • @instw0 ↶ Reply to #7650 #7651 10:36 AM, 21 Aug 2024

    photo_2024-08-21_10-36-22.jpg
  • @HughEverett ↶ Reply to #7651 #7652 10:37 AM, 21 Aug 2024
    Did you find its patch? Where did we change last time to detect it?
  • @instw0 ↶ Reply to #7652 #7653 10:38 AM, 21 Aug 2024
    there is no source code left ;((( I thought the branch would exist on github
  • @honorary_bot ↶ Reply to #7646 #7654 10:45 AM, 21 Aug 2024
    PAGE_NOCACHE needed for uncached mappings
  • @honorary_bot #7655 10:45 AM, 21 Aug 2024
    PVOID VirtualAddress = MmMapIoSpaceEx(PhysicalAddressTemp, BufferSize, PAGE_READWRITE);
  • @honorary_bot #7656 10:45 AM, 21 Aug 2024
    Try PAGE_READWRITE | PAGE_NOCACHE
  • @HughEverett ↶ Reply to #7654 #7657 10:49 AM, 21 Aug 2024
    Same result:

    photo_2024-08-21_10-49-34.jpg
  • @HughEverett #7658 10:49 AM, 21 Aug 2024

    photo_2024-08-21_10-49-48.jpg
  • @HughEverett ↶ Reply to #7653 #7659 10:50 AM, 21 Aug 2024
    I'll try to rewrite it for you today.
  • @honorary_bot #7660 10:51 AM, 21 Aug 2024
    FFFFFFFF is a correct result for an unmapped mmio space
  • @honorary_bot #7661 10:51 AM, 21 Aug 2024
    Where did you get this addres from?
  • @instw0 ↶ Reply to #7659 #7662 10:52 AM, 21 Aug 2024
    That's great.
  • @HughEverett ↶ Reply to #7661 #7663 10:54 AM, 21 Aug 2024

    photo_2024-08-21_10-54-03.jpg
  • @HughEverett ↶ Reply to #7660 #7664 10:54 AM, 21 Aug 2024
    So, you mean the WinDbg's result is incorrect in this case?
  • @honorary_bot #7665 10:55 AM, 21 Aug 2024
    Oh, it's a GFX device, MMIO BAR
  • @honorary_bot #7666 10:55 AM, 21 Aug 2024
    No, windbg is right then
  • @honorary_bot #7667 10:56 AM, 21 Aug 2024
    Can you read 41000000 + 800000 just to make sure?
  • @honorary_bot #7668 10:56 AM, 21 Aug 2024
    I don't remember if this BAR starts with GTT or MMIO space
  • @honorary_bot #7669 10:57 AM, 21 Aug 2024
    Oh wait, wait
  • @honorary_bot #7670 10:58 AM, 21 Aug 2024
    I think I know what's happening
  • @HughEverett ↶ Reply to #7667 #7671 10:58 AM, 21 Aug 2024

    photo_2024-08-21_10-58-09.jpg
  • @honorary_bot #7672 10:58 AM, 21 Aug 2024
    I'm confusing the GFX BARs
  • @honorary_bot #7673 10:58 AM, 21 Aug 2024
    Can you read 500000000 instead? The other BAR?
  • @honorary_bot ↶ Reply to #7673 #7674 10:58 AM, 21 Aug 2024
    50000000
  • @HughEverett ↶ Reply to #7674 #7675 10:59 AM, 21 Aug 2024

    photo_2024-08-21_10-59-01.jpg
  • @honorary_bot #7676 10:59 AM, 21 Aug 2024
    So! It works
  • @honorary_bot #7677 10:59 AM, 21 Aug 2024
    It should be a framebuffer
  • @honorary_bot #7678 10:59 AM, 21 Aug 2024
    Unless the OS driver is loaded
  • @HughEverett ↶ Reply to #7676 #7679 10:59 AM, 21 Aug 2024
    Then why WinDbg is different in that case?
  • @HughEverett #7680 10:59 AM, 21 Aug 2024
    🤔
  • @honorary_bot #7681 11:00 AM, 21 Aug 2024
    I would suggest you to test BARs from a different device
  • @honorary_bot #7682 11:00 AM, 21 Aug 2024
    I'm very well awware of GFX devices (it's my job, hehe)
  • @honorary_bot #7684 11:00 AM, 21 Aug 2024
    It would take a lot of time to explain why GFX MMIO is a bad target for testing
  • @HughEverett ↶ Reply to #7681 #7685 11:00 AM, 21 Aug 2024
    50000000?
  • @HughEverett ↶ Reply to #7684 #7686 11:00 AM, 21 Aug 2024
    Ah, got it
  • @honorary_bot #7687 11:00 AM, 21 Aug 2024
    It behaves very different depending on a platform state
  • @HughEverett #7688 11:01 AM, 21 Aug 2024
    okay, I'll test it with another MMIO physical address and will let you know.
  • @honorary_bot #7689 11:01 AM, 21 Aug 2024
    Try one of network adapters (preferrably not the root complex one)
  • @honorary_bot ↶ Reply to #7689 #7690 11:01 AM, 21 Aug 2024
    Not on bus 0
  • @HughEverett ↶ Reply to #7689 #7691 11:03 AM, 21 Aug 2024

    photo_2024-08-21_11-03-50.jpg
  • @HughEverett #7692 11:04 AM, 21 Aug 2024
    Still FFFFFFF.
  • @HughEverett ↶ Reply to #7690 #7693 11:05 AM, 21 Aug 2024
    It's on PCIe bus 2

    photo_2024-08-21_11-05-20.jpg
  • @honorary_bot #7694 11:05 AM, 21 Aug 2024
    Well, MmCopyMemory(UserBuffer, CopyAddress, Size, MM_COPY_MEMORY_PHYSICAL, ReturnSize) will succeed, right? Try removing it
  • @honorary_bot #7695 11:06 AM, 21 Aug 2024
    Also, can't find what CheckAddressPhysical does
  • @HughEverett ↶ Reply to #7695 #7696 11:08 AM, 21 Aug 2024

    photo_2024-08-21_11-08-56.jpg
  • @HughEverett ↶ Reply to #7695 #7697 11:08 AM, 21 Aug 2024

    photo_2024-08-21_11-08-56.jpg
  • @HughEverett ↶ Reply to #7694 #7698 11:09 AM, 21 Aug 2024
    The same.
  • @honorary_bot #7699 11:14 AM, 21 Aug 2024
    Is your underlying EPT PTE is also non-cached?
  • @honorary_bot #7700 11:14 AM, 21 Aug 2024
    Coz I don't see any obvious mistake here
  • @honorary_bot #7701 11:15 AM, 21 Aug 2024
    Other than EPT discrepancy
  • @HughEverett ↶ Reply to #7699 #7702 11:15 AM, 21 Aug 2024
    Not sure. So, you mean I need to read it through a VMCALL in VMX-root mode to bypass EPT?
  • @honorary_bot #7703 11:15 AM, 21 Aug 2024
    FFFFFFFF is usually an invalid MMIO space
  • @honorary_bot ↶ Reply to #7702 #7704 11:16 AM, 21 Aug 2024
    I'm not sure about your implementation details, but yeah, sounds like worth trying
  • @HughEverett #7705 11:19 AM, 21 Aug 2024
    @instw0 check this new branch: https://github.com/HyperDbg/HyperDbg/tree/cpuid-trap
    GitHub - HyperDbg/HyperDbg at cpuid-trap

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

  • @HughEverett ↶ Reply to #7704 #7706 11:30 AM, 21 Aug 2024
    I tried VMCALL, still the same result. But, it's kinda expected since even WinDbg is under the hypervisor, so if the problem was because of EPT caching policies, it should produce the same result for WinDbg too.
  • @honorary_bot #7707 11:30 AM, 21 Aug 2024
    I see, then I'm not quite sure what's going on
  • @honorary_bot #7708 11:30 AM, 21 Aug 2024
    sorry
  • @HughEverett ↶ Reply to #7707 #7709 11:30 AM, 21 Aug 2024
    No worries, if I find the problem, I'll let you know.
  • @MHDZ1403 #7710 12:57 PM, 21 Aug 2024
    Joined.
  • @instw0 ↶ Reply to #7705 #7711 01:05 PM, 21 Aug 2024
    ia32-doc/out/ia32.h: No such file or directory
  • @instw0 #7712 01:06 PM, 21 Aug 2024
    v142
  • @HughEverett ↶ Reply to #7711 #7713 01:13 PM, 21 Aug 2024
    You forgot '--recursive' in the git clone.
  • @instw0 ↶ Reply to #7713 #7714 08:47 PM, 21 Aug 2024
    what could be the reason for this error?

    photo_2024-08-21_20-47-54.jpg
  • 22 August 2024 (8 messages)
  • @HughEverett ↶ Reply to #7714 #7715 03:39 AM, 22 Aug 2024
    reclone it like:
    git clone -b cpuid-trap --recursive https://github.com/HyperDbg/HyperDbg.git
  • @xmaple555 ↶ Reply to #7714 #7716 04:29 AM, 22 Aug 2024
    recent commits deleted the submodule in the branch dev. https://github.com/HyperDbg/HyperDbg/commit/27359df8faced23b40ac4cc05a57d891fa9b78d4
    Fix script-engine-test submodule bug · HyperDbg/HyperDbg@27359df

    Remove the script-engine-test from incorrect path

  • @HughEverett ↶ Reply to #7716 #7717 04:34 AM, 22 Aug 2024
    It's actually not removed, still available here:
    https://github.com/HyperDbg/HyperDbg/tree/dev/hyperdbg/tests
    HyperDbg/hyperdbg/tests at dev · HyperDbg/HyperDbg

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

  • @HughEverett ↶ Reply to #7716 #7718 04:36 AM, 22 Aug 2024
    But there was an error, since I moved it from another folder to this directory, it was not correctly modified. That's why Behrooz manually fixed it to avoid errors in the CI/CD.
  • @395437265 #7719 05:56 PM, 22 Aug 2024
    @HughEverett 20:55:24.297 - core : 3 - vmx-root? yes) [+] Information (DebuggerPerformRunScript:1740) | err, exceeding the max execution count - where i can find this error in code ?i dont see DebuggerPerformRunScript class...
  • @395437265 #7720 06:14 PM, 22 Aug 2024
    @xmaple555 maybe you know the answer ^^^^ ? :)
  • @xmaple555 ↶ Reply to #7720 #7721 07:01 PM, 22 Aug 2024
    https://github.com/HyperDbg/HyperDbg/blob/ceca0ae762b09ec9a8d55c94fcd62332e3657e04/hyperdbg/include/SDK/Headers/Constants.h#L570
    HyperDbg/hyperdbg/include/SDK/Headers/Constants.h at ceca0ae762b09ec9a8d55c94fcd62332e3657e04 · HyperDbg/HyperDbg

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

  • @instw0 #7722 08:02 PM, 22 Aug 2024
    and there is a function to track the start of the process (for example !cpuid pid ...., but the process has not started yet and I do not know the pid)
  • 24 August 2024 (3 messages)
  • @xmaple555 ↶ Reply to #7722 #7724 10:45 AM, 24 Aug 2024
    !epthook kernel32!BaseThreadInitThunk script{
    if (strcmp("notepad.exe", $pname)==0){
    pause();
    }
    }
  • @instw0 #7725 07:35 PM, 24 Aug 2024
    // Injects interruption to a guest
    VOID EventInjectInterruption(INTERRUPT_TYPE InterruptionType, EXCEPTION_VECTORS Vector, BOOLEAN DeliverErrorCode, ULONG32 ErrorCode)
    {
    INTERRUPT_INFO Inject = { 0 };
    Inject.Valid = TRUE;
    Inject.InterruptType = InterruptionType;
    Inject.Vector = Vector;
    Inject.DeliverCode = DeliverErrorCode;
    __vmx_vmwrite(VM_ENTRY_INTR_INFO, Inject.Flags);

    if (DeliverErrorCode) {
    __vmx_vmwrite(VM_ENTRY_EXCEPTION_ERROR_CODE, ErrorCode);
    }
    }
    there is such an interrupt handling function... what should be written to __vmx_vm write so that processing is forwarded to the operating system?
  • @395437265 ↶ Reply to #7721 #7726 08:04 PM, 24 Aug 2024
    can you pls explain in short how that counter works? does it just gets increased when event is triggered or there is some more complex logic underneath ?
  • 25 August 2024 (5 messages)
  • @HughEverett ↶ Reply to #7725 #7727 04:43 AM, 25 Aug 2024
    There are a couple of functions for injecting different interrupts/exceptions/faults in this file, you can use it:
    https://github.com/HyperDbg/HyperDbg/blob/master/hyperdbg/hyperhv/code/vmm/vmx/Events.c
    HyperDbg/hyperdbg/hyperhv/code/vmm/vmx/Events.c at master · HyperDbg/HyperDbg

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

  • @HughEverett ↶ Reply to #7725 #7728 04:45 AM, 25 Aug 2024
    It will be injected immediately after the processor resumes in the vmx non-root mode.

    Other than that, the ability to inject is also exported in the script engine as functions with/without error code, you can use these function:

    https://docs.hyperdbg.org/commands/scripting-language/functions/events/event_inject

    and

    https://docs.hyperdbg.org/commands/scripting-language/functions/events/event_inject_error_code
    event_inject | HyperDbg Documentation

    Description of the 'event_inject' function in HyperDbg Scripts

  • @instw0 ↶ Reply to #7728 #7729 05:59 AM, 25 Aug 2024
    Thanks for the answer! This is your example of hypervisor from scratch 8. Does it send interrupt handling to the operating system by default?
  • @HughEverett ↶ Reply to #7729 #7730 05:05 PM, 25 Aug 2024
    It will be injected by processor to the target guest. And it's handled by the operating system.
  • @instw0 ↶ Reply to #7730 #7731 05:23 PM, 25 Aug 2024
    so the parameters in the project are set correctly and nothing needs to be changed? analog operation in hyperdbg "trap flag off"
  • 26 August 2024 (1 messages)
  • @HyperDbgBot #7732 b o t 01:19 PM, 26 Aug 2024
    [discord] <kanrab> Hey. I’d like to contribute but I’m a bit of a newbie when it comes to contributing to large projects. I hope you don’t mind some newbie questions and I’m happy to be here :)!
  • 27 August 2024 (3 messages)
  • @HughEverett ↶ Reply to #7732 #7733 11:26 AM, 27 Aug 2024
    Ah, sorry for the very late response. That's really cool. You can start with Hypervisor From Scratch to know about the starting points and internals:
    https://rayanfam.com/tutorials/
    Tutorials

    We write about Windows Internals, Hypervisors, Linux, and Networks.

  • @HughEverett ↶ Reply to #7731 #7734 11:27 AM, 27 Aug 2024
    Yes. The parameters in the HyperDbg's VMX event handler are correctly configured.
  • @denys_volodarskyi #7735 06:44 PM, 27 Aug 2024
    Joined.
  • 28 August 2024 (3 messages)
  • @instw0 #7737 09:55 AM, 28 Aug 2024
    test trap off - disables the trap flag. is there any way to disable the processing of all debugging interrupts?
  • @HyperDbgBot #7738 b o t 05:22 PM, 28 Aug 2024
    [discord] <.wxg> Dear HyperDbg Team,

    I have two questions regarding the !monitor command:

    How can I set two different Debug Scripts (DS) with !monitor, one for write and one for read operations? When I try to use !monitor r and !monitor w to set two different scripts, I receive an error indicating that the same address cannot be set twice.

    How can I unhook an address that is being monitored by !monitor?

    Thank you for your assistance.
  • @HyperDbgBot #7739 b o t 06:23 PM, 28 Aug 2024
    [discord] <.wxg> [reply]: When using the !monitor command, I found that it incorrectly identifies the correct MMIO address as invalid.
    https://cdn.discordapp.com/attachments/962350355839066130/1278419624672628756/image.png?ex=66d0bc8e&is=66cf6b0e&hm=2fb65cf2d3cfd3139427d8e3d292b2c2bd79aabb7ab9e0c990c2656bf3b91f0a&
    None
  • 29 August 2024 (8 messages)
  • @ddedyad1 #7740 07:18 AM, 29 Aug 2024
    Joined.
  • @SicPsy #7741 07:21 AM, 29 Aug 2024
    @ddedyad1 Hello
  • @HughEverett ↶ Reply to #7737 #7742 12:49 PM, 29 Aug 2024
    What do you mean by 'debugging interrupts'? 🤔
  • @HughEverett ↶ Reply to #7738 #7743 12:55 PM, 29 Aug 2024
    You can have as many !monitor hooks as you want but only one hook within a 4 KB boundary of a page. For example, if you put a hook 0x12345678, you cannot put any more hooks on 0x12345000 to 0x12345fff (within a page boundary). For using multiple hooks you can hook an entire range and then manage the occurrence of each hook using its script (by checking with the $context pseudo-register).

    > How can I unhook an address that is being monitored by !monitor?

    The !monitor hook as well as almost all of the features of HyperDbg are exported as events. Events can be disabled/removed using the 'events' command.

    https://docs.hyperdbg.org/commands/debugging-commands/events
    events (show and modify active/disabled events) | HyperDbg Documentation

    Description of the 'event' command in HyperDbg.

  • @HughEverett ↶ Reply to #7739 #7744 12:56 PM, 29 Aug 2024
    It's probably because the way that we check for the validity of the address is not working for MMIOs. Could you please open an issue on GitHub? So, it will be fixed.
  • @HughEverett ↶ Reply to #7738 #7745 12:58 PM, 29 Aug 2024
    For more information regarding the first question, you can take a look at this video:

    https://www.youtube.com/watch?v=PX38N5F3SL8&list=PLUFkSN0XLZ-kF1f143wlw8ujlH2A45nZY&index=34
    Dbg3301: HyperDbg 05 03 Memory Monitor

    View the full free MOOC at https://ost2.fyi/Dbg3301. This course is an introductory guide to HyperDbg debugger, guiding you through the initial steps of using HyperDbg, covering essential concepts, principles, debugging functionalities, along with practical examples and numerous reverse engineering methods that are unique to HyperDbg. Whether you have an interest in reverse engineering or seek to elevate your reverse engineering skills with hypervisor-assisted approaches, this course provides a solid foundation for starting your journey.

  • @instw0 ↶ Reply to #7742 #7746 03:38 PM, 29 Aug 2024
    int1, int3.... is it possible to disable them somehow like "trap flag off"
  • @instw0 #7747 03:40 PM, 29 Aug 2024
    and if use command !exteption how to find out the interrupt number?
  • 30 August 2024 (7 messages)
  • @HyperDbgBot #7748 b o t 12:08 AM, 30 Aug 2024
    [discord] <.wxg> [reply]: I use separate write and read scripts because I don't know how to distinguish between read and write operations in DS. For MMIO, it would be very unreasonable to use a 4K page as the basic unit for EPTHOOK2. Of course, it would be best if DS could distinguish between write and read operations.

    In my scenario, most of what I want to achieve is similar to the mmiotrace provided by the Linux kernel.
  • @HyperDbgBot #7750 b o t 12:09 AM, 30 Aug 2024
    [discord] <.wxg> [reply]: ok
  • @vyshky #7751 08:50 AM, 30 Aug 2024
    Joined.
  • @6152749020 #7752 06:54 PM, 30 Aug 2024
    Joined.
  • @6152749020 #7753 07:00 PM, 30 Aug 2024
    Hello, going through the opensecurity2 training right now , and really want to use usermode for debugger instead of just kernel. I know I have to build the hyperdbg and I am getting errors , I have tried building on release and debug. I have VS 2022 , C++ package and windows 11 SDK installed .. I then installed the latest 10.026 SDK and WDK. I am using windows 10 for both host and VM , VM using vmware workstation 17
  • @6152749020 #7754 07:42 PM, 30 Aug 2024
    Also using the same build for hyperDbg-cli on host and guest but get failed to load driver on guest
  • @6152749020 #7755 07:43 PM, 30 Aug 2024
    Do I have to build it on guest too ?
  • 31 August 2024 (17 messages)
  • @HughEverett ↶ Reply to #7746 #7756 04:52 AM, 31 Aug 2024
    INT1 is #DB which you can disable or enable it by using:
    test trap off
    test trap on
  • @HughEverett ↶ Reply to #7746 #7757 04:53 AM, 31 Aug 2024
    For INT3 which is #BP, you can use
    test breakpoint off
    test breakpoint on
  • @HughEverett ↶ Reply to #7747 #7758 04:55 AM, 31 Aug 2024
    If you're using the script engine the '$context' shows the vector number.
  • @HughEverett ↶ Reply to #7747 #7760 04:55 AM, 31 Aug 2024

    photo_2024-08-31_04-55-50.jpg
  • @HughEverett ↶ Reply to #7748 #7761 05:00 AM, 31 Aug 2024
    Right now, the !monitor command cannot distinguish between read/write/execute but that's a really good feature to be added to it. I'll add it to the todo list.
  • @HughEverett ↶ Reply to #7748 #7762 05:02 AM, 31 Aug 2024
    Some solution that came to my mind about distinguishing between read/write is checking it with the target instruction (current @rip). Basically, you need read the @rip using memcpy in the script engine and make a basic instruction disassembler for MOV commands.
  • @HughEverett ↶ Reply to #7753 #7763 05:04 AM, 31 Aug 2024
    It's not just kernel, HyperDbg support both user mode and kernel mode in the Debugger Mode:

    https://docs.hyperdbg.org/using-hyperdbg/prerequisites/operation-modes
    Operation Modes | HyperDbg Documentation

    Different Modes of Operation in HyperDbg

  • @HughEverett ↶ Reply to #7755 #7764 05:05 AM, 31 Aug 2024
    What's the error? Didn't fully understand what's going wrong there 🤔
  • @instw0 ↶ Reply to #7760 #7765 05:09 AM, 31 Aug 2024
    thank you! Very match
  • @HyperDbgBot #7766 b o t 11:18 AM, 31 Aug 2024
    [discord] <.wxg> [reply]: Using 8B 89 to distinguish between read and write is indeed a solution, but since the source data comes from different registers, it seems a bit tricky.
  • @HyperDbgBot #7767 b o t 11:21 AM, 31 Aug 2024
    [discord] <.wxg> [reply]: It would be very beneficial to provide additional context, such as Read/Write flags, Address, and Value.
  • @HughEverett ↶ Reply to #7766 #7768 12:17 PM, 31 Aug 2024
    Do you want to see what's modified (the modification result)?
  • @HughEverett ↶ Reply to #7767 #7769 12:18 PM, 31 Aug 2024
    Yes, agree. It would be added to the future versions.
  • @HyperDbgBot #7770 b o t 02:39 PM, 31 Aug 2024
    [discord] <.wxg> [reply]: read value
    write newValue
  • @HughEverett ↶ Reply to #7770 #7771 03:16 PM, 31 Aug 2024
    You can use event calling stages for it. Check the first example of the !monitor command here:

    https://docs.hyperdbg.org/tips-and-tricks/misc/event-calling-stage
    Event calling stage | HyperDbg Documentation

    The event calling stage in HyperDbg

  • @HughEverett ↶ Reply to #7770 #7772 03:17 PM, 31 Aug 2024
    Also check this video: https://youtu.be/rlNALkSacbs?si=WfM_abZzpk5kqSVF
    Dbg3301: HyperDbg 10 10 Event Calling Stages

    View the full free MOOC at https://ost2.fyi/Dbg3301. This course is an introductory guide to HyperDbg debugger, guiding you through the initial steps of using HyperDbg, covering essential concepts, principles, debugging functionalities, along with practical examples and numerous reverse engineering methods that are unique to HyperDbg. Whether you have an interest in reverse engineering or seek to elevate your reverse engineering skills with hypervisor-assisted approaches, this course provides a solid foundation for starting your journey.

  • @Poormand_f #7773 05:20 PM, 31 Aug 2024
    Joined.
  • 01 Aug 2024 (8)
  • 02 Aug 2024 (7)
  • 04 Aug 2024 (1)
  • 05 Aug 2024 (8)
  • 06 Aug 2024 (19)
  • 07 Aug 2024 (9)
  • 08 Aug 2024 (7)
  • 09 Aug 2024 (5)
  • 10 Aug 2024 (21)
  • 11 Aug 2024 (7)
  • 12 Aug 2024 (1)
  • 13 Aug 2024 (4)
  • 14 Aug 2024 (16)
  • 15 Aug 2024 (4)
  • 16 Aug 2024 (5)
  • 18 Aug 2024 (46)
  • 19 Aug 2024 (3)
  • 20 Aug 2024 (31)
  • 21 Aug 2024 (75)
  • 22 Aug 2024 (8)
  • 24 Aug 2024 (3)
  • 25 Aug 2024 (5)
  • 26 Aug 2024 (1)
  • 27 Aug 2024 (3)
  • 28 Aug 2024 (3)
  • 29 Aug 2024 (8)
  • 30 Aug 2024 (7)
  • 31 Aug 2024 (17)