This rule detects the presence of PAKSFX archive files, which adversaries may use to stage or compress malicious payloads and tools for lateral movement or persistence. Proactively hunting for these archives in Azure Sentinel helps identify potential staging areas or hidden artifacts that could indicate an adversary is preparing for execution or data exfiltration.
rule PAKSFXArchive
{
meta:
author="malware-lu"
strings:
$a0 = { 55 8B EC 83 [2] A1 [2] 2E [3] 2E [5] 8C D7 8E C7 8D [2] BE [2] FC AC 3C 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.
Scenario: A developer or DevOps engineer uses the 7-Zip command-line interface (7z.exe) or a custom PowerShell script to package application build artifacts, configuration files, or log bundles into a .pak or .sfx archive for distribution to QA teams or staging environments.
.pak or .sfx located in specific build directories (e.g., C:\Builds\, D:\Artifacts\) or created by known build agents (e.g., AzureDevOpsAgent, JenkinsSlave). Additionally, exclude processes where the parent is 7z.exe, tar.exe, or powershell.exe and the file path matches *build* or *artifact*.Scenario: An IT administrator performs a scheduled maintenance task using a proprietary internal tool (e.g., InternalDeployer.exe) that generates self-extracting archives (.sfx) containing hotfixes or configuration updates, which are then pushed to endpoints via Group Policy or a configuration management system (e.g., SCCM, Ansible).
.sfx files created by known internal deployment tools (e.g., InternalDeployer.exe, SCCMClient.exe) or located in standard update directories (e.g., C:\Windows\Temp\Updates\, C:\ProgramData\SCCM\). Correlate with scheduled task names containing “Patch”, “Update”, or “Maintenance”.Scenario: A data analyst or ETL engineer uses a Python script with the py7zr or zipfile library to create compressed archives of large CSV or JSON datasets for transfer between on-premises servers and cloud storage, sometimes using a wrapper script that generates a self-extracting executable for ease of use by non-