QEMU / KVM anti-detection
zhaodice qemu-anti-detection (CR3Swapper fork) rewrites QEMU-reported identity so guest AC and packers stop matching “QEMU keyboard”, QEMU serials, the UEFI VM bit, and BGRT. It does not fix RDTSC/KVM timing. Custom type-2 HV hide is stealth-hypervisor. Guest-side probe construction is hypervisor-detection.
Upstream: https://github.com/zhaodice/qemu-anti-detection
PVE sibling: https://github.com/zhaodice/proxmox-ve-anti-detection
Timing sibling: https://github.com/WCharacter/RDTSC-KVM-Handler
Claimed vs not
| Engine |
Patch-only |
Also needs host kernel RDTSC hook |
| ACE, EAC, Mhyprot, nProtect, Enigma, Shielden, Themida, VMProtect, VProtect |
usually |
no |
| Gepard Shield |
no |
yes |
| Roblox |
maybe + Hyper-V inside the guest |
— |
| Vanguard |
fail (“Incorrect function”) |
out of scope for this patch |
Unfixed WMI (these return “No instance(s) available” and leak VM):
Win32_Fan Win32_CacheMemory Win32_VoltageProbe
Win32_PerfFormattedData_Counters_ThermalZoneInformation
CIM_Memory CIM_Sensor CIM_NumericSensor
CIM_TemperatureSensor CIM_VoltageSensor
Workflow
Pick the QEMU series and keep distro QEMU installed. Patches: qemu-6.2.0, 7.0.0, 7.2.0, 8.0.2, 8.0.5, 8.1.0, 8.2.0, 10.2.2. Build lands in /usr/local/bin and must shadow, not replace, package QEMU.
- Done when
qemu-system-x86_64 --version from /usr/local/bin matches the patched tarball.
Apply and build.
git clone https://github.com/zhaodice/qemu-anti-detection.git
wget https://download.qemu.org/qemu-10.2.2.tar.xz
tar xvJf qemu-10.2.2.tar.xz
cd qemu-10.2.2
git apply ../qemu-anti-detection/qemu-10.2.2.patch
./configure
sudo make install -j$(nproc)
Arch deps: git wget base-devel glib2 ninja python. Ubuntu: git build-essential ninja-build python-venv libglib2.0-0 flex bison.
- Done when
git apply is clean and make install produces the new binary.
Rewrite the libvirt domain. Required shape is in references/libvirt-xml.md: smbios mode=host, kvm hidden, hypervisor CPU feature disabled, Hyper-V vendor_id GenuineIntel, -cpu host,...,hypervisor=off, unique UUID, ASUS-like type 0/1/2/3/4/17 SMBIOS.
- Done when
virsh dumpxml <name> shows hypervisor=off, kvm hidden, and no leftover QEMU / BOCHS / SeaBIOS strings.
Close timing if the target is Gepard or a TSC-delta AC. Install RDTSC-KVM-Handler on the host kernel. Re-measure CPUID vs FYL2XP1 and RDTSC around CPUID from the guest (hypervisor-detection).
- Done when guest
CPUID duration is not systematically ≥ FYL2XP1 across 5-run majority vote.
Run the guest detector suite. From the guest: hypervisor-detection probes, wmic bios / computer / baseboard / diskdrive get *, Device Manager names, UEFI VM bit, BGRT. Record every remaining QEMU / VirtIO / Red Hat string.
- Done when a written before/after table exists. Residual WMI sensor holes stay listed as known leaks.
Do not claim Vanguard or a custom HV is hidden. Vanguard is a documented fail. A Bluepill/hyper-reV/Valthrun stack is a different product.
- Done when the report names the engines actually retested and the holes that remain.
Pair with
hypervisor-detection — guest probes that this patch is scored against
stealth-hypervisor — hide a custom VMM, not QEMU device identity
hwid-identifier-surfaces — disk/NIC/SMBIOS serials the XML must not reuse
tpm-attestation-research — measured-boot / TPM PCR will still see the host
eac-ban-stack — EAC is more than SMBIOS strings
Verification
1---2name: qemu-anti-detection3description: Use when hiding a QEMU/KVM or Proxmox guest from anti-cheat or packer VM checks: apply zhaodice qemu-anti-detection patches, libvirt SMBIOS/CPU XML, RDTSC-KVM-Handler, and remaining WMI/timing holes. Not for hiding a custom type-2 HV (use stealth-hypervisor).4license: MIT5---67# QEMU / KVM anti-detection89zhaodice `qemu-anti-detection` (CR3Swapper fork) rewrites QEMU-reported identity so guest AC and packers stop matching “QEMU keyboard”, QEMU serials, the UEFI VM bit, and BGRT. It does **not** fix RDTSC/KVM timing. Custom type-2 HV hide is `stealth-hypervisor`. Guest-side probe construction is `hypervisor-detection`.1011Upstream: `https://github.com/zhaodice/qemu-anti-detection` 12PVE sibling: `https://github.com/zhaodice/proxmox-ve-anti-detection` 13Timing sibling: `https://github.com/WCharacter/RDTSC-KVM-Handler`1415## Claimed vs not1617| Engine | Patch-only | Also needs host kernel RDTSC hook |18|---|---|---|19| ACE, EAC, Mhyprot, nProtect, Enigma, Shielden, Themida, VMProtect, VProtect | usually | no |20| Gepard Shield | no | yes |21| Roblox | maybe + Hyper-V *inside* the guest | — |22| Vanguard | fail (“Incorrect function”) | out of scope for this patch |2324Unfixed WMI (these return “No instance(s) available” and leak VM):2526```27Win32_Fan Win32_CacheMemory Win32_VoltageProbe28Win32_PerfFormattedData_Counters_ThermalZoneInformation29CIM_Memory CIM_Sensor CIM_NumericSensor30CIM_TemperatureSensor CIM_VoltageSensor31```3233## Workflow34351. **Pick the QEMU series and keep distro QEMU installed.** Patches: `qemu-6.2.0`, `7.0.0`, `7.2.0`, `8.0.2`, `8.0.5`, `8.1.0`, `8.2.0`, `10.2.2`. Build lands in `/usr/local/bin` and must shadow, not replace, package QEMU.36 - Done when `qemu-system-x86_64 --version` from `/usr/local/bin` matches the patched tarball.37382. **Apply and build.**3940```bash41git clone https://github.com/zhaodice/qemu-anti-detection.git42wget https://download.qemu.org/qemu-10.2.2.tar.xz43tar xvJf qemu-10.2.2.tar.xz44cd qemu-10.2.245git apply ../qemu-anti-detection/qemu-10.2.2.patch46./configure47sudo make install -j$(nproc)48```4950Arch deps: `git wget base-devel glib2 ninja python`. Ubuntu: `git build-essential ninja-build python-venv libglib2.0-0 flex bison`.51 - Done when `git apply` is clean and `make install` produces the new binary.52533. **Rewrite the libvirt domain.** Required shape is in [references/libvirt-xml.md](references/libvirt-xml.md): `smbios mode=host`, `kvm hidden`, `hypervisor` CPU feature disabled, Hyper-V vendor_id `GenuineIntel`, `-cpu host,...,hypervisor=off`, unique UUID, ASUS-like type 0/1/2/3/4/17 SMBIOS.54 - Done when `virsh dumpxml <name>` shows `hypervisor=off`, `kvm hidden`, and no leftover `QEMU` / `BOCHS` / `SeaBIOS` strings.55564. **Close timing if the target is Gepard or a TSC-delta AC.** Install `RDTSC-KVM-Handler` on the *host* kernel. Re-measure `CPUID` vs `FYL2XP1` and `RDTSC` around `CPUID` from the guest (`hypervisor-detection`).57 - Done when guest `CPUID` duration is not systematically ≥ `FYL2XP1` across 5-run majority vote.58595. **Run the guest detector suite.** From the guest: `hypervisor-detection` probes, `wmic bios / computer / baseboard / diskdrive get *`, Device Manager names, UEFI VM bit, BGRT. Record every remaining `QEMU` / `VirtIO` / `Red Hat` string.60 - Done when a written before/after table exists. Residual WMI sensor holes stay listed as known leaks.61626. **Do not claim Vanguard or a custom HV is hidden.** Vanguard is a documented fail. A Bluepill/hyper-reV/Valthrun stack is a different product.63 - Done when the report names the engines actually retested and the holes that remain.6465## Pair with6667- `hypervisor-detection` — guest probes that this patch is scored against68- `stealth-hypervisor` — hide a *custom* VMM, not QEMU device identity69- `hwid-identifier-surfaces` — disk/NIC/SMBIOS serials the XML must not reuse70- `tpm-attestation-research` — measured-boot / TPM PCR will still see the host71- `eac-ban-stack` — EAC is more than SMBIOS strings7273## Verification7475- [ ] Patched QEMU version matches the applied `.patch` file76- [ ] Distro QEMU package still present77- [ ] Domain XML has unique UUID, `hypervisor=off`, `kvm hidden`, host SMBIOS78- [ ] Guest strings no longer contain QEMU/BOCHS/SeaBIOS in BIOS, disk, keyboard79- [ ] Detector suite recorded; WMI sensor holes explicit80- [ ] Gepard/TSC targets have host `RDTSC-KVM-Handler` or are marked unfixed81- [ ] Vanguard not listed as bypassed