Table of Contents

As Endpoint Detection and Response (EDR) solutions become increasingly sophisticated, red team operators must constantly evolve their tradecraft to remain stealthy and effective. One often overlooked yet highly potent approach is the strategic use of virtualization. By leveraging virtual machines (VMs), hypervisors, and sandboxed environments, red teams can simulate real-world attacks while minimizing the risk of detection and containment.

This article examines how virtualization often leveraged in offensive security can be identified, analyzed, and hunted from a defensive perspective. Adversaries may use virtual machines to isolate tooling and payloads, simulate realistic user environments, or evade behavioral analytics. For threat hunters and detection engineers, understanding these techniques is critical to uncovering stealthy activity, distinguishing benign virtualization from malicious use, and strengthening detection strategies across endpoints and networks.

What is QEMU

QEMU (Quick Emulator) is an open-source virtualization and emulation platform that allows for full system emulation of various hardware architectures. Unlike traditional Type 2 hypervisors like VirtualBox or VMware, QEMU provides low-level control over every aspect of the virtual environment from CPU type and memory layout to peripheral emulation and network interfaces. This flexibility makes it a powerful tool for red teamers looking to evade detection.

Personally, I have to recommend the following blog that explains how to install QEMU without being an administrator which makes the tool even more powerful.

When you download QEMU, you might notice it requires administrator credentials upon launching:

To bypass this:

  1. Right-click the downloaded QEMU installer, select 7zip, and choose Extract:

    2. After extraction, you’ll have a portable-like QEMU setup, providing all necessary source files:

Next, download Kali Linux’s “Live Boot” version:

Move the downloaded ISO file into your QEMU folder:

Execute the following commands to set up your environment:

				
					.\qemu-img create -f qcow2 testing-image.img 20G
				
			

Execute the following commands to set up your environment:

				
					.\qemu-system-x86_64 -m 2048 -boot d -smp 2 -net nic,model=virtio -net user -hda testing-image.img -cdrom kali-linux-2025.1c-live-amd64.iso
				
			

With these steps completed, you have QEMU set up without needing administrator privileges. Now, you can install necessary hacking tools for penetration testing or establish external connections through C2 implants or SSH tunnels.

Now that we know how attackers can install QEMU without administrator privileges, let’s see how to detect it.

QEMU detection rule

				
					DeviceProcessEvents
| where Timestamp > ago(30d)
// 1. Core Detection: Look for QEMU-like arguments regardless of binary name
| where ProcessCommandLine has_any ("-m ", "-net", "-nographic", "-display none") and ProcessCommandLine has ("-boot d")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine
| sort by Timestamp desc
				
			
This detection rule identifies potential QEMU virtual machines by analyzing process creation events over the last 30 days. It looks for processes with command-line arguments commonly used by QEMU, such as -m (memory), -net (network configuration), -nographic or -display none (no GUI), and -boot d (boot from CD/ISO), regardless of the executable’s name, which helps catch renamed or disguised binaries. The query extracts key fields like the timestamp, device name, user account, process filename, and full command line, and sorts the results by most recent activity, providing security teams with a clear view of potential VM launches for further investigation.

Discover more from Valhguard

Subscribe now to keep reading and get access to the full archive.

Continue reading