[hyperdbg] IA32_FEATURE_CONTROL lock bit

234 views
Skip to first unread message

Jon Larimer

unread,
May 24, 2010, 11:44:29 PM5/24/10
to hype...@googlegroups.com
If the IA32_FEATURE_CONTROL MSR lock bit isn't set, hyperdbg will fail to load. It doesn't have to do that - if the lock bit isn't set, it can enable the Vmxon flag and set the lock bit. Here's a patch to fix so it works with the latest Bochs (2.4.5) which implemented support for IA32_FEATURE_CONTROL.

I took out the "#if 1" part to skip the exiting, but it still might be necessary when running on older versions of Bochs that don't support this MSR.

I tested this on Bochs 2.4.5 and a physical machine and they were both able to load hyperdbg.

The svn diff is attached.

-jon



ia32_feature_control_lock_fix.txt

Roberto Paleari

unread,
May 25, 2010, 3:37:42 AM5/25/10
to hype...@googlegroups.com
Hi Jon,

thanks for the patch.

We will update our test environment to the latest Bochs and we will
commit your patch to the SVN.

Roberto

Jon Larimer

unread,
May 30, 2010, 1:42:40 PM5/30/10
to hype...@googlegroups.com
On Tue, May 25, 2010 at 3:37 AM, Roberto Paleari
<roberto...@gmail.com> wrote:
> Hi Jon,
>
> thanks for the patch.

Ooops! My patch has a problem. The code isn't checking that VMX is
enabled, so it's possible that the BIOS will have disabled VMX then
set the lock bit and the CPU will GPF on the VMXON instruction.
Attached is a fix to check that so HyperDbg will exit if VMX is
disabled by the BIOS.

-jon

check_enablevmxon.diff.txt

Roberto Paleari

unread,
May 30, 2010, 3:21:23 PM5/30/10
to hype...@googlegroups.com
On Sun, May 30, 2010 at 7:42 PM, Jon Larimer <jlar...@gmail.com> wrote:
> Ooops! My patch has a problem. The code isn't checking that VMX is
> enabled, so it's possible that the BIOS will have disabled VMX then
> set the lock bit and the CPU will GPF on the VMXON instruction.
> Attached is a fix to check that so HyperDbg will exit if VMX is
> disabled by the BIOS.

You're right. I checked your patch and it seems ok. I've just
committed it to the SVN.
Tomorrow I will also test the patch in our test environment.

Thank you!
Roberto

Reply all
Reply to author
Forward
0 new messages