Suspicious QEMU Execution on Windows
Detects the execution of QEMU with the -nographic flag and an image file on Windows systems, a technique used for persistence and initial access by installing a rogue Linux virtual machine.
This threat brief focuses on the suspicious execution of QEMU (Quick Emulator) on Windows systems. Attackers are leveraging QEMU, a legitimate open-source machine emulator and virtualizer, to establish persistence and potentially gain initial access. By executing QEMU with the -nographic flag along with an image file, the virtual machine operates in the background without a graphical display, making it less conspicuous to the user. This technique has been observed as a method to deploy rogue Linux virtual machines, which can then be used for various malicious activities. The securonix.com blog and bleepingcomputer.com news have reported on this technique being used in the wild.
Attack Chain
- Initial Access: An attacker gains initial access to a Windows system, potentially through social engineering or exploiting existing vulnerabilities.
- QEMU Installation (or Existing): The attacker either installs QEMU (if not already present) or leverages an existing installation.
- Image File Placement: A malicious Linux image file (
.img) is placed on the compromised system. - Persistence via Scheduled Task/Service: The attacker creates a scheduled task or Windows service to execute QEMU automatically upon system startup or at specific intervals.
- QEMU Execution: The scheduled task or service executes QEMU with the
-nographicflag and points to the malicious Linux image file. Example command:qemu-system-x86_64.exe -nographic -hda malicious.img. - Rogue VM Initialization: The Linux virtual machine boots in the background without any user interaction.
- Malicious Activity within VM: The rogue VM executes malicious scripts, downloads additional payloads, or establishes communication with a command-and-control (C2) server.
- Lateral Movement/Data Exfiltration: The attacker leverages the compromised VM as a staging point for lateral movement within the network or for exfiltrating sensitive data.
Impact
Successful exploitation allows attackers to establish persistent access to a compromised Windows system, potentially bypassing traditional security measures. The rogue Linux virtual machine provides a hidden environment for executing malicious activities, such as installing backdoors, conducting reconnaissance, or launching further attacks against the internal network. This can lead to data theft, system compromise, and significant disruption of business operations.
Recommendation
- Deploy the Sigma rule “Suspicious QEMU Execution” to detect QEMU processes running with the
-nographicflag and an image file (seerules). - Monitor process execution logs for command lines containing “qemu” and “-nographic” to identify potential rogue VM deployments.
- Investigate any scheduled tasks or services that launch QEMU with the
-nographicflag to determine their legitimacy. - Review and whitelist approved systems that legitimately run QEMU with the -nographic flag to reduce false positives as noted in the
known_false_positivessection. - Enable Sysmon Event ID 1 logging to capture process creation events, providing the data needed for the Sigma rules (see
data_source).
Detection coverage 2
Suspicious QEMU Execution
highDetects QEMU execution with -nographic flag and image file.
QEMU Process Description Match
mediumDetects QEMU execution based on process description.
Detection queries are kept inside the platform. Get full rules →