This rule identifies executable files packed with specific versions of the EXEpacker, a technique adversaries often use to compress or obfuscate malware payloads to evade static analysis. Proactively hunting for these packed binaries in Azure Sentinel helps detect stealthy initial access or persistence mechanisms that may bypass standard signature-based detections.
rule EXEPACKv405v406
{
meta:
author="malware-lu"
strings:
$a0 = { 8C C0 05 [2] 0E 1F A3 [2] 03 06 [2] 8E C0 8B 0E [2] 8B F9 4F 8B F7 FD F3 A4 }
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.
Scenario: Deployment of legacy .NET applications or internal tools compiled with older versions of the .NET Framework (e.g., 2.0, 3.5, or 4.x) that utilize specific packing algorithms or obfuscation techniques compatible with the EXEPACK v405/v406 signatures. This often occurs when IT departments deploy custom line-of-business (LOB) software or older enterprise applications that have not been recently recompiled.
C:\Program Files\InternalTools\, C:\Program Files (x86)\LegacyApps\) or exclude specific known-good hashes (SHA256) of these internal binaries. Additionally, consider whitelisting executables signed by the internal code-signing certificate if the signature is consistent.Scenario: Execution of standard Windows administrative utilities or third-party system maintenance tools (e.g., msconfig.exe, regedit.exe, or specific vendor tools like Symantec Endpoint Protection agents, McAfee Framework, or Dell Command | Update) that may contain packed sections due to their build process or integration with older libraries. These tools are frequently run by administrators during patching cycles, disk cleanup, or system diagnostics.
C:\Windows\System32\ directory (for native Windows tools) or specific vendor directories (e.g., C:\Program Files\McAfee\, C:\Program Files\Symantec\). You can also filter based on the parent process if the tool is launched by a known service host (e.g., svchost.exe or services.exe).Scenario: Scheduled tasks or service startups that launch older versions of Java Runtime Environment (JRE) or Oracle WebLogic Server components, which sometimes use packing or obfusc