This hypothesis posits that adversaries are deploying the QRat remote access trojan to establish persistent command-and-control channels within Azure Sentinel-connected endpoints. Proactive hunting is essential because, despite its low severity classification, QRat’s ability to silently exfiltrate data and execute remote commands can lead to significant lateral movement if not identified before it escalates into a broader compromise.
rule QRat : RAT
{
meta:
author = "Kevin Breen @KevTheHermit"
date = "2015/08"
ref = "http://malwareconfig.com"
maltype = "Remote Access Trojan"
filetype = "jar"
strings:
$a0 = "e-data"
$a1 = "quaverse/crypter"
$a2 = "Qrypt.class"
$a3 = "Jarizer.class"
$a4 = "URLConnection.class"
condition:
4 of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 5 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the QRat detection rule in an enterprise environment, including suggested filters and exclusions:
Endpoint Management Agent Updates
ccmexec.exe or ivtagent.exe frequently downloads and executes temporary installer binaries in the %TEMP% directory that match QRat’s file structure signatures.ccmexec.exe, IvAntiMalwareService.exe) when they spawn child processes with paths containing \Microsoft\CCM\Cache\ or \Program Files\Ivanti\. Additionally, exclude files with a valid Code Signing Certificate from the vendor (e.g., Microsoft Corporation) regardless of the YARA match.Scheduled Software Deployment Jobs
msiexec.exe or wusa.exe to install patches, which may unpack compressed archives containing executables that trigger the QRat YARA rule due to shared compression algorithms or header structures.TaskSchedulerService (or svchost.exe with the Schedule service) and the command line arguments contain known deployment flags like /qn, /quiet, or specific internal MSI product codes. Exclude events occurring during defined maintenance windows (e.g., 02:00–04:00 UTC).Antivirus Real-Time Scanning and Quarantine