Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypervisor rootkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flg_bachelors
TS
2024
hypervisor rootkit
Commits
9e08e9f5
Commit
9e08e9f5
authored
6 months ago
by
iliya.saroukha
Browse files
Options
Downloads
Patches
Plain Diff
feat: explained the relevant bits to VMX of the IA32_FEATURE_CONTROL Model-Specific Register
parent
c7ae8fcd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/re.md
+27
-0
27 additions, 0 deletions
docs/re.md
with
27 additions
and
0 deletions
docs/re.md
+
27
−
0
View file @
9e08e9f5
...
...
@@ -109,6 +109,33 @@ static void enable_vmx(void) {
}
```
VMXON is also controlled by the IA32_FEATURE_CONTROL MSR (Model-Specific
Register). MSRs are 64-bit wide. The address of IA32_FEATURE_CONTROL MSR is
**0x3a**
.
The relevant bits (in terms of VMX) of this MSR are:
-
Bit 0 (Lock bit)
-
System BIOS can use this bit to provide a setup option for BIOS to disable
support for VMX.
**
If this bit is set, WRMSR to this MSR will cause a general-
protection exception
**
. To enable VMX support in a platform, BIOS must set bit
1, bit 2, or both (see below), as well as the lock bit.
-
Bit 1 (VMXON in SMX operation)
-
Bit 2 (VMXON outside SMX operation)
**
In my case, after having activated VT-x through the BIOS, the value returned
by the IA32_FEATURE_CONTROL MSR is always equal to 5 (e.g. the lock bit and
VMXON outside SMX operation are always set).
**
**
If I decide to deactivate VT-x, the MSR will return the value of 1 (e.g. lock
bit).
**
Due to the fact that the
**lock bit**
is always
**set**
, it means that I'm not
able to write to this MSR using __wrmsr. What's interesting about this is that
the tutorial tries to modify this MSR but if we assume that the
**lock bit is set**
that branch
**will be a no-op**
.
## References
[
^1
]:
[The
Linux Kernel Module Programming Guide](https://sysprog21.github.io/lkmpg/)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment