Memory forensics from outside the OS, invisible to the guest
Find a file
lily 22b500ef69
Some checks failed
CI / build (push) Failing after 1m38s
forgejo runners fixes format
2026-08-24 18:36:44 -04:00
.forgejo/workflows forgejo runners fixes format 2026-08-24 18:36:44 -04:00
src almost done however kernel base scan messes up due to low cores 2026-04-12 01:54:31 -04:00
.gitignore more changes 2026-04-11 20:24:18 -04:00
build.rs more changes 2026-04-11 20:23:27 -04:00
Cargo.lock more changes 2026-04-11 20:23:27 -04:00
Cargo.toml more changes 2026-04-11 20:23:27 -04:00
README.md Update README.md 2026-04-12 02:38:49 -04:00

spectral

KVM hypervisor introspector. Reads vCPU state and guest physical memory from the host by injecting ioctls into QEMU via ptrace — no agent, no kernel module inside the guest.

Currently targets Windows 11 guests. Enumerates processes by walking the EPROCESS list and cross-references against PspCidTable to find DKOM-hidden ones.

Read the devpost! link


how it works

ptraces the QEMU process, injects KVM_GET_SREGS/KVM_GET_REGS ioctls to pull vCPU state, then reads guest physical memory through /proc/<pid>/mem. From there it's kernel structure walking — CR3 → page tables → EPROCESS → ActiveProcessLinks.

The ioctl injection uses a small shellcode gadget built by build.rs that gets written into QEMU's address space and executed under ptrace.

usage

sudo ./target/debug/KVM-hypervisor-introspector

Needs CAP_SYS_PTRACE. Rust nightly for inline asm. (i wrote this like after i changed some stuff up so you might not)

caveats

  • Kernel offsets in windows.rs are hardcoded for a specific Win11 build. Check vergiliusproject.com if targeting a different one.
  • Don't run this against anything you care about staying stable. Ptrace + live QEMU is racy.

structure

src/
  main.rs           cli, top-level flow
  kvm.rs            ioctl injection, vCPU state reads
  mem.rs            guest physical memory primitives
  ptrace_inject.rs  ptrace scaffolding + gadget execution
  windows.rs        EPROCESS walker, PspCidTable diff
build.rs            gadget assembly

refs