1
0
mirror of https://github.com/momo5502/hypervisor.git synced 2025-12-16 15:37:48 +00:00

23 Commits

Author SHA1 Message Date
dependabot[bot]
ccf5f0260b Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 11:17:28 +00:00
Maurice Heumann
2b6e78beb2 Merge pull request #18 from momo5502/dependabot/github_actions/actions/upload-artifact-5
Bump actions/upload-artifact from 4 to 5
2025-11-01 10:20:55 +01:00
dependabot[bot]
6e8dd2f3ad Bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 09:09:26 +00:00
Maurice Heumann
0711ac02b1 Merge pull request #17 from momo5502/dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-10-20 10:54:15 +02:00
dependabot[bot]
6335b452fe Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 09:14:26 +00:00
Maurice Heumann
ff66fce225 Merge pull request #16 from momo5502/dependabot/submodules/external/FindWDK-1e41c97
Bump external/FindWDK from `04b4151` to `1e41c97`
2025-08-03 14:56:27 +02:00
dependabot[bot]
dbd0cc23c8 Bump external/FindWDK from 04b4151 to 1e41c97
Bumps [external/FindWDK](https://github.com/SergiusTheBest/FindWDK) from `04b4151` to `1e41c97`.
- [Commits](04b4151f6d...1e41c97ed8)

---
updated-dependencies:
- dependency-name: external/FindWDK
  dependency-version: 1e41c97ed8511bd1085eb707e2c357d9f159963f
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 09:27:11 +00:00
Maurice Heumann
051dee0214 Update README.md 2025-07-29 10:59:28 +02:00
Maurice Heumann
aab19ccb34 Merge pull request #13 from momo5502/dependabot/submodules/external/FindWDK-04b4151
Bump external/FindWDK from `6aaaaf4` to `04b4151`
2025-07-01 13:38:26 +02:00
dependabot[bot]
4051223045 Bump external/FindWDK from 6aaaaf4 to 04b4151
Bumps [external/FindWDK](https://github.com/SergiusTheBest/FindWDK) from `6aaaaf4` to `04b4151`.
- [Commits](6aaaaf423a...04b4151f6d)

---
updated-dependencies:
- dependency-name: external/FindWDK
  dependency-version: 04b4151f6d6257554f2467edc0ff7f0c77074c7e
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-01 10:24:21 +00:00
momo5502
dbc7b5422e Update ia32-doc submodules
Some checks failed
Build / Build binaries (debug) (push) Has been cancelled
Build / Build binaries (release) (push) Has been cancelled
2025-05-03 09:44:47 +02:00
Maurice Heumann
de99750e53 Update build.yml
Some checks failed
Build / Build binaries (debug) (push) Has been cancelled
Build / Build binaries (release) (push) Has been cancelled
2024-11-24 15:23:54 +01:00
Maurice Heumann
5a796c7aae Merge pull request #10 from momo5502/dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
2024-11-24 15:22:47 +01:00
Maurice Heumann
af3d08e791 Merge pull request #8 from momo5502/dependabot/github_actions/ilammy/msvc-dev-cmd-1.13.0
Bump ilammy/msvc-dev-cmd from 1.12.0 to 1.13.0
2024-11-24 15:22:29 +01:00
Maurice Heumann
8da8fa7f8e Merge pull request #9 from momo5502/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2024-11-24 15:22:18 +01:00
dependabot[bot]
111b9c9a01 Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-24 14:18:12 +00:00
dependabot[bot]
243ddeebdb Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-24 14:18:10 +00:00
dependabot[bot]
a6e484d9df Bump ilammy/msvc-dev-cmd from 1.12.0 to 1.13.0
Bumps [ilammy/msvc-dev-cmd](https://github.com/ilammy/msvc-dev-cmd) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/ilammy/msvc-dev-cmd/releases)
- [Commits](https://github.com/ilammy/msvc-dev-cmd/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: ilammy/msvc-dev-cmd
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-24 14:18:08 +00:00
Maurice Heumann
b3dec2e80c Update dependabot.yml 2024-11-24 15:17:31 +01:00
Maurice Heumann
4d68b0bb78 Merge pull request #7 from momo5502/dependabot/submodules/external/FindWDK-6aaaaf4
Some checks failed
Build / Build binaries (debug) (push) Has been cancelled
Build / Build binaries (release) (push) Has been cancelled
Bump external/FindWDK from `79a45e7` to `6aaaaf4`
2024-09-13 10:14:45 +02:00
dependabot[bot]
79fd28ad7e Bump external/FindWDK from 79a45e7 to 6aaaaf4
Bumps [external/FindWDK](https://github.com/SergiusTheBest/FindWDK) from `79a45e7` to `6aaaaf4`.
- [Commits](79a45e7d70...6aaaaf423a)

---
updated-dependencies:
- dependency-name: external/FindWDK
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-09 09:30:54 +00:00
Maurice Heumann
7073f7169a Merge pull request #6 from momo5502/dependabot/submodules/external/FindWDK-79a45e7
Some checks failed
Build / Build binaries (debug) (push) Has been cancelled
Build / Build binaries (release) (push) Has been cancelled
Bump external/FindWDK from `c941028` to `79a45e7`
2024-08-19 10:19:51 +02:00
dependabot[bot]
b74f712975 Bump external/FindWDK from c941028 to 79a45e7
Bumps [external/FindWDK](https://github.com/SergiusTheBest/FindWDK) from `c941028` to `79a45e7`.
- [Commits](c941028b26...79a45e7d70)

---
updated-dependencies:
- dependency-name: external/FindWDK
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-14 09:05:19 +00:00
8 changed files with 38 additions and 32 deletions

View File

@@ -1,7 +1,12 @@
version: 2
updates:
- package-ecosystem: gitsubmodule
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: gitsubmodule
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: monthly

View File

@@ -20,7 +20,7 @@ jobs:
- release
steps:
- name: Check out files
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
@@ -38,13 +38,10 @@ jobs:
uses: ammaraskar/msvc-problem-matcher@master
- name: Setup DevCmd
uses: ilammy/msvc-dev-cmd@v1.12.0
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: x64
- name: Setup Ninja
uses: ashutoshvarma/setup-ninja@master
- name: Configure CMake
run: cmake --preset=${{matrix.configuration}}
@@ -52,7 +49,7 @@ jobs:
run: cmake --build --preset=${{matrix.configuration}}
- name: Upload ${{matrix.configuration}} binaries
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v5
with:
name: ${{matrix.configuration}} binaries
path: |

View File

@@ -1,11 +1,15 @@
# 🧪 Hypervisor with EPT Hooking Support
![license](https://img.shields.io/github/license/momo5502/hypervisor.svg)
[![build](https://github.com/momo5502/hypervisor/workflows/Build/badge.svg)](https://github.com/momo5502/hypervisor/actions)
[![paypal](https://img.shields.io/badge/PayPal-support-blue.svg?logo=paypal)](https://paypal.me/momo5502)
# Hypervisor
A lightweight experimental hypervisor that leverages Intel's VT-x virtualization technology to create stealthy memory hooks using EPT (Extended Page Tables). By manipulating second-level address translation, it enables invisible code execution interception that bypasses traditional memory integrity checks.
Experimental VT-X type 2 hypervisor with EPT hooking/analysis support.
Basically just a tool I use for reverse engineering and stuff. Nothing too serious.
## Safety Warnings
- **System Instability**: Improper hypervisor implementation can cause BSODs
- **Data Loss Risk**: Always backup important data before testing
- **Ethical Usage**: Only use for legitimate research and educational purposes
## Credits

View File

@@ -291,7 +291,7 @@ namespace vmx
// --------------------------
epdpte temp_epdpte{};
pml1 temp_epdpte{};
temp_epdpte.flags = 0;
temp_epdpte.read_access = 1;
temp_epdpte.write_access = 1;
@@ -306,7 +306,7 @@ namespace vmx
// --------------------------
epde_2mb temp_epde{};
pml2 temp_epde{};
temp_epde.flags = 0;
temp_epde.read_access = 1;
temp_epde.write_access = 1;
@@ -400,18 +400,18 @@ namespace vmx
}
const auto* pml2 = reinterpret_cast<pml2_ptr*>(pml2_entry);
auto* pml1 = this->find_pml1_table(pml2->page_frame_number * PAGE_SIZE);
if (!pml1)
auto* pml1_table = this->find_pml1_table(pml2->page_frame_number * PAGE_SIZE);
if (!pml1_table)
{
pml1 = static_cast<epte*>(memory::get_virtual_address(pml2->page_frame_number * PAGE_SIZE));
pml1_table = static_cast<pml1*>(memory::get_virtual_address(pml2->page_frame_number * PAGE_SIZE));
}
if (!pml1)
if (!pml1_table)
{
return nullptr;
}
return &pml1[ADDRMASK_EPT_PML1_INDEX(physical_address)];
return &pml1_table[ADDRMASK_EPT_PML1_INDEX(physical_address)];
}
pml1* ept::find_pml1_table(const uint64_t physical_address)
@@ -551,7 +551,7 @@ namespace vmx
auto& split = this->allocate_ept_split();
epte pml1_template{};
pml1 pml1_template{};
pml1_template.flags = 0;
pml1_template.read_access = 1;
pml1_template.write_access = 1;

View File

@@ -17,11 +17,11 @@
namespace vmx
{
using pml4 = ept_pml4;
using pml3 = epdpte;
using pml2 = epde_2mb;
using pml2_ptr = epde;
using pml1 = epte;
using pml4 = ept_pml4e;
using pml3 = ept_pdpte;
using pml2 = ept_pde_2mb;
using pml2_ptr = ept_pde;
using pml1 = ept_pte;
using pml4_entry = pml4e_64;
using pml3_entry = pdpte_64;

View File

@@ -553,7 +553,7 @@ void vmx_enable_syscall_hooks(const bool enable)
ia32_vmx_entry_ctls_register entry_ctls_register{};
vmx_basic_register.flags = __readmsr(IA32_VMX_BASIC);
exit_ctls_register.flags = read_vmx(VMCS_CTRL_VMEXIT_CONTROLS);
exit_ctls_register.flags = read_vmx(VMCS_CTRL_PRIMARY_VMEXIT_CONTROLS);
entry_ctls_register.flags = read_vmx(VMCS_CTRL_VMENTRY_CONTROLS);
efer_register.flags = __readmsr(IA32_EFER);
@@ -572,7 +572,7 @@ void vmx_enable_syscall_hooks(const bool enable)
__vmx_vmwrite(VMCS_CTRL_VMENTRY_CONTROLS, adjust_msr(msr, entry_ctls_register.flags));
msr.QuadPart = __readmsr(vmx_basic_register.vmx_controls ? IA32_VMX_TRUE_EXIT_CTLS : IA32_VMX_EXIT_CTLS);
__vmx_vmwrite(VMCS_CTRL_VMEXIT_CONTROLS, adjust_msr(msr, exit_ctls_register.flags));
__vmx_vmwrite(VMCS_CTRL_PRIMARY_VMEXIT_CONTROLS, adjust_msr(msr, exit_ctls_register.flags));
}
__vmx_vmwrite(VMCS_GUEST_EFER, efer_register.flags);
@@ -996,7 +996,7 @@ void setup_vmcs_for_cpu(vmx::state& vm_state)
ia32_vmx_exit_ctls_register exit_ctls_register{};
exit_ctls_register.host_address_space_size = 1;
__vmx_vmwrite(VMCS_CTRL_VMEXIT_CONTROLS,
__vmx_vmwrite(VMCS_CTRL_PRIMARY_VMEXIT_CONTROLS,
adjust_msr(launch_context->msr_data[15],
exit_ctls_register.flags));