This YARA rule identifies the RECSmall v101 packer, a tool frequently used by threat actors to compress executables and obscure their entry points to evade static analysis. Proactively hunting for this signature in Azure Sentinel allows the SOC to detect potentially packed malware or trojans that may be leveraging this specific packing technique to hide malicious payloads within the environment.
rule RECSmall_v101_Hint_DOS_EP: PEiD
{
strings:
$a = { 8C D8 1E E8 ?? ?? 5D 83 ?? ?? 81 ?? ?? ?? B9 ?? ?? 40 8E D8 2B DB B2 55 }
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.
Legacy Utility Execution via Scheduled Task
Sysinternals tools like PsExec or older versions of WinRAR/7-Zip console binaries) that has a DOS header hint and a small entry point. This is often executed via a Windows Scheduled Task for maintenance windows (e.g., disk cleanup or log rotation).schtasks.exe or Task Scheduler service, and the executable path resides in standard administrative directories (e.g., C:\Program Files\Tools\, C:\Admin\Utils\).Development Environment Build Artifacts
py2exe/cx_Freeze that results in a small executable with a DOS stub. These binaries are frequently executed during local testing or automated build verification steps on developer workstations.C:\Users\<user>\Projects\, C:\dev\, C:\ci\builds\) or where the parent process is a known IDE/build tool (e.g., cmd.exe launched by Visual Studio Code, Jenkins agent, or Git Bash).Antivirus/EDR Self-Test or Quarantine Extraction