System Programming Lab

The next public class is coming soon (planned to be April-June 2025)

Hypervisor Development for Security Researchers on the Intel Platform

Overview

This class teaches you how hypervisors and hardware-assisted virtualization technologies work. You can use this knowledge to build your hacking hypervisors for research and to study, customize, and break existing hypervisors.

We achieve this by developing lightweight, UEFI module-based hypervisors using Intel VT-x and analyzing various advanced hypervisor applications, such as fuzzing and system hardening. The knowledge we acquire applies to kernel module (driver)- based hypervisors and AMD processors.

The class is hands-on oriented; we will spend 30-40% of the time with excesses.

πŸ“ Concerned about the timezone? No worries. You will receive materials beforehand and a recording after each day and are encouraged to ask questions even before and after the period of the class. See Format and Package for more details.

Target Audience

Software developers, security researchers, and anyone interested in expanding their knowledge of virtualization technologies, the x86_64 system architecture, and UEFI should attend the class. Many past students enjoyed discovering details of new system architecture aside from learning Intel VT-x!

Prerequisites

Required:

You will receive links to recommended pre-class learning materials 2-3 weeks before the class.

Outline

  1. Hypervisor designs and UEFI
    • Lectures: various use of hypervisors, UEFI module-based hypervisors, comparison with kernel module-based hypervisors, and UEFI/EDK2
  2. VT-x Basics
    • Lectures: processor modes, VMCS, host vs.guest, VM-exit, VM-entry, high-level design options, tools and techniques to diagnose bugs, and the trick of navigating specifications
    • Lab: source-level debugging with VMware
    • Lab: configuring and starting host and guest, monitoring CPUID execution
    • Lab: troubleshooting VMX instruction errors with Bochs
  3. OS Boot
    • Lectures: system boot phases, boot time vs runtime, physical vs virtual mode, and UEFI runtime drivers
    • Lab: controlling VM-exits with MSR bitmaps
    • Lab: booting Windows and separating resources between guest and host
    • Lab: tracing guest page faults with exception interception and event injection
    • Advanced lectures and demos: analysis of Hyper-V configurations and common vulnerabilities in pass-through hypervisors
  4. Extended Page Tables (EPT)
    • Lectures: traditional x64 address translation vs EPT-enabled translation, EPT setup and activation, EPT-induced VM-exits
    • Lab: building and enabling pass-through EPT
    • Lab: tracing guest execution with EPT
    • Advanced lectures and demos: memory types emulation, caches invalidation, VPID, stealth hooking with EPT, MBEC, VT-rp (HLAT), device virtualization and VT-d (IOMMU/DMA remapping)
  5. Multi-processors Support
    • Lectures: multi-processor protocol, processor activity state, application processors startup, unrestricted guest, Hypervisor Top Level Functional Specification (TLFS), and enlightenment
    • Lab: virtualizing all processors
    • Lab: booting multi-processor Windows by emulating INIT-SIPI-SIPI
  6. Control Register Shadowing
    • Lectures: control register guest/host mask, read shadow VMCS, and complexities with emulation of control register access
    • Lab: booting Ubuntu by properly emulating MOV-to-CRx
  7. Additional Demos and Resources
    • Snapshot-based fuzzing hypervisors, hardware debuggers (DCI), nested virtualization techniques (software-based, VMCS shadowing, enlightened VMCS, EPT virtualization strategies), Intel TXT and PPAM, and helpful open source projects

Contents may change in a way that does not impact the learning objectives.

Details

Virtualization technologies are critical components in software security and analysis. How can hypervisors be used to secure system software? How can custom hypervisors be written to perform reverse engineering and fuzzing more efficiently?

This class will teach you the foundation to answer those questions by developing simple hypervisors together! The class is designed so everything is built from scratch and optimized for learning. This allows you to understand the building blocks of real-world applications of virtualization technologies and expand the knowledge for your interests afterward.

This class is hands-on-oriented. We believe that we can learn and retain knowledge best by tackling concrete challenges rather than being taught. With this philosophy, the class is designed with lab activities as the primary learning opportunities and lectures to explain the theories behind them. We will spend 30-40% of the time on hands-on exercises.

At the beginning of the class, you will receive a skeleton implementation of a hypervisor and incrementally update it through a series of exercises. We will also discuss other design options to understand their pros and cons.

As we learn foundations, we will analyze various applications and their implementations. This includes snapshot-based system-level fuzzing, performant system hardening with MBEC and HLAT (VT-rp), HyperGuard, HVCI, and KDP on Windows, dynamic analysis with stealth hooking, and SMM security reporting with Intel TXT (PPAM).

You will also receive two additional hypervisor implementations for reference:

Hypervisor_Development_for_Security_Researchers.png

Pricing

πŸ“ This information is for remote offerings.

Type Individual Company
Early Bird 2970 USD 3780 USD
Standard 3300 USD 4200 USD

All prices are per seat. Including tax.

Format and Package

Format:

Package:

πŸ“ It is perfectly fine to start learning yourself earlier, skip live sessions, watch recordings, and ask questions asynchronously at your own pace by taking advantage of the package. One of past students did this and successfully developed his hypervisor from scratch! The trainer is here for you to learn in any reasonable style that works for both of us.

Hardware and Software Requirements

You need to have the following hardware and software:

πŸ“ An Intel processor-based machine is required.

Newer operating systems and software are supported. Older software and another Linux distro may be workable but not tested. Other hypervisors, such as KVM, Hyper-V, or VirtualBox, cannot be used. If the host machine cannot be arranged locally, it can also be a cloud-provided machine. Contact the trainer for suggestions if you need a cloud-provided machine.

You will receive setup instructions 2-3 weeks before the class and must complete them before the class.

Registration and Contacts