National Cyber Warfare Foundation (NCWF)

Hypervisor-101-in-Rust for learning to build a UEFI fuzzing hypervisor in Rust


0 user ratings
2026-10-19 11:27:32
milo
Red Team (CNA)
"Hypervisor-101-in-Rust

tandasat/Hypervisor-101-in-Rust packages a one-day course and a working Intel/AMD hypervisor written in Rust for fuzzing UEFI firmware, aimed at security researchers and defensive firmware analysts.








Tooltandasat/Hypervisor-101-in-Rust — course materials plus a fuzzing hypervisor for UEFI on Intel and AMD processors, written in Rust
CategoryHypervisor development / firmware fuzzing educational toolkit
Primary UseLearning to build a type-2 hypervisor in Rust and using it to instrument and fuzz UEFI code in controlled target environments like Bochs and VMware
Safe UseEducational and research use: coursework, personal labs, and authorized firmware security assessments on systems and VMs you own or are licensed to test
Telemetry NoteA fuzzing hypervisor leaves clear traces on the target: VMCS/VMCB construction, VMX/SVM CPUID and MSR modifications, and hypervisor artifacts detectable by firmware integrity and virtualization-aware monitoring on hosts where it runs

Hypervisor-101-in-Rust is the published material of a one-day class taught at Global Cybersecurity Camp 2023 in Singapore, authored by well-known hypervisor researcher tandasat. What makes the repository more than a slide deck is that it ships a complete, working fuzzing hypervisor for UEFI on Intel and AMD processors, written in Rust, alongside lecture notes, hands-on exercises, and a sample corpus with target files. At roughly 1,200 stars under an MIT license, it has become a reference point for engineers who want to move from reading about VMX and SVM to actually writing a virtualization layer themselves, in a memory-safe language that arguably suits that task better than C.


The repository is organized around three pillars. The course/ directory holds the class materials, the hypervisor/ directory holds the source code together with a detailed description of how the fuzzing hypervisor is designed, and BUILDING.md documents how to build and run the hypervisor against the sample files under tests/. The README also points to a hosted version of the course at the project's GitHub Pages site, so the lecture content is browsable without cloning anything. This structure reflects the author's intent that the code is not a black-box tool but a teaching artifact: you are expected to read the hypervisor alongside the lessons.


One honest caveat the README states up front is that the materials were designed for an interactive classroom setting and are, by the author's own admission, less effective for pure self-learning because the explanations are deliberately light. That transparency matters when calibrating expectations. If you already have a working knowledge of x86 virtualization extensions and want to see a clean Rust implementation, the gap is easy to bridge; if you are starting from zero, expect to lean on external references and, as the README suggests, potentially the author's scheduled public classes listed through the System Programming Lab site.


The target environment support is broad in a way that lowers the barrier to entry considerably. Host development works on Windows with WSL, macOS, and Ubuntu, and notably includes Apple Silicon macOS as well as ARM64-based Windows and Ubuntu installs — the README explicitly states no x64 system is required to develop and build the code. The test, or target, side runs on Bochs, on VMware Fusion or VMware Workstation Pro when the host has an Intel or AMD processor, and on select bare metal models, all booting UEFI firmware. This split means a researcher can develop on a laptop and exercise the hypervisor inside an emulator they fully control.


Architecturally, a fuzzing hypervisor like this sits between the hardware and the firmware under test, using Intel VMX or AMD SVM extensions to trap and mediate instruction execution. The value for fuzzing UEFI specifically is that firmware code is notoriously hard to instrument in place: it runs before an OS exists, crash recovery is expensive, and coverage feedback is awkward to obtain. By virtualizing the environment, the hypervisor can intercept faults, reset state, and drive repeated executions of the target with mutated inputs — the classic throughput argument for hypervisor-based fuzzing that researchers such as Brandon Falk, whose Falkvisor is credited in the README's acknowledgements, popularized.


The acknowledgements section is a useful map of the lineage here. Andrew Burkett and Rich Seymour are credited with mentoring the author on Rust, Karsten König and Amir Bazine with encouraging the exploration of hypervisors for fuzzing, and the Falkvisor work is cited as inspiration. For a professional evaluating the material, this pedigree matters: the repository is not an isolated academic exercise but a distillation of techniques circulating in the systems-security research community, packaged into a form a motivated engineer can work through in a day with a lab machine.


For authorized security work, the practical relevance is straightforward. UEFI firmware vulnerabilities are a persistent concern for enterprise defenders and OEM security teams, and the ability to write a custom hypervisor is the foundation for building sanctioned fuzzing harnesses against firmware images you own or are contracted to assess. Everything in this repository operates inside environments you control — Bochs, VMware, or your own bare metal — and the fuzzing corpus and targets it ships are test artifacts, not weaponized material. It is a research and education project in the fullest sense, and there is nothing in the README that points toward offensive use against third-party systems.


From a defensive perspective, studying this code also builds detection intuition. A hypervisor installed beneath or above a running system necessarily modifies CPU behavior — CPUID leaves, MSRs, and the virtualization control structures — and understanding exactly how a minimal Rust hypervisor initializes VMCS or VMCB structures tells you what artifacts a legitimate research hypervisor leaves and, by extension, what blue teams can monitor for unauthorized virtualization on managed hosts. That dual utility, teaching both construction and observability, is a common thread in tandasat's broader body of hypervisor tooling.


The choice of Rust deserves comment on its own merits. Hypervisor code runs with full system privilege, and memory-safety defects at that layer are catastrophic and hard to debug; Rust's ownership model eliminates whole classes of bugs that historically plagued C-based virtualization projects. For a learner, the repository doubles as a case study in systems Rust — working with unsafe blocks, raw pointer manipulation, and hardware data structures — which is arguably as valuable as the virtualization curriculum itself for engineers building security tooling.


In short, tandasat/Hypervisor-101-in-Rust is one of the more accessible entry points into a genuinely difficult specialty. It will not hand you a turnkey fuzzing pipeline, and the author is candid that self-learners get a lighter experience than classroom attendees, but the combination of working code, build documentation, test targets, and a permissive MIT license makes it a solid foundation for authorized firmware research, lab work, and anyone who wants to understand what really happens when the machine says yes to VMXON.



Official project repository for tandasat/Hypervisor-101-in-Rust.

Download Tool

Educational analysis for authorized security professionals. Use only in controlled, authorized environments.






Source: OffensiveSec
Source Link: https://www.offsecblog.com/2026/10/hypervisor-101-in-rust-for-learning-to.html


Comments
new comment
Nobody has commented yet. Will you be the first?
 
Forum
Red Team (CNA)



Copyright 2012 through 2026 - National Cyber Warfare Foundation - All rights reserved worldwide.