This hypothesis targets the presence of UPX-packed executables, a common obfuscation technique used by adversaries to compress malware payloads and evade signature-based detection. Proactively hunting for these artifacts in Azure Sentinel allows the SOC to identify potentially compromised endpoints or suspicious binaries that may be hiding malicious code within standard compression headers.
rule UPX_v30_EXE_LZMA_Markus_Oberhumer_Laszlo_Molnar_John_Reiser_additional: PEiD
{
strings:
$a = { 60 BE ?? ?? ?? ?? 8D BE ?? ?? ?? FF 57 89 E5 8D 9C 24 80 C1 FF FF 31 C0 50 39 DC 75 FB 46 46 53 68 ?? ?? ?? 00 57 83 C3 04 53 68 ?? ?? ?? 00 56 }
condition:
$a at pe.entry_point
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
C:\Program Files\, C:\Program Files (x86)\) and specifically whitelist known vendor installers (e.g., msiexec.exe spawning child processes in C:\Windows\Installer\ or specific app folders).C:\builds\, C:\artifacts\, C:\temp\, C:\Users\<user>\AppData\Local\Temp\) and restrict detection to non-development user accounts or exclude processes spawned by known build agents (e.g., jenkins-agent.exe, gitlab-runner.exe).nmap.exe or tcpdump.exe in some distributions) may be distributed with UPX compression. These are often run by IT admins or service accounts for maintenance tasks.