This YARA rule identifies executable files that have been packed or protected by the EXELOCK 666 variant, a technique often used by adversaries to obscure the entry point and hinder static analysis of malicious payloads. Proactively hunting for these signatures in Azure Sentinel allows the SOC team to detect potentially obfuscated binaries early, reducing the risk of undetected malware execution or persistence mechanisms within the environment.
rule EXELOCK_666_15_Hint_DOS_EP: PEiD
{
strings:
$a = { BA ?? ?? BF ?? ?? EB ?? EA ?? ?? ?? ?? 79 ?? 7F ?? 7E ?? 1C ?? 48 78 ?? E3 ?? 45 14 ?? 5A E9 }
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.
wine wrappers, ntos16.exe, or old MFC-based tools like Notepad++ 32-bit builds) that retain a DOS MZ header for backward compatibility.
Image path contains \SysWOW64\ or \Windows\Sysnative\, or specifically exclude known legacy application binaries such as wine.exe, ntos16.exe, and wow64cpu.dll host processes.gcc, g++, clang, or msbuild.exe) that generate or execute hybrid binaries with DOS stubs for Windows compatibility.
C:\Program Files (x86)\Microsoft Visual Studio\, C:\msys64\, C:\cygwin64\) or match against specific executable names like cc1.exe, gcc.exe, and msbuild.exe.VeeamBackup.exe, CommCell.exe, or AcronisBackup.exe) that use 32-bit helper executables to interact with legacy file systems or drivers.
CommandLine contains keywords like backup, restore, snapshot, or maintenance, and the Image path resides in vendor-specific directories (e.g., C:\Program Files (x86)\Veeam\, C:\Program Files (x86)\Commvault\).