This detection targets adversaries attempting to obfuscate malicious payloads by executing Base64-encoded files directly within the %SystemRoot%\SysWOW64 or Sys32 directories to evade standard file path monitoring. Proactively hunting for this behavior in Azure Sentinel is critical because low-severity, legitimate-looking activity in system folders often masks early-stage lateral movement and living-off-the-land tactics that could escalate into significant compromises if left uninvestigated.
rule winxml_dll
{
meta:
author = "@patrickrolsen"
maltype = "Point of Sale (POS) Malware"
reference = "ce0296e2d77ec3bb112e270fc260f274"
version = "0.1"
description = "Testing the base64 encoded file in sys32"
date = "01/30/2014"
strings:
$s1 = "\\system32\\winxml.dll"
//$s2 = "cmd /c net start %s"
//$s3 = "=== pid:"
//$s4 = "GOTIT"
//$s5 = ".memdump"
//$s6 = "POSWDS"
condition:
uint16(0) == 0x5A4D and (all of ($s*))
}
This YARA rule can be deployed in the following contexts:
This rule contains 6 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the detection rule “Testing the base64 encoded file in sys32”, along with suggested filters or exclusions:
Microsoft Update Deployment via PowerShell
TrustedInstaller or wuauserv) frequently downloads and processes update manifests or scripts that are Base64-encoded before saving them to the %SystemRoot%\SysWOW64\SoftwareDistribution or directly into C:\Windows\System32. This often occurs during scheduled maintenance windows when the system applies cumulative updates.TrustedInstaller.exe, Microsoft.Windows.Update.Agent.exe, or wuauserv with a user context of NT AUTHORITY\SYSTEM.Antivirus Real-Time Script Scanning
System32 directory for analysis before moving them to their own quarantine folders. This is a standard part of the real-time scanning engine’s initialization or periodic rule refresh.\Program Files\CrowdStrike\, \Program Files\Windows Defender\) and specifically targeting file extensions like .json, .xml, or .dat that are being written to System32.Scheduled Group Policy Preference Execution
gpupdate command runs on a scheduled task (e.g., every