This YARA rule targets specific memory patterns or code structures associated with the PGMPACKv013 packer, indicating the presence of packed executables that may be used to obscure malicious payloads or legitimate software in memory. Proactively hunting for these signatures in Azure Sentinel helps identify potentially obfuscated processes that could evade traditional static analysis, allowing the SOC to detect early-stage fileless or packed malware activity before it executes further malicious actions.
rule PGMPACKv013
{
meta:
author="malware-lu"
strings:
$a0 = { FA 1E 17 50 B4 30 CD 21 3C 02 73 ?? B4 4C CD 21 FC BE [2] BF [2] E8 [2] E8 [2] BB [2] BA [2] 8A C3 8B F3 }
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: A developer or DevOps engineer manually compiles a C/C++ application using the pgmpack utility (or a similar packing tool like UPX) to reduce binary size for deployment to a constrained environment (e.g., IoT devices or embedded systems). The resulting packed executable is copied to a shared network drive or application server, triggering the YARA signature.
C:\Builds\, D:\Artifacts\, or /opt/builds/) and exclude files owned by known developer service accounts or groups (e.g., dev-team, ci-cd-service).Scenario: An automated CI/CD pipeline (e.g., Jenkins, GitLab CI, or Azure DevOps) runs a post-build step that packs executables using pgmpack or a wrapper script before pushing artifacts to a repository. The packed binaries reside in temporary build workspaces or artifact storage locations on the build agent.
C:\Jenkins\workspace\, /var/lib/jenkins/, or C:\GitLab\runner\builds\) and exclude files modified within the last 24 hours in these specific directories to account for active build cycles.Scenario: A legacy application or internal tool uses pgmpack as part of its self-update or installation routine, creating packed temporary files in the user’s %TEMP% or %APPDATA% directories during the update process. These files may persist briefly or be left behind if the cleanup step fails.
C:\Users\<User>\AppData\Local\Temp\, `