A boot-time Type-1 hypervisor research platform.
HV2 establishes a minimal control plane inside the virtualization path during early boot, then exposes a constrained set of memory and translation primitives to a user-mode research library.
HV2 is our private Type-1 hypervisor research platform for studying memory, execution state, and address translation from below the operating-system trust boundary. This article documents the engineering model, research value, cybersecurity use cases, and validation strategy without releasing source code, signatures, offsets, or deployment instructions.
The project studies what becomes possible when memory introspection is performed below the guest operating system instead of through a driver, debugger, or in-guest agent. The goal is not to publish an operational tool. The goal is to document a disciplined private platform for controlled lab research.
HV2 establishes a minimal control plane inside the virtualization path during early boot, then exposes a constrained set of memory and translation primitives to a user-mode research library.
Virtualization-backed isolation means kernel-level tooling is not always the lowest useful vantage point. HV2 studies memory from a layer where guest state can be observed independently.
We do not publish source code, byte signatures, structure offsets, build-specific internals, installation paths, or bypass procedures. The public value is architectural documentation and research methodology.
User-mode tooling is constrained by process boundaries. Kernel-mode tooling is powerful, but still shares the operating system's trust model, patching rules, and compromise surface. HV2 moves the observation point below that layer.
| Research position | What it can see | Primary limitation |
|---|---|---|
| User mode | Public APIs, process-visible memory, debugger-approved state. | Subject to handles, access checks, anti-debug logic, and user-mode tampering. |
| Kernel mode | Most operating-system structures, page tables, driver-visible memory. | Still inside the OS trust boundary and vulnerable to kernel-level concealment. |
| Hypervisor layer | Guest state, nested translation, physical backing behavior, VM-exit context. | Harder to initialize, debug, validate, and keep compatible across releases. |
The design depends on preserving normal behavior. HV2 handles only its own authenticated research commands and delegates unrelated VM exits back to the platform's original path.
HV2 uses that hardware-defined transition as a controlled command transport. Once in the hypervisor-side context, it can examine guest state and translation metadata that ordinary user-mode code cannot authoritatively access.
The payload checks the exit class and command marker before doing any research operation. If the exit is unrelated, it is forwarded to the original platform path. This makes the interposition narrow and auditable.
The implementation needs the guest instruction pointer, address-space root, register context, exit metadata, and nested translation root. The way this state is recovered differs by backend.
HV2 writes the return status, advances guest execution, and avoids disturbing unrelated register or hypervisor state. This is where many unstable prototypes fail.
HV2 exposes only the primitives required for research memory operations: initialize mappings, discover address-space root, translate, read, write, and copy.
The phrase "read memory" hides the real engineering work. On a virtualized x64 system, a guest virtual address must first be resolved through guest page tables, then the resulting guest physical address must be resolved through second-level translation.
VA
VA -> GPA
4K / 2M / 1G
GPA -> HPA
copy
The API is intentionally small. A compact command surface is easier to test, easier to audit, and less likely to become an uncontrolled privileged framework.
init_page_tables
Installs per-core mapping state so every logical processor can service requests consistently.
get_dirbase
Returns the current guest address-space root for later translation work.
translate
Resolves a guest virtual address into a guest physical address under a chosen root.
read_guest_phys
Copies guest physical memory into a controlled guest-visible buffer.
write_guest_phys
Writes bounded data into guest physical memory through the translation layer.
copy_guest_virt
Copies between two virtual address spaces using explicit address-space roots.
These examples are intentionally implementation-neutral. They show the control flow, data model, and correctness rules that make HV2 work, while omitting source-level details such as exact instruction sequences, signatures, structure offsets, or backend-specific constants.
Every operation is represented as a compact frame. The payload does not accept arbitrary procedures from the guest. It accepts a known operation, typed fields, length bounds, and a return slot.
// conceptual data model, not private source struct HV2Command { op: Operation flags: AccessMode root_src: AddressSpaceRoot root_dst: AddressSpaceRoot src: GuestAddress dst: GuestAddress size: BoundedLength status: HV2Status } // invariant: no unbounded copy, no unknown operation validate(frame): require frame.op in known_operations require frame.size <= max_transfer_window require aligned_or_page_split(frame)
HV2 is not a general replacement for the platform handler. The interposer only handles exits that match the HV2 command contract. Everything else is forwarded unchanged.
// conceptual control flow, not private source function on_vmexit(raw_context): exit = backend.read_exit(raw_context) if not is_hv2_command(exit, raw_context): return original_handler(raw_context) frame = backend.read_command_frame(raw_context) status = dispatch_hv2_operation(frame) backend.write_return(raw_context, status) backend.advance_guest_ip(raw_context) return resume_guest
A single successful initialization is not enough. The user-mode library pins execution across processor groups and logical processors so each core can install its own mapping state.
// conceptual user-mode orchestration function initialize_all_processors(): original_affinity = current_thread_affinity() for group in processor_groups(): for cpu in processors(group): pin_current_thread(group, cpu) status = hv2_call({ op: INIT_PAGE_TABLES }) if status != OK: restore_affinity(original_affinity) return status restore_affinity(original_affinity) return OK
HV2 has to read each paging level, validate presence, detect large pages, and preserve the correct offset. This is the difference between a reliable translator and a demo that works only on easy addresses.
// conceptual page walk, simplified function translate_guest_virtual(root, va): idx = split_virtual_address(va) pml4e = read_entry(root, idx.pml4) if not pml4e.present: return PML4E_NOT_PRESENT pdpte = read_entry(pml4e.page, idx.pdpt) if not pdpte.present: return PDPTE_NOT_PRESENT if pdpte.large: return pdpte.base + idx.offset_1g pde = read_entry(pdpte.page, idx.pd) if not pde.present: return PDE_NOT_PRESENT if pde.large: return pde.base + idx.offset_2m pte = read_entry(pde.page, idx.pt) if not pte.present: return PTE_NOT_PRESENT return pte.base + idx.offset_4k
In a virtualized system, guest physical is not necessarily the final backing address. HV2 resolves the second-stage mapping before it creates a temporary hypervisor-side mapping window.
// conceptual nested translation path function map_guest_physical(gpa, access): nroot = backend.read_nested_root() hpa = walk_nested_tables(nroot, gpa) if hpa is invalid: return INVALID_GUEST_PHYSICAL slot = choose_per_core_mapping_slot(access) map_slot(slot, hpa.page_base) invalidate_local_translation(slot) return slot.virtual_base + gpa.page_offset
Real memory ranges rarely stay inside one page. HV2 copies the largest safe chunk that fits both source and destination pages, then repeats until the bounded transfer is complete.
// conceptual bounded copy loop function copy_guest_range(src_root, src_va, dst_root, dst_va, size): while size > 0: src_gpa = translate_guest_virtual(src_root, src_va) dst_gpa = translate_guest_virtual(dst_root, dst_va) src = map_guest_physical(src_gpa, READ) dst = map_guest_physical(dst_gpa, WRITE) chunk = min( bytes_left_in_page(src_va), bytes_left_in_page(dst_va), size ) copy_bytes(dst, src, chunk) src_va += chunk dst_va += chunk size -= chunk return OK
The two architecture backends differ in how they recover guest state. Above that layer, the translation and command-dispatch model can stay largely shared.
// conceptual backend abstraction interface HV2Backend { read_exit(context) -> ExitInfo read_guest_root(context) -> AddressSpaceRoot read_guest_ip(context) -> GuestIP read_nested_root(context) -> NestedRoot read_command_frame(context) -> HV2Command write_return(context, status) advance_guest_ip(context) } // shared layer never needs private backend offsets dispatch(frame, backend): return operation_table[frame.op](frame, backend)
Precise errors matter. A failed translation, invalid guest page, missing nested entry, or uninitialized per-core mapping should be distinguishable in the lab output.
// conceptual status taxonomy enum HV2Status { OK, PML4E_NOT_PRESENT, PDPTE_NOT_PRESENT, PDE_NOT_PRESENT, PTE_NOT_PRESENT, INVALID_GUEST_VIRTUAL, INVALID_GUEST_PHYSICAL, MAPPING_NOT_INITIALIZED, UNSUPPORTED_OPERATION } // invariant: fail closed, return evidence if translation_failed: frame.status = precise_failure do_not_copy()
The following examples are deliberately conceptual. They document the research workflow and threat-model value without publishing code paths that directly reproduce HV2.
A lab tool compares the guest OS view of a process or kernel object against the memory view resolved by HV2. Differences can reveal hiding, unlinking, stale structures, or tampering.
# conceptual request, not implementation code request = { operation: "translate_and_sample", address_space: observed_root, region: suspect_object_range } compare( guest_reported_state, hv2_observed_state )
Instead of asking the OS to copy between two processes, HV2 treats each side as an explicit page-table root and performs translation on both source and destination.
# conceptual request, not implementation code copy = { source_root: root_A, source_va: range_A, dest_root: root_B, dest_va: range_B, bounds: page_limited }
In an authorized lab, researchers can compare whether defensive tools detect memory changes that are visible from below the guest OS boundary.
# conceptual lab protocol baseline = hv2.snapshot(region) exercise = authorized_test_event() after = hv2.snapshot(region) report( memory_delta, defender_observation )
HV2 gives researchers a way to study how memory-integrity features, isolated secrets, and virtualization-backed policies change boot timing and page visibility.
# conceptual observation model for mode in security_modes: boot_lab(mode) observe( initialization_order, page_visibility, translation_result )
HV2 supports two major x64 virtualization families. We refer to them as [Architecture-A] and [Architecture-B] to keep the article focused on methodology instead of vendor-specific replication details.
In defensive research, an independent vantage point matters. HV2 can help compare guest-reported state against memory and translation state observed below the guest OS, inside an authorized lab environment.
Acquire and compare memory state without relying only on in-guest APIs, handles, or potentially tampered kernel lists.
Study discrepancies between what the OS reports and what page tables, physical pages, and object remnants reveal.
Observe evasive behavior from outside the normal user-mode and kernel-mode instrumentation layers in a contained lab.
Measure whether endpoint tools detect memory deltas, hidden regions, suspicious mappings, or unusual cross-space behavior.
Study memory side effects of authorized exploit experiments without depending exclusively on the compromised guest view.
Build baselines for sensitive regions and compare them against later snapshots from below the OS trust boundary.
Evaluate how protected software behaves when observed from a lower instrumentation layer than it expects.
Analyze how memory integrity, credential isolation, and secure-kernel designs affect visibility, timing, and mapping rules.
Prototype out-of-band acquisition models for systems where in-guest collectors may be unreliable or already subverted.
Teach VM exits, guest state recovery, nested translation, and per-core mapping through a real private research platform.
Test how boot policy, memory integrity, and virtualization isolation change what can be observed and when.
Reason about which security guarantees depend on the guest kernel and which depend on the lower virtualization layer.
The local project artifacts show an architecture-first research effort: existing legacy build modeling, two backend families, a compact command surface, and a structured validation plan. We do not claim performance numbers until the benchmark harness is built.
| Finding | Why it matters | Status |
|---|---|---|
| 10 legacy target configurations modeled | Version drift is treated as a first-class engineering problem, not an afterthought. | Existing build metadata |
| 4 newer target families planned | The modernization roadmap prioritizes compatibility before broader research claims. | Research plan |
| 2 architecture backends | The same command model can sit above two different x64 virtualization state models. | Implemented paths present |
| 6 primitive operations | The API is small enough to audit but powerful enough for memory-forensics experiments. | Documented surface |
| Per-core initialization | Host/root paging behavior can differ per logical processor, so mapping state must be initialized across cores. | Required by design |
| 15 validation lanes | The project validates boot activation, payload reachability, VM-exit interception, hypercalls, stress behavior, and security-mode interaction. | Defined matrix |
The planned validation flow moves from offline compatibility analysis to VM boot-chain verification, hypercall correctness, stress testing, and security-feature interaction.
Low-level hypervisor work is inherently dual-use. We describe the system at a level useful to expert readers while withholding replication details that would turn the article into an operational guide.
The current design proves the architecture. The next research phase focuses on runtime discovery, automation, safer compatibility handling, and benchmark instrumentation.
portability
resilience
iteration speed
evidence
security research
hardening
Tell us what you are solving. We will come back with a concrete next step.
Contact Gloryck