
Summary
Detects a three-stage PowerShell-based encoded-script delivery: (1) a download command writes an encoded payload to disk, (2) a certutil decode sequence names the decoded script (a .ps1) and writes it, and (3) a later hidden PowerShell execution runs the decoded script. The rule correlates Cisco Secure Endpoint Behavioral Protection Threat Detection alerts across endpoints by endpoint, parent process, exact paths, and event order to establish a staged payload chain. It extracts the encoded_input (the payload written by WriteAllText) and the decoded_output (the resulting .ps1) via regex on PowerShell commands, normalizes paths to lowercase, and derives the decode input/output. It validates that the decoded file is later executed within a short window and that the executed file matches the decoded output, indicating a successful decode-and-run step. The detection acknowledges Protect-mode behavior where a prior stage may be killed or quarantined, so a decode-run sequence may be incomplete; confirmation of the file’s existence and the response status is recommended before concluding completion. This analytic supports threat-correlation across endpoints and provides artifacts such as encoded_file, decoded_file, and execution_command, with timing context to assess progression of the staged payload.
Categories
- Endpoint
- Windows
Data Sources
- Process
- Script
- File
ATT&CK Techniques
- T1105
- T1140
- T1059
- T1059.001
Created: 2026-11-30