This rule identifies the presence of UPX alternative stubs, which adversaries frequently use to compress and obfuscate malicious executables to evade signature-based detection. Proactively hunting for these artifacts in Azure Sentinel allows the SOC team to uncover hidden payloads that may have been deployed via fileless techniques or dropped onto endpoints, reducing the risk of undetected persistence or execution.
rule UPXAlternativestub
{
meta:
author="malware-lu"
strings:
$a0 = { 01 DB 07 8B 1E 83 EE FC 11 DB ED B8 01 00 00 00 01 DB 07 8B 1E 83 EE FC 11 DB 11 C0 01 DB 73 0B }
condition:
$a0 at pe.entry_point
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
upx --force or a patched version) to reduce binary size for deployment to memory-constrained edge devices or IoT gateways.
\\builds\artifacts\release\) or filter by file extension if the rule is overly broad, but preferably exclude known build server accounts (e.g., svc-ci-build) from the “User” context if the detection is user-based.C:\Program Files\VendorApp\bin\helper.exe) or add a hash-based exclusion for the specific known-good binary if the YARA rule matches the stub signature but the binary is whitelisted.System.IO.Compression library or a native compression library to create compressed executables for rapid deployment of patching agents, resulting in a binary that matches the “alternative stub” signature due to similar header structures.
svc-patch-mgmt) or filter by parent process if the detection logic includes process lineage (e.g., exclude if parent is powershell.exe or dotnet.exe in a known admin context).