This rule detects the presence of the EncryptPE packer, a tool frequently used by adversaries to obfuscate malicious payloads and evade static analysis during initial access or execution phases. Proactively hunting for this signature in Azure Sentinel allows the SOC to identify potentially compromised hosts or suspicious artifacts before they can be unpacked and executed, reducing the window of opportunity for stealthy malware deployment.
rule EncryptPE_V22008618_WFS: PEiD
{
strings:
$a = { 68 ?? ?? ?? 00 E8 52 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6B 65 72 6E 65 6C 33 32 2E 64 6C 6C 00 47 65 74 54 65 6D 70 50 61 74 68 41 00 43 72 65 61 74 65 }
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.
C:\Projects\Builds\, C:\Artifacts\) or exclude processes originating from known compiler/build tools (e.g., msbuild.exe, dotnet.exe, cmake.exe) when writing the encrypted binary.C:\Program Files\ and C:\Program Files (x86)\ for specific approved vendor directories (e.g., C:\Program Files\LegacyApp\).Temp or AppData folder for temporary execution during a system update.
C:\Windows\Temp\ or %LOCALAPPDATA%\Temp\ if the parent process is a known scheduled task service (e.g., Taskeng.exe) or if the file name matches a specific pattern (e.g., *.tmp, *.upx).