This rule detects the presence of PECompact v1.25, a legacy executable compressor often used by adversaries to obfuscate malicious payloads and evade static analysis. Proactively hunting for this specific version allows the SOC to identify dormant or low-fidelity threats that may have slipped past modern detection layers due to their outdated compression algorithm.
rule PECompactv125
{
meta:
author="malware-lu"
strings:
$a0 = { EB 06 68 [4] C3 9C 60 E8 02 [3] 33 C0 8B C4 83 C0 04 93 8B E3 8B 5B FC 81 EB 0F 70 40 ?? 87 DD 8B 85 A6 70 40 ?? 01 85 03 70 40 ?? 66 C7 85 70 40 90 ?? 90 01 85 9E 70 40 BB ?? F3 0D }
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.
Legacy Application Deployment via Group Policy
C:\Program Files\SAP\FrontEnd\, C:\Program Files\Oracle\) or whitelist the specific executable name (e.g., sapgui.exe, oci.dll) if the version is known to be legitimate.Scheduled Backup or Maintenance Job
db_backup.exe or log_rotator.exe) that was packed with PECompact to optimize storage on older servers. The job executes every night at 02:00 AM, triggering the YARA rule on the server hosting the database.Task Scheduler service (svchost.exe with specific arguments) or whitelist the specific executable path (e.g., C:\Scripts\Maintenance\db_backup.exe) if the file hash matches a known good baseline.Third-Party Monitoring Agent