• 02 January 2024 (1 messages)
  • @6185105246 #5438 08:50 PM, 02 Jan 2024
    Joined.
  • 03 January 2024 (2 messages)
  • @M0ein2020 #5439 12:59 AM, 03 Jan 2024
    Joined.
  • @Screamjizz #5440 12:23 PM, 03 Jan 2024
    Joined.
  • 05 January 2024 (1 messages)
  • @vvvvkkkkkk #5441 04:19 AM, 05 Jan 2024
    Joined.
  • 08 January 2024 (10 messages)
  • @1376494095 #5442 05:59 AM, 08 Jan 2024
    @HughEverett Are there any known problems with hyperdbg for hyper-v.
  • @gamework888 #5444 10:48 AM, 08 Jan 2024
    The system blue screens upon startup, how can I resolve this?
  • @gamework888 #5445 10:48 AM, 08 Jan 2024
    win11 home
  • @volo83 #5446 04:12 PM, 08 Jan 2024
    hyperv is not supported yet
  • Hi, nope. I spent a lot of time working on it but it's still problematic. Some of my previous works on supporting hyper-v is available at this branch:
    https://github.com/HyperDbg/HyperDbg/tree/hypev-support
    GitHub - HyperDbg/HyperDbg at hypev-support

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

  • I believe the problem is because of EPT invalidation in case of hypercalls.
  • @HughEverett #5449 05:47 PM, 08 Jan 2024
    More information why hyper-v is so hard to deal with:
    https://twitter.com/Intel80x86/status/1523033338407235585?t=DDg63jr2eZvWzDubqL_W_A&s=19
  • Hi, are you running hyperdbg on VMI Mode? Can you provide more information?
  • If I remember correctly, the last time I test it, it worked for ~1 min and then it crashed. Yet, I couldn't quite understand what was the cause of it.
  • 09 January 2024 (5 messages)
  • @1376494095 #5452 01:57 AM, 09 Jan 2024
    Okay, thanks for the tip.
  • @alzverg #5453 05:50 AM, 09 Jan 2024
    Joined.
  • @5374878530 #5454 05:03 PM, 09 Jan 2024
    Joined.
  • @Xylitolfra #5455 06:18 PM, 09 Jan 2024
    Joined.
  • @508397659 #5456 09:22 PM, 09 Jan 2024
    Joined.
  • 10 January 2024 (2 messages)
  • @mysocialacc #5457 05:50 AM, 10 Jan 2024
    Joined.
  • @Akainu432 #5458 11:11 AM, 10 Jan 2024
    Joined.
  • 14 January 2024 (3 messages)
  • @barbone010 #5459 03:46 PM, 14 Jan 2024
    Joined.
  • @barbone010 #5460 03:47 PM, 14 Jan 2024
    This tool can be used on AMD-V or its available only for INTEL VT-X ?
  • @6828466572 #5461 10:29 PM, 14 Jan 2024
    Joined.
  • 15 January 2024 (2 messages)
  • Hi,
    At the moment, it only supports Intel processors (VT-x). But, there is another work in progress which is called RedDbg (It's a work in progress and not yet done).
    https://github.com/HyperDbg/RedDbg
    GitHub - HyperDbg/RedDbg: Hypervisor-based debugger for AMD processors

    Hypervisor-based debugger for AMD processors. Contribute to HyperDbg/RedDbg development by creating an account on GitHub.

  • @tgMrZ #5463 10:30 AM, 15 Jan 2024
    Joined.
  • 16 January 2024 (2 messages)
  • @gamework888 #5464 03:37 AM, 16 Jan 2024
    Is reddbg support hook?
  • It's a work in progress, and not yet in a working state. You can ask the main developer of RedDbg @Nitr0_G about it.
  • 17 January 2024 (1 messages)
  • @Fall_0004 #5466 06:02 AM, 17 Jan 2024
    Joined.
  • 18 January 2024 (3 messages)
  • @dkwow666 #5467 02:22 PM, 18 Jan 2024
    Joined.
  • @6185105246 #5468 06:21 PM, 18 Jan 2024
    What do u guys use this for mainly?
  • @barbone010 ↶ Reply to #5468 #5469 07:26 PM, 18 Jan 2024
    Usually to bypass anti debug tricks
  • 20 January 2024 (2 messages)
  • @400897706 #5470 06:03 PM, 20 Jan 2024
    Joined.
  • @5781093824 #5471 11:14 PM, 20 Jan 2024
    Completely off topic but are you guys using amd or intel for your virtualization-based tasks?
  • 21 January 2024 (1 messages)
  • @400897706 ↶ Reply to #5471 #5472 07:27 AM, 21 Jan 2024
    Only Intel for all the hypervisor related tasks
  • 22 January 2024 (1 messages)
  • @motivatedude #5473 06:46 AM, 22 Jan 2024
    Joined.
  • 23 January 2024 (6 messages)
  • @HughEverett #5475 05:53 AM, 23 Jan 2024
    HyperDbg v0.7.2 is released.

    You can find it on GitHub at:
    https://github.com/HyperDbg/HyperDbg/releases/tag/v0.7.2
    Release v0.7.2 · HyperDbg/HyperDbg

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

  • This is basically a minor fix of MTRRs which causes stability problems (and sometimes crashes at the beginning of HyperDbg load):

    https://github.com/HyperDbg/HyperDbg/pull/329
    Mtrr fixes by Mattiwatti · Pull Request #329 · HyperDbg/HyperDbg

    Description This PR fixes a number of issues in the MTRR-related code in EptBuildMtrrMap() and EptGetMemoryType(). The changes themselves are thoroughly documented in the commit messages, so please...

  • @moval0x1 #5477 08:50 AM, 23 Jan 2024
    Joined.
  • @Ox7COO #5478 01:55 PM, 23 Jan 2024
    Joined.
  • @5754275573 #5479 06:03 PM, 23 Jan 2024
    Joined.
  • @Ox7COO #5480 06:20 PM, 23 Jan 2024
    Who is the maintainer of the GUI?
    Can you accept this pull request?

    https://github.com/HyperDbg/gui/pull/47
  • 24 January 2024 (30 messages)
  • @Fall_0004 ↶ Reply to #5476 #5481 03:16 AM, 24 Jan 2024
    Hmm, it still crashes for me upon loading driver
    .connect local
    load vmm

    It hangs and everything becomes unresponsive, I have to force shutdown
  • I'm not the maintainer of the GUI. The guy who works on GUI was in the Telegram group but it seems his account is deleted (probably due to the connection problem). But don't worry he will merge your PR once he sees it.
  • Can you please tell me about your system configuration? I mean what OS, and Intel processor generation do you use? Are you using it on a physical system or VMware Nested Virtualization machine?
  • @Fall_0004 #5484 06:28 AM, 24 Jan 2024
    Sorry for the late reply, here is the details you have requested:

    Issue: HyperDbg causes entire system to become unresponsive after running the commands ".connect local"
    "load vmm"

    This issue was observed on a Physical System, below are the specifications of said system.

    =========================================== msinfo32 System Summary ===========================================
    OS Name Microsoft Windows 11 Home Single Language
    Version 10.0.22621 Build 22621
    Other OS Description Not Available
    OS Manufacturer Microsoft Corporation
    System Name MSI
    System Manufacturer Micro-Star International Co., Ltd.
    System Model Katana 15 B13VGK
    System Type x64-based PC
    System SKU 1585.1
    Processor 13th Gen Intel(R) Core(TM) i9-13900H, 2600 Mhz, 14 Core(s), 20 Logical Processor(s)
    BIOS Version/Date American Megatrends International, LLC. E1585IMS.113, 26/10/2023
    SMBIOS Version 3.5
    Embedded Controller Version 255.255
    BIOS Mode UEFI
    BaseBoard Manufacturer Micro-Star International Co., Ltd.
    BaseBoard Product MS-1585
    BaseBoard Version REV:1.0
    Platform Role Mobile
    Secure Boot State Off
    PCR7 Configuration Elevation Required to View
    Windows Directory C:\Windows
    System Directory C:\Windows\system32
    Boot Device \Device\HarddiskVolume1
    Locale United States
    Hardware Abstraction Layer Version = "10.0.22621.2506"
    User Name MSI\luist
    Time Zone Malay Peninsula Standard Time
    Installed Physical Memory (RAM) 32.0 GB
    Total Physical Memory 31.7 GB
    Available Physical Memory 27.4 GB
    Total Virtual Memory 63.7 GB
    Available Virtual Memory 58.2 GB
    Page File Space 32.0 GB
    Page File C:\pagefile.sys
    Kernel DMA Protection On
    Virtualization-based security Not enabled
    Device Encryption Support Elevation Required to View
    Hyper-V - VM Monitor Mode Extensions Yes
    Hyper-V - Second Level Address Translation Extensions Yes
    Hyper-V - Virtualization Enabled in Firmware Yes
    Hyper-V - Data Execution Protection Yes

    =========================================== GPU ===========================================
    Name NVIDIA GeForce RTX 4070 Laptop GPU
  • @slnerss #5485 06:37 AM, 24 Jan 2024
    Joined.
  • Thank you. I provided the details to the GitHub issue to see if anyone could help us finding the problem. I don't have a 13th gen Intel processor right now, but will test it soon. This problem is reported several times for 13th gen processors.

    https://github.com/HyperDbg/HyperDbg/issues/323#issuecomment-1907459487
    Unresponsive hyperdbg-cli.exe after `load vmm` since 4f0d0dc3bf3686772a58ebe85221dc3374be8188 · Issue #323 · HyperDbg/HyperDbg

    Describe the bug Regression To Reproduce Steps to reproduce the behavior: test 0: git checkout fac10fd8309bd40a43c6caa3eac2f33e4e2a1e65 hyperdbg-cli.exe .connect local load vmm problem: unresponsiv...

  • Also, if you can find any other information, maybe a BSOD log crash. That would be super helpful.
  • @Fall_0004 ↶ Reply to #5487 #5488 06:39 AM, 24 Jan 2024
    Aite I ll try
  • @Fall_0004 #5489 06:39 AM, 24 Jan 2024
    I ll just kernel debug my laptop with another one and generate a dump
  • @slnerss #5490 06:40 AM, 24 Jan 2024
    Hello, I wanted to ask if there's any plans to support physical addresses for the monitor command? I'd like to monitor bar reads (memory bars) or is there another way to do it?
  • @slnerss ↶ Reply to #5491 #5492 06:46 AM, 24 Jan 2024
    PCIe base address registers, there's two types of them memory bars and I/O bars
  • @slnerss #5493 06:47 AM, 24 Jan 2024
    Basically I'd like to do the same thing as mmiotrace in linux
  • This is probably where you need to modify.
  • @HughEverett #5495 06:48 AM, 24 Jan 2024
    https://github.com/HyperDbg/HyperDbg/blob/429f2786af72e33ea5c4920a7ba7615a913a523b/hyperdbg/hprdbghv/code/hooks/ept-hook/EptHook.c#L182

    Search for :

    PhysicalBaseAddress = (SIZE_T)VirtualAddressToPhysicalAddressByProcessCr3(VirtualTarget, ProcessCr3);
    HyperDbg/hyperdbg/hprdbghv/code/hooks/ept-hook/EptHook.c at 429f2786af72e33ea5c4920a7ba7615a913a523b · HyperDbg/HyperDbg

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

  • @slnerss #5496 06:49 AM, 24 Jan 2024
    Thanks I will take a look at it tomorrow (about to sleep)
  • It's applied starting from this function:

    https://github.com/HyperDbg/HyperDbg/blob/429f2786af72e33ea5c4920a7ba7615a913a523b/hyperdbg/hprdbgkd/code/debugger/events/DebuggerEvents.c#L72
    HyperDbg/hyperdbg/hprdbgkd/code/debugger/events/DebuggerEvents.c at 429f2786af72e33ea5c4920a7ba7615a913a523b · HyperDbg/HyperDbg

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

  • @Screamjizz #5498 08:38 AM, 24 Jan 2024
    @HughEverett
  • @Screamjizz #5500 08:39 AM, 24 Jan 2024
    Is this written incorrectly? This "j" doesn't serve any purpose
  • @Screamjizz #5502 08:40 AM, 24 Jan 2024
    I see others writing like this
  • Yeah, you're right. I didn't notice that. Since it's not written by me, let's inform Mattiwatti on GitHub.
  • @Screamjizz #5504 08:45 AM, 24 Jan 2024
    This is probably the reason why many systems explode
  • Probably 🤔
  • What other parts do you see? I can only find this one.
  • @Screamjizz #5508 08:51 AM, 24 Jan 2024
    This one
  • Please keep sending me if you find other variants of these bugs.
  • @Screamjizz #5510 08:53 AM, 24 Jan 2024
    Alright
  • 25 January 2024 (12 messages)
  • @DancingSnow #5511 04:22 AM, 25 Jan 2024
    Joined.
  • @dkwow666 #5514 09:37 AM, 25 Jan 2024
    this,is ok
  • @dkwow666 #5516 09:37 AM, 25 Jan 2024
    this,is not ok
  • @dkwow666 #5517 09:37 AM, 25 Jan 2024
    why?
  • Hi,
    This is due to a problem with initializing MTRRs which mainly affects 13 gen processors. (Please read the previous 20 messages of the group, we discussed about that).
  • @HughEverett #5519 09:52 AM, 25 Jan 2024
    Once it's fixed (hopefully tomorrow), I will let you (and others) know to test it to see whether the patch was effective or not.
  • @dkwow666 #5520 09:56 AM, 25 Jan 2024
    thank you,very much
  • @dkwow666 #5521 10:02 AM, 25 Jan 2024
    Is there a solution?
  • Yes, but it's not yet applied.
  • 27 January 2024 (17 messages)
  • @HughEverett #5523 08:14 AM, 27 Jan 2024
    I made a new small commit to the 'dev' branch. Can you please re-check it on your 13th gen machines and tell me whether the problem is fixed or not?
  • @HughEverett #5524 08:15 AM, 27 Jan 2024
    @dkwow666 @Fall_0004
  • @HughEverett #5526 08:17 AM, 27 Jan 2024
    If you can't build HyperDbg, you can also use github built artifacts :
    https://github.com/HyperDbg/HyperDbg/actions/runs/7677365725
    fix MTRR range loop typo · HyperDbg/HyperDbg@ed5ab28

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

  • @HughEverett #5527 08:45 AM, 27 Jan 2024
    Additionally, there's a recently introduced event command in HyperDbg that hasn't been tested or documented yet, so it's a potential new feature.

    Please Feel free to explore this event command in the latest 'dev' branch, and share your feedback here:

    https://docs.hyperdbg.org/commands/extension-commands/mode
    !mode (detect kernel-to-user and user-to-kernel transitions)

    Description of the '!mode' command in HyperDbg.

  • @Mattiwatti #5528 06:08 PM, 27 Jan 2024
    Joined.
  • @Mattiwatti #5529 06:09 PM, 27 Jan 2024
    hiya, I believe I've finally managed to join telegram after trying five different phones...
  • @Mattiwatti ↶ Reply to #5523 #5530 06:10 PM, 27 Jan 2024
    I saw your commit but it actually still contains a mistake when incorporating the loop index variables
  • @Mattiwatti #5531 06:11 PM, 27 Jan 2024
    I've been working on a (private, messy....) branch to log the MTRR map in a way that is as similar to windbg's !mtrr as possible
  • @Mattiwatti #5532 06:12 PM, 27 Jan 2024
    and it still shows differences in 16 fixed MTRRs between your new commit and windbg on my 13th gen machine (it works fine though - no hang)
  • @Mattiwatti #5533 06:13 PM, 27 Jan 2024
    the proper loop logic should be
    Descriptor->MemoryType = K16Types.s.Types[j];
    Descriptor->PhysicalBaseAddress = (K16Base + (i * K16Size * 8)) + (K16Size * j);
    Descriptor->PhysicalEndAddress = (K16Base + (i * K16Size * 8)) + (K16Size * j) + (K16Size - 1);
    - at least on my machine the MTRRs logged now match windbg's output
  • @Mattiwatti #5534 06:14 PM, 27 Jan 2024
    I haven't been able to reproduce any more hangs after my original PR though, so unfortunately I can't say if this is enough to fix hangs others were seeing
  • @Mattiwatti #5535 06:17 PM, 27 Jan 2024
    I'm almost certain the way the SMRR ('SMRAM range MTRR') is being treated is also incorrect, because this is a variable MTRR that pretends to be of type write-back, but actually it is of course not possible to access SMRAM outside SMM
  • @Mattiwatti #5536 06:18 PM, 27 Jan 2024
    the documented behaviour is that writes will #GP, and reads will actually have type UC and return garbage
  • @Mattiwatti #5537 06:20 PM, 27 Jan 2024
    so it certainly seems like a mistake to me to treat it as actual write-back cacheable memory the way hyperdbg is doing it now (windbg agrees - it does not show the SMRR as MTRR)
    but I'm less certain of what the best way to deal with this would be
  • @Fall_0004 ↶ Reply to #5523 #5538 08:38 PM, 27 Jan 2024
    Well um… I dont just hang now, I straight up BSOD
  • @Fall_0004 #5539 09:05 PM, 27 Jan 2024
    Huh wait nvm
  • @Fall_0004 #5540 09:05 PM, 27 Jan 2024
    It works now
  • 28 January 2024 (185 messages)
  • Wow, that's great. Welcome!
  • @Mattiwatti #5542 10:12 AM, 28 Jan 2024
    heh, thank you
  • @Mattiwatti #5543 10:13 AM, 28 Jan 2024
    I'm mostly around on discord rather than telegram usually
  • @Mattiwatti #5544 10:14 AM, 28 Jan 2024
    but it seems to work fine now after getting past the activation hurdle
  • Can you send a PR for it?
  • @HughEverett #5546 10:14 AM, 28 Jan 2024
    Is it the second loop?
  • @Mattiwatti #5547 10:14 AM, 28 Jan 2024
    sure
  • @Mattiwatti #5548 10:14 AM, 28 Jan 2024
    give me a few
  • @Mattiwatti #5549 10:15 AM, 28 Jan 2024
    it's the same loop you changed in your commit
  • @Mattiwatti #5550 10:16 AM, 28 Jan 2024
    both i and j need to be taken into account when calculating the base and end addresses
  • @HughEverett #5551 10:16 AM, 28 Jan 2024
    So, no change is needed ?
  • @Mattiwatti #5552 10:17 AM, 28 Jan 2024
    no, your fix commit is incorrect
  • @Mattiwatti #5553 10:17 AM, 28 Jan 2024
    or incomplete, rather
  • @HughEverett #5554 10:17 AM, 28 Jan 2024
    ah, so please fix it in a PR
  • @Mattiwatti #5555 10:19 AM, 28 Jan 2024
    done
  • @Mattiwatti #5556 10:23 AM, 28 Jan 2024
    I'm still considering what to do about the SMRR 'MTRR'...

    to be perfectly honest, I think if the entire block of code that queries the SMRR and stores it as a memory range as (if it's from an MTRR) was simply deleted
    that this would fix more than it could hurt
  • @Mattiwatti #5557 10:24 AM, 28 Jan 2024
    but I'm also wondering what the worst case scenario could be (if any) where someone needs to call EptGetMemoryType() on an address that's in SMRAM for some reason
  • SMRAM is not accessible outside of SMM cpu mode, so no need to worry about this region at all
  • @Mattiwatti #5559 10:25 AM, 28 Jan 2024
    as far as I can tell this is something that wouldn't normally ever happen in hyperdbg - neither memory allocations nor physical addresses converted from elsewhere should have any reason to be SMM data/code
  • @Mattiwatti #5560 10:25 AM, 28 Jan 2024
    yeah, exactly
  • @honorary_bot #5561 10:26 AM, 28 Jan 2024
    There are plenty of regions inaccessible for CPU, just forget about them
  • @Mattiwatti #5562 10:28 AM, 28 Jan 2024
    alright, well if you want I can make a PR for this too (or add it to the one I just made).... I'll need a bit more time though to actually make the change and verify it's working/correct
  • @Mattiwatti #5563 10:29 AM, 28 Jan 2024
    the other fix I had already made :D
  • @HughEverett #5564 10:29 AM, 28 Jan 2024
    One thing that I encounter recently (like after 10 times of reloading HyperDbg) was this
  • Dude, just farm these as 0days, don't post em here ))
  • I'm just suspect whether it relates to MTRR stuff or not? 🤔
  • @honorary_bot #5567 10:29 AM, 28 Jan 2024
    It's vmware core issue
  • I've got tens of these issue each day, just don't know how to reproduce them deterministically 😅
  • @honorary_bot #5569 10:30 AM, 28 Jan 2024
    Oh :)
  • @Mattiwatti ↶ Reply to #5566 #5570 10:30 AM, 28 Jan 2024
    good question, I can try some more spam loading in vmware as well if you want - I've mainly been focused on making physical machines not hang since that was the original issue
  • Ah, yes, that would be great. I try to test it on my physical machine as well.
  • @Mattiwatti #5572 10:32 AM, 28 Jan 2024
    but that still hasn't reoccurred for me, so I suspect there must be some hardware configuration difference between me and the person who still saw a hang after the original PR
  • Are you testing it on VMware?
  • @HughEverett #5574 10:32 AM, 28 Jan 2024
    Or physical machine?
  • @Mattiwatti #5575 10:32 AM, 28 Jan 2024
    physical
  • @Mattiwatti #5576 10:32 AM, 28 Jan 2024
    the hang never occurred for me in vmware, even before I made any changes
  • @Mattiwatti #5577 10:33 AM, 28 Jan 2024
    (although I only discovered that later... not a huge vmware fan)
  • @HughEverett #5578 10:33 AM, 28 Jan 2024
    It happens to me in like each 5 or 10 tests. I will try the physical machine now.
  • @honorary_bot #5579 10:33 AM, 28 Jan 2024
    Do you guys collect machine check info? It's likely to happen in such scenarios
  • Machine check for VMware?
  • @honorary_bot #5581 10:34 AM, 28 Jan 2024
    For physical machines
  • @Mattiwatti #5582 10:35 AM, 28 Jan 2024
    no, I do collect crash dumps (or use windbg if attached), but not sure where I'd find the machine check info
  • @Mattiwatti #5583 10:35 AM, 28 Jan 2024
    the event log?
  • I didn't see any errors on physical yet. Still didn't perform a lot of tests.
  • @HughEverett #5585 10:35 AM, 28 Jan 2024
    so I'm gonna make some tests now
  • A set of registers
  • @HughEverett #5587 10:35 AM, 28 Jan 2024
    and hopefully release v0.8 tonight along with this new !mode command.
  • @honorary_bot #5588 10:35 AM, 28 Jan 2024
    Wait, sorry to ask, but do you set up MTRRs on the machine on your own? I missed that part
  • @Mattiwatti ↶ Reply to #5586 #5589 10:36 AM, 28 Jan 2024
    oh yeah... I do vaguely recall their existence but no, as you can tell I don't check these heh
  • @honorary_bot #5590 10:37 AM, 28 Jan 2024
    Do you actually touch host mtrrs?
  • @Mattiwatti ↶ Reply to #5588 #5591 10:38 AM, 28 Jan 2024
    you mean whether I change or add any MTRRs apart from the default configuration when booted into windows?
  • @Mattiwatti #5592 10:38 AM, 28 Jan 2024
    no
  • @honorary_bot #5593 10:38 AM, 28 Jan 2024
    Oh, ok, cool
  • @honorary_bot #5594 10:38 AM, 28 Jan 2024
    You should not ever do that )
  • Is there any way to change MTRRs?
  • @HughEverett #5596 10:38 AM, 28 Jan 2024
    🤨
  • @honorary_bot #5597 10:38 AM, 28 Jan 2024
    Sure, a set of msrs
  • @Mattiwatti #5598 10:38 AM, 28 Jan 2024
    yes, from what I saw in the SDM it's very painful
  • @HughEverett #5599 10:38 AM, 28 Jan 2024
    As long as I know those registers are not modifiable
  • @Mattiwatti #5600 10:39 AM, 28 Jan 2024
    unless you're on 1 CPU
  • @honorary_bot #5601 10:39 AM, 28 Jan 2024
    But don’t do that
  • @honorary_bot #5602 10:39 AM, 28 Jan 2024
    They are, why not
  • @honorary_bot #5603 10:39 AM, 28 Jan 2024
    Don’t recall any lock bits
  • @HughEverett #5604 10:39 AM, 28 Jan 2024
    Interesting, didn't know that.
  • @honorary_bot #5605 10:40 AM, 28 Jan 2024
    They’re set up in firmware and then mirrored on each ap startup, also in firmware
  • @honorary_bot #5606 10:40 AM, 28 Jan 2024
    So the firmware knows better
  • @Mattiwatti #5607 10:41 AM, 28 Jan 2024
    yeah, I also noticed NT does not touch them
  • @honorary_bot #5608 10:41 AM, 28 Jan 2024
    There’s just no need, sure
  • @honorary_bot #5609 10:41 AM, 28 Jan 2024
    You’ve got PATs if you need
  • @Mattiwatti #5610 10:41 AM, 28 Jan 2024
    or tries not to.... I expect there are probably some obscure hacks for broken hardware.... but in the normal case
  • @honorary_bot #5611 10:42 AM, 28 Jan 2024
    PATs are set up in page tables
  • @Mattiwatti #5612 10:42 AM, 28 Jan 2024
    yeah - I don't touch those either, FWIW
  • @honorary_bot #5613 10:43 AM, 28 Jan 2024
    One of my biggest flaws in pulsedbg architecture is exactly caching. Don’t even know if I’m going to fix them
  • @Mattiwatti #5614 10:43 AM, 28 Jan 2024
    the only reason I ran into this bug was because I was helping someone in the reverse engineering discord who was (based on someone else's suggestion there) trying to set up hyperdbg to monitor port I/O
  • @Mattiwatti #5615 10:43 AM, 28 Jan 2024
    I'd never used hyperdbg before that actually
  • @Mattiwatti #5616 10:44 AM, 28 Jan 2024
    but his machine was hanging in such a bizarre way that I decided to dust off an intel CPU to try to reproduce it
  • Initially I would just set EPT caching according to MTRRs, but then there are cases when ordinary dram needs to be accessed as WC or even UC when shared with GPU
  • @Mattiwatti #5618 10:45 AM, 28 Jan 2024
    and it did, but it turns out that was simple 'luck' due to both being 13th gens...? at least, that's where the issues seem to be so far
  • Now what do you think of it? I mean will you use it again? Any feedback or suggestion? Or improvements?
  • @Mattiwatti #5620 10:50 AM, 28 Jan 2024
    it seems to work fine, other than some odd issues I sometimes run into when connecting (again to a physical machine) via serial that I haven't yet investigated
  • @Mattiwatti #5621 10:50 AM, 28 Jan 2024
    so, I'll use it again, as soon as there's AMD support ;)
  • Yes, it's discussed several times. The physical connection should be changed into a kdnet style connection.
  • @HughEverett #5623 10:52 AM, 28 Jan 2024
    rather than slow serial
  • 😅😅
  • @slnerss #5625 10:53 AM, 28 Jan 2024
    oh hi @Mattiwatti (It's suic from discord)
  • @Mattiwatti #5626 10:53 AM, 28 Jan 2024
    I haven't looked into the scripting extensively, but the possibilities for these when using monitor/epthook/!io[in|out] seem really neat
  • @Mattiwatti ↶ Reply to #5625 #5627 10:53 AM, 28 Jan 2024
    hey hey!
  • Yes, HyperDbg also has a short-circuiting capability that makes it even better.
    https://docs.hyperdbg.org/tips-and-tricks/misc/event-short-circuiting

    and event calling stages:
    https://docs.hyperdbg.org/tips-and-tricks/misc/event-calling-stage
    Event short-circuiting

    The event short-circuiting and ignoring mechanism in HyperDbg

  • @Mattiwatti #5629 10:56 AM, 28 Jan 2024
    yep - I've read most of the docs by now, just haven't had time to try everything yet
  • @Mattiwatti ↶ Reply to #5621 #5630 10:59 AM, 28 Jan 2024
    I know this sounds cheeky by the way, but I have to be honest - I simply don't really have a use for a debugger that only works on intels
  • @Mattiwatti #5631 11:00 AM, 28 Jan 2024
    given that I tend to buy AMDs for my workstations
  • @Mattiwatti #5632 11:01 AM, 28 Jan 2024
    I saw there was a separate repo in the works with AMD support, but I haven't looked at it yet
  • There is also another project 'RedDbg' which is mainly designed for AMD that @Nitr0_G is working on it, but agree. The support for AMD is also necessary.
  • @Mattiwatti #5634 11:02 AM, 28 Jan 2024
    is there a reason it's a separate repository and not e.g. a branch that can occasionally be used to merge shared features when they are finished?
  • @HughEverett #5635 11:02 AM, 28 Jan 2024
    I never had an AMD laptop but it seems that at some point I have to buy and test it too.
  • It's not yet finished.
  • @HughEverett #5637 11:03 AM, 28 Jan 2024
    It's a work in progress.
  • @Mattiwatti #5638 11:03 AM, 28 Jan 2024
    no, I understand that
    but neither is hyperdbg itself, right?
  • @Mattiwatti #5639 11:03 AM, 28 Jan 2024
    the branch would not need to be released necessarily
  • @Nitr0_G ↶ Reply to #5635 #5640 11:04 AM, 28 Jan 2024
    The work is going on. I'm redoing the architecture a bit now.
  • @Mattiwatti #5641 11:04 AM, 28 Jan 2024
    it would only be to avoid having very divergent code bases eventually when one or the other is 'done'
  • @Nitr0_G ↶ Reply to #5641 #5642 11:05 AM, 28 Jan 2024
    Yeah, we kind of discussed it. But it seems that we decided to solve this problem when RedDbg is relatively ready and if something is, then I can rewrite something.
  • Exactly
  • @Mattiwatti #5644 11:06 AM, 28 Jan 2024
    OK, I see
  • @Mattiwatti ↶ Reply to #5564 #5645 11:27 AM, 28 Jan 2024
    what steps are you following exactly when you are doing this?
    just to make sure I'm actually attempting the same thing that generates this error for you
  • @Mattiwatti #5646 11:28 AM, 28 Jan 2024
    I did get a crash on the very first .debug close just now, but that was a user mode crash in hyperdbg-cli.exe, not a VMware crash
  • I'm just loading HyperDbg :

    On the host:

    .debug remote namedpipe \\.\pipe\HyperDbgPipe
  • @HughEverett #5648 11:29 AM, 28 Jan 2024
    On the guest:
    .debug prepare serial 115200 com2
  • @HughEverett #5649 11:29 AM, 28 Jan 2024
    but probably, the same error happens on

    .connect local
    load vmm
  • @HughEverett #5650 11:30 AM, 28 Jan 2024
    without any need to host interaction.
  • @Mattiwatti #5651 11:30 AM, 28 Jan 2024
    my UM crash by the way - a stack overflow due to recursion in ShowMessages?
  • @Mattiwatti ↶ Reply to #5647 #5652 11:30 AM, 28 Jan 2024
    OK, this is what I did
  • This is probably some other issues! ^_^
  • @Mattiwatti #5654 11:31 AM, 28 Jan 2024
    yeah
  • @HughEverett #5655 11:31 AM, 28 Jan 2024
    I just try to restore the VM
  • @HughEverett #5656 11:31 AM, 28 Jan 2024
    and test it again and again
  • @HughEverett #5657 11:31 AM, 28 Jan 2024
    I mean snapshot
  • @Mattiwatti #5658 11:32 AM, 28 Jan 2024
    the only difference I see is that my VM's serial port is just COM1 - any particular reason why yours is COM2? is there another port already at this address in your VM?
  • @Mattiwatti #5659 11:32 AM, 28 Jan 2024
    or did you assign it yourself - that's possible too of course
  • Yes, but that's probably unrelated to the issue 🤔
  • @Mattiwatti #5661 11:32 AM, 28 Jan 2024
    I think so too,, but just wondering
  • @Mattiwatti #5662 11:33 AM, 28 Jan 2024
    since I saw the same 'com2' example in the documentation
  • @Mattiwatti #5663 11:33 AM, 28 Jan 2024
    and I'm hardly a vmware expert, so...
  • @HughEverett #5664 11:33 AM, 28 Jan 2024
    I just suspect maybe my VMware version is older than the latest release
  • @HughEverett #5665 11:33 AM, 28 Jan 2024
    So, maybe it's just me that encounter this issue
  • @Mattiwatti #5666 11:34 AM, 28 Jan 2024
    oh, yeah we are using quite different versions
  • @Mattiwatti #5667 11:34 AM, 28 Jan 2024
    mine is 17.5.0
  • @HughEverett #5668 11:34 AM, 28 Jan 2024
    Ah, and can you create an snapshot from your VM and then try to load HyperDbg multiple times?
  • @HughEverett #5669 11:35 AM, 28 Jan 2024
    I'm just gonna see whether it crashes on your machine or not.
  • @Mattiwatti #5670 11:35 AM, 28 Jan 2024
    a live snapshot you mean? with the host already waiting for the debugger to connect?
  • @Mattiwatti #5671 11:35 AM, 28 Jan 2024
    and then retry that
  • @HughEverett #5672 11:36 AM, 28 Jan 2024
    I mean a simple snapshot that restores the system to a state where HyperDbg is not loaded
  • @HughEverett #5674 11:36 AM, 28 Jan 2024
    The crash happens immediately after you load HyperDbg.
  • @Mattiwatti #5675 11:37 AM, 28 Jan 2024
    yes, but a live snapshot right? (I mean I guess it has to be, if the machine isn't on hyperdbg can hardly be loaded heh)
  • yes
  • @Mattiwatti #5677 11:37 AM, 28 Jan 2024
    just clarifying the purpose, I guess
  • @Mattiwatti #5678 11:37 AM, 28 Jan 2024
    roger
  • @Mattiwatti #5679 11:45 AM, 28 Jan 2024
    4 attempts in so far - this does not seem to happen for me
  • @Mattiwatti #5680 11:45 AM, 28 Jan 2024
    i.e. loading the vmm works
  • @Mattiwatti #5681 11:46 AM, 28 Jan 2024
    the user mode crash after .debug close does reproduce every time though
  • @Mattiwatti #5682 11:46 AM, 28 Jan 2024
    that has to be something simple/silly though
  • It doesn't crash for me, but yes it should be something silly
  • @Mattiwatti #5684 11:46 AM, 28 Jan 2024
    there's no issue with loading the VMM itself
  • @HughEverett #5685 11:47 AM, 28 Jan 2024
    So, we're probably good to release v0.8
  • @HughEverett #5686 11:47 AM, 28 Jan 2024
    to fix 13th gen loading problem as well as the !mode command.
  • @Mattiwatti #5688 11:48 AM, 28 Jan 2024
    well, if you mean literally right now, - I still need to make a commit to remove the 'SMRR is an MTRR' logic 😅
  • @Mattiwatti #5689 11:49 AM, 28 Jan 2024
    I was testing for issues in vmware thus far
  • @HughEverett #5690 11:49 AM, 28 Jan 2024
    Ah, that's okay
  • @HughEverett #5691 11:49 AM, 28 Jan 2024
    as long as it doesn't cause loading issue.
  • @Mattiwatti #5692 11:49 AM, 28 Jan 2024
    yes, exactly
  • @Mattiwatti #5693 11:49 AM, 28 Jan 2024
    I do need to actually test that heh
  • We could fix it on next versions
  • @HughEverett #5695 11:50 AM, 28 Jan 2024
    right now, we need to make sure that HyperDbg loads on 13th gen machine, which it seems to be fine
  • @HughEverett #5696 11:50 AM, 28 Jan 2024
    I also made a couple of tests on my 12 gen machine and it seems to be fine
  • @Mattiwatti #5697 11:51 AM, 28 Jan 2024
    well, I've removed the SMRR logic before and had no issues on 13th gen
  • @Mattiwatti #5698 11:51 AM, 28 Jan 2024
    so I'm pretty confident it will be fine
  • @Mattiwatti #5699 11:52 AM, 28 Jan 2024
    but I still need to make the correct change on top of the current dev branch, without any unrelated stuff in it, and then test it to verify
  • @HughEverett #5700 11:52 AM, 28 Jan 2024
    So, please create PR once everything was fine with that. I'll go for v0.8 now and later once the next PR is ready we could release v0.8.1
  • @Mattiwatti #5701 11:53 AM, 28 Jan 2024
    OK, well that's up to you of course - but this should take me less than half an hour
  • @Mattiwatti #5702 11:54 AM, 28 Jan 2024
    but either is fine by me
  • If it's less than an hour then it's pretty fine
  • @HughEverett #5704 11:54 AM, 28 Jan 2024
    go for it
  • @HughEverett #5705 11:54 AM, 28 Jan 2024
    we'll release it once you finished it
  • @HughEverett #5706 11:54 AM, 28 Jan 2024
    🫡😎
  • @Mattiwatti #5707 12:18 PM, 28 Jan 2024
    OK, I've tested the change and load vmm works on my 13th gen, both physically and in vmware
  • Great
  • @Mattiwatti #5709 12:19 PM, 28 Jan 2024
    question - what do you want me to put in the PR? I saw that you made a revert commit in dev
  • @Mattiwatti #5710 12:19 PM, 28 Jan 2024
    that also reverts the indexing PR I made earlier
  • @Mattiwatti #5711 12:19 PM, 28 Jan 2024
    I can make a new PR that includes both commits?
  • yes, go for it
  • @Mattiwatti #5713 12:20 PM, 28 Jan 2024
    alright
  • @Mattiwatti #5714 12:20 PM, 28 Jan 2024
    on it
  • @Mattiwatti #5715 12:31 PM, 28 Jan 2024
    PR made
  • @HughEverett #5716 12:31 PM, 28 Jan 2024
    👍
  • @HughEverett #5717 01:24 PM, 28 Jan 2024
    HyperDbg v0.8 is released!

    # [0.8.0.0] - 2024-01-28
    New release of the HyperDbg Debugger thanks to @Mattiwatti.

    # Changed
    - Fix miscalculating MTRRs in 13th gen processors

    # Added
    - The !mode event command is added to detect kernel-to-user and user-to-kernel transitions
    https://docs.hyperdbg.org/commands/extension-commands/mode

    - The 'preactivate' command is added to support initializing special functionalities in the Debugger Mode
    https://docs.hyperdbg.org/commands/debugging-commands/preactivate
    !mode (detect kernel-to-user and user-to-kernel transitions)

    Description of the '!mode' command in HyperDbg.

  • @hikawaruriwo #5718 04:52 PM, 28 Jan 2024
    If the overlapping regions (UC, MT, and MB) are correctly handled during the MTRR initialization, and regions of the same type are merged, it would enhance the speed of the GetMemoryType function and also prevent unnecessary large page splits in certain scenarios. Of course, this is a suggestion related to optimization and is optional.
  • @Mattiwatti #5719 04:57 PM, 28 Jan 2024
    yes, very true
  • @Mattiwatti #5720 04:59 PM, 28 Jan 2024
    I'm not at all familiar with memory caching related stuff really, I was mainly focusing on getting my machine to no longer hang and even that was quite enough work
  • @Mattiwatti #5721 05:01 PM, 28 Jan 2024
    and I don't think we've heard back re: the latest changes from the person who still saw this issue on their machine, even though it was fixed on mine/ours?
  • @Mattiwatti #5722 05:02 PM, 28 Jan 2024
    would be nice to know if there was a difference at all
  • @Testte124 #5723 09:23 PM, 28 Jan 2024
    Joined.
  • @my_t3l3gr4m_n4m3 #5724 11:09 PM, 28 Jan 2024
    Joined.
  • @DynamiclyAllocated #5725 11:20 PM, 28 Jan 2024
    Joined.
  • 29 January 2024 (3 messages)
  • @lumosup #5726 01:46 AM, 29 Jan 2024
    Joined.
  • @LinGyyds #5727 03:39 AM, 29 Jan 2024
    Joined.
  • @Screamjizz #5728 08:52 AM, 29 Jan 2024
    nice work
  • 30 January 2024 (7 messages)
  • @Screamjizz #5730 07:57 AM, 30 Jan 2024
    @Mattiwatti Are you sure you want to delete this code? My product has been running on many machines without any issues
  • @Mattiwatti ↶ Reply to #5730 #5731 09:45 AM, 30 Jan 2024
    Well the code you quoted does two things, so I'll answer in two parts:

    1. It queries the SMRR if we know one has been configured. This part is totally fine by me (though I do question its value in HyperDbg somewhat). Only one comment: at the very least this query should be using the appropriate SMRR types (IA32_SMRR_PHYSBASE_REGISTER/IA32_SMRR_PHYSMASK_REGISTER) instead of repurposing MTRR types used throughout the rest of the function. The SMRR is not an MTRR.

    2. It stores the result of the SMRR query in MemoryRanges of the global EPT state. This part I believe is absolutely wrong, again for the reason that the SMRR is not actually a variable range MTRR at all. (Unfortunately the SDM does a good job of making it look like one, by describing it in the same section and giving it identical structures).

    The SMRR can only be treated as an MTRR by SMM code, since that is the only code that can access this region. For non-SMM code like HyperDbg, the main purpose of the SMRR might be the ability to query the SMRAM base and size, since this region cannot be read from or written to, let alone cached. The memory type in particular is problematic: the entire region is treated as uncacheable outside of SMM, which is very different from the value of 'write-back' the MSR reports on my machine.

    What problems does (2) cause? Well in short, EptGetMemoryType() will return an incorrect memory type for any address that happens to be inside the SMRAM range. How bad is this really? Honestly I have no idea. I doubt it is really problematic, since HyperDbg itself has no way or need (even by acccident) to ever try to use a physical address from SMRAM for e.g. allocations or hooks. *But*, I did place a debug log statement in the function to verify this, and (on my machine) there were definitely 20 or so calls to EptGetMemoryType() for PAs in the SMRAM range. I don't know who was querying these or why, but the memory type returned simply must have been incorrect in these cases.

    So in short: yes, I'm sure. I believe this code was not doing anything useful in the best case scenario, and subtly causing HyperDbg to assume the wrong caching type in other places in the worst case scenario.
  • @Mattiwatti #5732 09:47 AM, 30 Jan 2024
    With the above said, I'm not quite as sure that simply ignoring the SMRR is the best way to deal with it, but I do think it probably is. I tried for quite some time to come up with a reason for HyperDbg to need to know this information, but failed.

    But if there exists some scenario I didn't think of where it would be useful or necessary for HyperDbg to know the SMRAM range, then by all means bring back the query! I won't oppose. However, the result should not be stored in MemoryRanges as if it were an MTRR. Rather, it should be given a separate variable with its name and type indicating that it describes the SMRR and not an MTRR. Secondly, if this variable is used in EptGetMemoryType(), it should be to return a value of uncacheable immediately (even if there are overlapping MTRRs for the address), and not whatever value was reported by the MSR as the memory type to be used by SMM code.
  • @honorary_bot #5733 11:19 AM, 30 Jan 2024
    Omg, leave SMM related stuff alone. It is not needed and not used. Do you have dual monitor treatment? No.
  • @Mattiwatti #5734 01:22 PM, 30 Jan 2024
    I guess that is a more succinct and to the point version of what I was more or less trying to say 😅
  • @honorary_bot #5735 01:22 PM, 30 Jan 2024
    :)
  • 31 January 2024 (13 messages)
  • @HughEverett #5736 04:33 AM, 31 Jan 2024
    Question:

    For the '!monitor' command in HyperDbg, let's consider monitoring addresses within the range where the start address is 0x12345000 and the end address is 0x12346000.

    Do you prefer the last address (0x12346000) to be hooked, or do you expect HyperDbg to hook only from 0x12345000 to 0x12345fff but not 0x12346000?

    ✅ I anticipate the last byte to be hooked or in other words: [start address, end address].

    ✅ I do not expect the last address to be hooked or in other words: [start address, end address).
  • @HughEverett #5737 04:33 AM, 31 Jan 2024
    Do you prefer the last address (0x12346000) to be hooked, or do you expect HyperDbg to hook only from 0x12345000 to 0x12345fff but not 0x12346000?
    anonymous poll

    I anticipate the last byte to be hooked or in other words: [start address, end address]. – 5
    👍👍👍👍👍👍👍 83%

    I do not expect the last address to be hooked or in other words: [start address, end address). – 1
    👍 17%

    👥 6 people voted so far.
  • @hikawaruriwo #5738 04:59 AM, 31 Jan 2024
    Would it be more accurate to name them as follows?🧐
    [Base, Limit]
    [Base, End)
  • Yes, exactly. I added the same terms [start address, end address] and [start address, end address).
  • @Screamjizz #5740 02:12 PM, 31 Jan 2024
    @HughEverett
  • @Screamjizz #5742 02:13 PM, 31 Jan 2024
    This position cannot be used to determine whether VT is enabled. I tested it on a computer with VT enabled
  • @Screamjizz #5743 02:14 PM, 31 Jan 2024
    The value of this one is 0
  • @Screamjizz #5744 02:27 PM, 31 Jan 2024
    The original method is more accurate
  • What do you mean by the original method? 🤔
  • This lock bit, which indicates whether VMX is locked or not. Honestly, get what you mean. How is it related to check whether VT is enabled or not?
  • @HughEverett #5748 03:22 PM, 31 Jan 2024
    Of course, if it's locked, then VT is not enabled but this bit doesn't necessarily mean that VT is enabled if it's not locked.