This YARA rule targets the UpackV036Dwing artifact, which is commonly associated with the execution of packed or obfuscated payloads that adversaries use to hide malicious code from static analysis. Proactively hunting for this signature in Azure Sentinel allows the SOC team to identify potentially stealthy initial access or post-compromise activities before they escalate into more complex lateral movement or data exfiltration events.
rule UpackV036Dwing
{
meta:
author="malware-lu"
strings:
$a0 = { 0B 01 [14] 18 10 00 00 10 00 00 00 [8] 00 10 00 00 00 02 00 00 [12] 00 00 00 00 [32] 00 00 00 00 0A 00 00 00 00 00 00 00 00 00 00 00 [4] 14 00 00 00 [64] 47 65 74 50 72 6F 63 41 64 64 72 65 73 73 00 FF 76 08 FF 76 0C BE 1C 01 }
$a1 = { BE [4] FF 36 E9 C3 00 00 00 }
condition:
$a0 at pe.entry_point or $a1 at pe.entry_point
}
This YARA rule can be deployed in the following contexts:
This rule contains 2 string patterns in its detection logic.
Scenario: A developer or DevOps engineer runs a custom Python script or PowerShell wrapper to decompress a large .tar.gz or .zip archive containing application binaries or logs. The YARA rule likely matches generic unpacking library signatures (e.g., zlib, minizip, or specific upack routines) embedded in the interpreter or helper tool.
python.exe, python3.exe, pwsh.exe, or powershell.exe and the command line contains arguments like extract, unzip, tar, or decompress. Alternatively, whitelist known interpreter paths such as C:\Python311\python.exe or C:\Program Files\PowerShell\7\pwsh.exe.Scenario: An IT administrator uses a third-party utility like 7-Zip (7z.exe) or WinRAR (WinRAR.exe) to extract firmware images, driver packages, or backup archives on a jump host or management server. The YARA rule may trigger on the specific unpacking algorithm signatures within these tools.
7z.exe, 7zG.exe, WinRAR.exe, WinRAR.exe, and unrar.exe. Ensure the exclusion applies to the process path, e.g., C:\Program Files\7-Zip\7z.exe or C:\Program Files\WinRAR\WinRAR.exe.Scenario: A scheduled maintenance job (e.g., via Task Scheduler or Cron on Linux) runs a script that unpacks configuration files or database dumps before applying updates. The unpacking process is initiated by cmd.exe or bash/sh calling a native binary.