Making a Virtual Machine Look like Real Hardware to Malware
Running suspicious software in a virtual machine seems like a basic precaution to figure out whether said software contains naughty code. Unfortunately itâs generally rather easy to detect whether or not oneâs software runs inside a VM, with [bRootForce] going through a list of ways that a VirtualBox VM can be detected from inside the guest OS. While there are a range of obvious naming issues, such as the occurrence of the word âVirtualBoxâ everywhere, there many more subtle ways too.
Demonstrated is the PoC âmalwareâ application called Al-Khaser, which can be used to verify oneâs anti-malware systems, such as when trying to unleash a debugger on a piece of malware, run it inside a VM, along with many more uses. Among its anti-virtualization features are specific registry key names and values, file system artefacts, directory names, MAC addresses, virtual devices, etc.
In order to squeeze by those checks, [bRootForce] created the vbox_stealth shell script for Bash-blessed systems in order to use the VirtualBox Manager for the renaming of hardware identifier, along with the VBoxCloak projectâs PowerShell script thatâs used inside a Windows VirtualBox guest instance to rename registry keys, kill VirtualBox-specific processes, and delete VirtualBox-specific files.
Theoretically this should make it much harder for any malware to detect that itâs not running inside Windows on real hardware, but as always there are more subtle ways that are even harder to disguise.
youtube.com/embed/-On6bWFXuM8?âŚ
hackaday.com/2025/10/27/makingâŚ