GoodmansKernel README

The project's README from github.com/zer0condition/GoodmansKernel. As one markdown file: README.md.

The Goodmans Kernel

Demo

Signed WDM driver embedding wasm3. Loads unsigned .wasm modules, gives them nt/hal FFI. Write kernel logic in C/Rust, compile to wasm32, load, iterate. HVCI-compliant.

Features

Build

Needs VS 2022 + WDK 10.0.26100.0, Qt 6.9, clang wasm32.

build.cmd Release

Install

cd deploy
gen_cert.cmd
install.cmd

Needs bcdedit /set testsigning on if not signed.

IOCTLs

Code Purpose
LOAD_MODULE load .wasm, link imports
CALL_EXPORT invoke export, up to 8 args
UNLOAD_MODULE tear down runtime
LIST_MODULES / MODULE_INFO enumerate
UNLOAD_ALL / FORCE_UNLOAD bulk teardown
TAIL_LOG / TAIL_TRACE poll rings
TRACE_CTL toggle trace
READ_GUEST read guest linear memory
NOTIFY_STOP deregister callbacks

Host Imports

Import Sig
host_dbg_print v(ii)
host_alloc / host_free I(i) / v(I)
host_read_u8/32/64 i/I(I)
host_write_u64 v(II)
host_read_bytes / host_write_bytes i(Iii)
host_current_irql i()
host_process_id / host_thread_id i()
host_current_process I()
host_cpuid v(iii)
host_rdtsc I()
host_readmsr / host_writemsr I(i) / i(iI)
host_phys_read / host_phys_write i(Iii)
host_call I(iiiIIIIIIII)
host_ih_trampoline / host_ih_configure / host_ih_quiesce
host_notify_enable / host_notify_poll / host_dispatch_start / host_dispatch_stop
host_mem_base / host_mem_size I() / i()
host_make_unistr / host_free_unistr

Guest bindings in guest_sdk/gvm.h.

Capabilities

Bit Name Grants
0 ALLOC host_alloc, host_free
1 READ_KMEM host_read_*
2 WRITE_KMEM host_write_*
3 MSR_READ host_readmsr
4 MSR_WRITE host_writemsr
5 PHYSMEM host_phys_*
6 CPUID_TSC host_cpuid, host_rdtsc
7 CALLBACKS process/image notify
8 HOSTCALL host_call
9 INTROSPECT pid/tid/irql/current_process

Limits

Credits

License

MIT.

GoodmansKernel (zer0condition/GoodmansKernel)

Searching Database…

What is this?GoodmansKernel is a signed Windows kernel-mode driver that embeds the wasm3 interpreter, letting you load unsigned .wasm modules and run them inside the kernel with direct FFI access to nt/hal exports. You write kernel logic in C or Rust, compile it to wasm32, load it into the driver, and iterate without re-signing each payload.
Is this a full application or just a driver?It's a kernel-mode WDM driver (.sys) with a Qt6 GUI front-end for loading modules and watching logs; the wasm guest modules are compiled separately and loaded into the driver via IOCTLs.
How do I build and install it?Build the driver in Visual Studio 2022 with WDK 10.0.26100.0, Qt 6.9, and clang targeting wasm32 for guest modules. To run it if it's not properly signed, enable test signing with 'bcdedit /set testsigning on' before loading the driver.
What tools do I need before I can build this?VS 2022, WDK 10.0.26100.0, Qt 6.9 for the GUI, and clang with wasm32 target support to compile guest modules.
What are the main limits of running wasm payloads in the kernel this way?Guest modules can't use f32/f64 types, wasm memory bounds checks are compiled out so a buggy module can still corrupt memory, only one caller per module is allowed at a time, IOCTL payloads are capped at 16MB, and there's a hard limit of 32 module slots.
Is this safe to use license-wise?The driver itself is MIT licensed, same as the bundled wasm3 and InfinityHook, but it links Qt 6 which is LGPLv3, so redistributing a built binary pulls in LGPL obligations.
What can a loaded wasm module actually do once it's running?Each module gets a per-slot capability bitmask (ALLOC, READKMEM, WRITEKMEM, MSRREAD/WRITE, PHYSMEM, CPUIDTSC, CALLBACKS, HOSTCALL, INTROSPECT) that gates which host imports like hostreadmsr or hostphysread it's allowed to call.
How do I actually talk to a module after loading it?Through IOCTLs: LOADMODULE links a .wasm module's imports, CALLEXPORT invokes an export with up to 8 arguments, and TAILLOG/TAILTRACE let you poll its log and trace rings.
Why use wasm instead of just injecting shellcode into the kernel?wasm3 interprets the guest bytecode with no JIT, so the kernel never executes dynamically generated native code, which keeps the driver compliant with HVCI and other W^X enforcement that would block unsigned native execution.
What's InfinityHook used for here?It's a credited third-party trampoline technique the driver uses for hooking, giving it process/image notify-style callback interception without relying on undocumented SSDT patching.
Size
4.7 MB
Stars
152
Updated
CommitAug 18
Age
2mo
Commits · 90 Days