This rule identifies executable files exhibiting characteristics of PE encryption, a technique adversaries often employ to obfuscate malicious payloads and evade static analysis. Proactively hunting for these encrypted binaries in Azure Sentinel allows the SOC to uncover hidden threats that may have bypassed initial perimeter defenses or signature-based detections.
rule EncryptPE1200331812003518WFS
{
meta:
author="malware-lu"
strings:
$a0 = { 60 9C 64 FF 35 00 00 00 00 E8 79 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [8] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [36] 00 00 00 00 6B 65 72 6E 65 6C 33 32 2E 64 6C 6C 00 00 00 47 65 74 53 79 73 74 65 6D 44 69 72 65 63 74 6F 72 79 41 00 00 00 43 72 65 61 74 65 46 69 6C 65 41 00 00 00 43 72 65 61 74 65 46 69 6C 65 4D 61 70 70 69 6E 67 41 00 00 00 4D 61 70 56 69 65 77 4F 66 46 69 6C 65 00 00 00 55 6E 6D 61 70 56 69 65 77 4F 66 46 69 6C 65 00 00 00 43 6C 6F 73 65 48 61 6E 64 6C 65 00 00 00 4C 6F 61 64 4C 69 62 72 61 72 79 41 00 00 00 47 65 74 50 72 6F 63 41 64 64 72 65 73 73 00 00 00 45 78 69 74 50 72 6F 63 65 73 73 }
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: Execution of the 7-Zip File Manager (7zFM.exe) or WinRAR (WinRAR.exe) during a routine backup or archive creation task by an IT operations staff member. These applications often contain embedded PE encryption headers or use specific compression algorithms that may match the EncryptPE signature if the YARA rule targets generic PE encryption structures rather than specific malware families.
7zFM.exe, WinRAR.exe, or explorer.exe (if launched from Explorer) and the file path matches C:\Program Files\7-Zip\ or C:\Program Files\WinRAR\.Scenario: Execution of VMware Workstation or VirtualBox when launching a virtual machine image. The hypervisor may load encrypted PE modules or use memory encryption features that trigger the rule, especially if the VM image contains encrypted disk sections or if the guest OS is running an encrypted application.
vmware-vmx.exe, VBoxHeadless.exe, or VBoxSDL.exe and the file path contains vmware or virtualbox in the directory structure.Scenario: Execution of Adobe Acrobat Reader or Foxit Reader when opening a PDF file that contains embedded encrypted Java applets or uses specific encryption standards for digital signatures. Some YARA rules targeting EncryptPE may inadvertently match the PE structure of embedded plugins or helper executables within the reader’s installation directory.
AcroRd32.exe, AcroCEF.exe, or FoxitPDFReader.exe and the file path matches C:\Program Files\Adobe\ or `C:\