the problem
a lot of vm detection code is still written like the target is windows 7 in a basic virtualbox guest. check cpuid, look for a vendor string, maybe scan for vmware tools, and call it a day.
the biggest issue is Microsoft Hv. on a real bare-metal windows machine, the hypervisor-present bit can still be exposed when features like vbs, hvci, wsl2, credential guard, windows sandbox, or the hyper-v platform are enabled. a cpuid-only detector sees a hypervisor and immediately calls the system a vm, even when its just a normal pc running windows security features.
quickfish started from that problem: how do you collect useful vm and hypervisor signals without turning every hardened windows install into a false positive?
research goal
the goal was not to make a perfect vm oracle. that does not exist. the goal was to build a signal collector that separates weak, ambiguous signals from stronger, corroborated evidence.
that means Microsoft Hv by itself is not enough. a missing tpm is not enough. a timing anomaly is not enough. but a hypervisor vendor plus firmware, device, registry, pci, or tool artifacts becomes much harder to explain away as normal bare metal.
architecture
quickfish is split into three parts. the split matters because the first draft had overlap between the environment checks and cpu-level checks, which caused the same evidence to be counted twice.
- nofish.h handles the environment layer: firmware, bios, acpi, dmi, pci, tpm, registry, file, gpu, audio, and install-age checks.
- Quicksand.h handles the architectural layer: cpuid hypervisor vendor detection, cpuid trap-timing ratio checks, and the optional vmware backdoor probe.
- nofish_quicksand.h combines the two layers and normalizes the result into one score.
#define NOFISH_QUICKSAND_IMPLEMENTATION
#include "nofish_quicksand.h"
#include <iostream>
int main() {
auto result = NofishQuicksand::Detect();
std::cout << "is_vm: " << result.is_vm << "\n";
std::cout << "combined score: " << result.combinedScore << "\n";
std::cout << "confidence: " << result.confidence << "\n";
std::cout << "reasons: " << result.reasons << "\n";
if (result.is_vm == 2) {
std::cout << "VM confirmed\n";
} else if (result.is_vm == 1) {
std::cout << "VM likely\n";
} else {
std::cout << "No strong VM indicators found\n";
}
}
scoring and false positives
the most important tuning decision was handling hyper-v. non-microsoft hypervisor vendors are usually strong evidence. vmware, virtualbox, kvm, xen, and parallels are not normal bare-metal cpuid identities. hyper-v is different because microsoft uses the same architectural surface for both real guests and windows security features running on bare metal.
because of that, quickfish treats Microsoft Hv as a soft signal unless the environment layer finds corroborating evidence. the cpuid trap-timing check is also ignored for hyper-v bare-metal scoring unless other vm artifacts exist.
if (vendor == HVV::HyperV) {
// soft signal: VBS/HVCI/WSL2 can expose Microsoft Hv on bare metal
score += 5;
// timing anomalies alone do not confirm a Hyper-V guest
if (timing_anomaly && environment_score == 0)
keep_as_soft_signal();
} else if (vendor != HVV::None) {
// VMware, VirtualBox, KVM, Xen, Parallels, etc.
score += 30;
}
another false positive came from display devices. the first pass matched the word Virtual in gpu names, which caught things like Meta Virtual Monitor. that was too broad, so the match list was narrowed to specific vm display adapters instead of generic virtual display software.
tpm detection was also softened. a missing or inaccessible tpm can happen on real systems, so quickfish records it but does not score it as vm evidence by itself.
testing on real hardware
the first useful test was a real windows pc that exposed Microsoft Hv. the old aggressive scoring path flagged it as suspicious. after tuning, the same system correctly returned no strong vm indicators.
PS> .\quickfish_probe.exe
Build/platform
OS macro: Windows
Arch macro: x86
Compiler: MSVC 1944
quickfish result
is_vm: 0 (no_strong_indicators)
combined_score: 5
confidence: 5
environment_score: 0
architectural_score: 5
reasons: CPUID hypervisor vendor: hyperv (soft signal: Hyper-V/VBS can appear on bare metal)
nofish environment layer
is_vm: 0
confidence: 0
reasons: no indicators found
Quicksand architectural layer
vendor: hyperv
cpuid_vendor_present: true
cpuid_trap_ratio: 43.94
cpuid_trap_threshold: 75.00
cpuid_trap_ratio_anomaly: false
vmware_backdoor_confirmed: false
raw_arch_score: 30
this is the behavior i wanted: quickfish still reports the hyper-v architectural signal, but it does not pretend that signal alone proves the machine is a guest vm.
limitations
quickfish is a research preview, not a production security boundary. false positives and false negatives are expected. if a hypervisor tries hard enough to hide, client-side detection can be bypassed. if a real machine has enough weird drivers and platform features enabled, it can look suspicious.
the hardest case is still hyper-v guest vs windows bare metal with vbs. both can expose Microsoft Hv, so the decision has to come from corroborating environment evidence rather than cpuid alone.
- windows and linux x86/x64 are the main targets.
- linux arm64 is partial: environment checks can work, x86 cpuid/rdtsc checks become no-op.
- macos and bsd are not officially supported.
- results should be treated as telemetry, not authorization.
afterword
quickfish is small, but the research lesson is useful: vm detection is not just about finding a hypervisor. it is about context. modern systems blur the line between bare metal and virtualized execution, especially on windows where security features can intentionally route the system through hyper-v surfaces.
the project is being released as
v0.1.0-research.
the next useful work is expanding the test matrix across vmware workstation,
virtualbox, hyper-v guests, esxi, and qemu/kvm, then tuning the score based
on real results instead of assumptions.