A small set of functions for RE detection on x86_64 Linux
vmd_vmdetect()
detects virtual machines via descriptor table values,cpuid
, andrdtscp
vmd_hvdetect()
detects hypervisors viacpuid
vmd_dbgpresent()
detects debuggers via address layout andptrace
vmd_inchroot()
detects chroots viainode
vmd_hardwaresus()
detects virtual machines via uncommonly low-end hardwarevmd_incontainer()
detects containerization viagetpid
Run make
or simply include vmd.h
in your project. Define VMD_IMPLEMENTATION
somewhere in your program if you aren't using vmd from a library.
make test
strace: Debugger detected
ltrace: Debugger detected
qemu: VM detected
Hypervisor detected
Debugger detected
docker: Chroot detected
Container detected
gdb: Debugger detected
valgrind: VM detected
firejail: Debugger detected
Container detected
standalone: Nothing detected
command | result |
---|---|
lldb ./vmd |
Debugger detected |
ddd ./vmd |
Debugger detected |
./x64determiniser ./vmd |
VM detected Debugger detected |
edb --run ./vmd |
Debugger detected |
nemiver ./vmd |
Debugger detected |
radare2 -d ./vmd |
Debugger detected |
rr record -n ./vmd |
VM detected Hardware has suspicious configuration |
wine ./vmd.exe |
VM detected Debugger detected |