This rule identifies executable files containing compressed resources, a common obfuscation technique used by adversaries to hide malicious payloads or reduce file size while evading static analysis. Proactively hunting for these artifacts helps the SOC team uncover stealthy implants or trojans that may be leveraging resource compression to bypass initial detection layers within the Azure Sentinel environment.
rule EXECryptor239DLLcompressedresources
{
meta:
author="malware-lu"
strings:
$a0 = { 50 68 [4] 58 C1 C0 0F E9 [3] 00 87 04 24 58 89 45 FC E9 [3] FF FF 05 [4] E9 [3] 00 C1 C3 18 E9 [4] 8B 55 08 09 42 F8 E9 [3] FF 83 7D F0 01 0F 85 [4] E9 [3] 00 87 34 24 5E 8B 45 FC 33 D2 56 8B F2 E9 [3] 00 BA [4] E8 [3] 00 A3 [4] C3 E9 [3] 00 C3 83 C4 04 C3 E9 [3] FF 64 FF 35 00 00 00 00 64 89 25 00 00 00 00 E8 [3] 00 E9 [3] FF C1 C2 03 81 CA [4] 81 C2 [4] 03 C2 5A E9 [3] FF 81 E7 [4] 81 EF [4] 81 C7 [4] 89 07 E9 [4] 0F 89 [4] 87 14 24 5A 50 C1 C8 10 }
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: A developer or build engineer uses 7-Zip or WinRAR to compress a large .dll file (e.g., libcrypto.dll or a proprietary SDK component) for distribution or backup, resulting in a compressed archive that retains the .dll extension or is extracted in a way that the YARA rule misidentifies the compressed resource structure.
C:\Builds\, C:\Artifacts\) or exclude processes like 7z.exe, WinRAR.exe, or tar.exe when the file size is significantly larger than the threshold for typical compressed DLLs, or add an exclusion for file paths matching *\dist\*.dll and *\backup\*.dll.Scenario: An enterprise application using Qt or WPF frameworks stores its resources (icons, strings, layouts) in a compressed section within the DLL, which is a standard part of the build process. The YARA rule may trigger on the specific byte pattern of the compressed resource header in these legitimate, signed binaries.
Microsoft Corporation, Oracle Corporation, IBM Corporation) and are located in standard application installation directories (e.g., C:\Program Files\, C:\Program Files (x86)\).Scenario: A scheduled maintenance job runs NtBackup or Windows Server Backup to create a compressed backup of application binaries, including DLLs, to a network share. If the backup process temporarily writes compressed chunks to a local temp folder with a .dll extension or if the YARA rule scans intermediate backup files, it may trigger.