How hfiref0x/vboxhardenedloader works
Project type and purpose
• This is a native, Windows-based “hardened loader” tool.
• It consists of a user-mode loader application (Zekamashi) and a kernel-mode monitoring/patching driver (Tsugumi).
• Its goal is to inject/patch VirtualBox binaries at runtime to defeat VM-detection checks.
File structure
Top-level components:
• Binary/ – prebuilt executables, ACPI/EFI tables, hide-VM scripts, documentation.
• Source/
– Tsugumi_shell/ – the x64 kernel driver project (patches VirtualBox modules).
– Zekamashi_v2/loader/ – the x64 user-mode loader application, driver-loader framework, helper libs.
• Build scripts, VS solution files, driver resources and driver-loading utilities (minirtl, hde, idrv).
Pull architectural hints from the README
• “Tsugumi – monitoring driver”
• “Zekamashi – application, x64 – load Tsugumi… stop monitoring”
• Dependencies: Intel NAL driver (iQVM64.sys), Windows WDK, Visual Studio.
• Binary assets: ACPI/EFI tables, hidevm commands used by loader at runtime.
Main components
a. Zekamashi (User-Mode Loader App)
– Parses CLI, selects payloads, invokes NAL to install Tsugumi.
– Contains “minirtl” library, pattern-matching engine, resource loader.
b. Intel NAL Driver (iQVM64.sys)
– Third-party signed driver temporarily used to load Tsugumi.
c. Tsugumi (Kernel-Mode Monitoring/Patching Driver)
– Hooks VirtualBox process loading, patches in-memory DLLs.
– Uses hde (disassembler), pattern tables, victim.c engine.
d. VirtualBox/KVM Process
– Target of runtime patches (VBoxHardening.dll, ACPI tables, EFI VGA modules).
e. Binary Assets
– ACPI-DSDT/SSDT tables, EFI firmware blobs, hidevm scripts. Loaded by Zekamashi at setup.
f. Host Windows OS Kernel
– Enforces driver signing, manages driver load sequence, provides WDK kernel APIs.
Relationships and data flow
1) Operator runs Zekamashi.exe (admin+) →
2) Zekamashi deploys Intel NAL driver →
3) NAL driver loads Tsugumi driver →
4) Tsugumi registers callbacks/hooks on image load and module resolve →
5) When VirtualBox binaries are loaded, Tsugumi scans their memory, applies byte-patches using patterns/hde →
6) Patched VM process runs without hardening checks.
7) Zekamashi may unload Tsugumi or revert patches on demand.
Architectural patterns and design principles
• User-Mode↔Kernel-Mode boundary – clear separation of concerns.
• Plugin/Pattern Engine – hde and pattern modules form an extensible patching pipeline.
• Resource/Data-Driven design – Binary/ folder assets selected at runtime.
• Command-line interface for extensibility, scripting via hidevm scripts.
Key callouts
• “Admin privileges required” annotation on Zekamashi load path.
• “Pattern matching & patch engine (hde + patterns.c)” inside Tsugumi.
• “Driver-loader shim (minirtl + idrv)” inside Zekamashi.
• “ACPI/EFI patch modules” as optional data inputs.