/illusion-rs

Rusty Hypervisor - Windows UEFI Blue Pill Type-1 Hypervisor in Rust (Codename: Illusion)

Primary LanguageRustMIT LicenseMIT

Windows UEFI Blue Pill Type-1 Hypervisor in Rust (Codename: Illusion)

Build Status License Issues Forks Stars

A lightweight, memory-safe, and blazingly fast Rust-based type-1 research hypervisor with hooks for Intel VT-x, focused on studying the core concepts of virtualization.

Features

  • Extended Page Tables (EPT): Support for Memory Type Range Registers (MTRR).
  • VM Exit Handling: Handling of ExceptionOrNmi (#GP, #PF, #BP, #UD), InitSignal, StartupIpi, Hlt, Cpuid, Getsec, Vmcall, Vmclear, Vmlaunch, Vmptrld, Vmptrst, Vmresume, Vmxon, Vmxoff Rdmsr, Wrmsr, Invd, Rdtsc, EptViolation, EptMisconfiguration, Invept, Invvpid, Xsetbv.
  • Hidden Kernel Inline Hooks: PatchGuard-compatible jump (JMP) and breakpoint (int3) hooks. (Refer to Hooks in the Windows Blue Pill Type-2 Hypervisor in Rust (Codename: Matrix) for reusable code.)
  • Hidden System Call (Syscall) Hooks: PatchGuard-compatible jump (JMP) and breakpoint (int3) hooks for System Service Descriptor Table (SSDT) function entries. (Refer to Hooks and SSDT in the Windows Blue Pill Type-2 Hypervisor in Rust (Codename: Matrix) for reusable code.)

Supported Hardware

  • ✅ Intel processors with VT-x and Extended Page Tables (EPT) support.
  • ❌ AMD processors with AMD-V (SVM) and Nested Page Tables (NPT) support.

Supported Platforms

  • ✅ Windows 10 - Windows 11, x64 only.

Installation

  1. Install Rust from here.
  2. Switch to Rust Nightly: rustup toolchain install nightly and rustup default nightly.
  3. Install Tools: cargo install cargo-make cargo-expand cargo-edit cargo-workspaces.

Building the Project

  • Development: cargo build --target x86_64-unknown-uefi --profile dev.
  • Release: cargo build --target x86_64-unknown-uefi --profile release.

Showcase

Check HV Vendor

Acknowledgments, References, and Motivation

Big thanks to the amazing people and resources that have shaped this project. A special shout-out to everyone listed below. While I didn't use all these resources in my work, they've been goldmines of information, super helpful for anyone diving into hypervisor development, including me.

Community and Technical Resources

Helpers and Collaborators

Special thanks to:

License

This project is licensed under the MIT License. For more information, see the MIT License details.