
Summary
This Splunk/Security Content analytic detects a two-stage Windows persistence/execution chain by correlating Cisco Secure Endpoint Behavioral Protection alerts. The detector looks for a scheduled-task creation that references a remote URL hosting an MSHTA payload, followed by a separate MSHTA launch that uses the same URL on the same endpoint. It relies on Cisco Secure Endpoint Behavioral Protection Threat Detection as the data source and uses macros to extract common fields (endpoint, user, sig_id) and the process command lines involved in the BP events. The search extracts the remote URL via a regex from the initiating task command line, normalizes to lowercase, and computes a precise event_time from the event timestamp components. It requires non-null endpoint GUID, non-null remote URL, and a valid event_time. The query sorts and then uses streamstats to capture the first task_time (the scheduled task creation) and its associated task_command per endpoint/remote_url, then filters for a subsequent execution where stage="execution" and event_time is within 5 minutes (<= 300 seconds) of the task_time. If matched, it emits a finding with: destination host (dest), user, endpoint_guid, remote_url, task_command, execution_command, and time bounds firstTime/lastTime. The rule also includes time formatting macros for readable times and a post-filter macro to minimize false positives. Drilled-down context is provided via three additional searches (BP activity, Cloud IOC activity, and risk events). The finding maps to MITRE ATT&CK techniques T1053.005 (Scheduled Task) and T1218.005 (Mshta). The rule notes that in Protect mode BP can kill or quarantine an earlier stage; validation should confirm task identity, process lineage, and prevention actions by inspecting bp_data.audit and bp_data.details.actions. References include Cisco documentation and MITRE technique pages. This rule targets endpoint telemetry, specifically Windows, and is applicable to Splunk Enterprise, Splunk ES, and Splunk Cloud ecosystems.
Categories
- Endpoint
- Windows
Data Sources
- Cloud Service
- Windows Registry
- Process
- File
- Network Traffic
- Application Log
- Logon Session
- Command
- Process
- Module
ATT&CK Techniques
- T1053
- T1218
- T1053.005
- T1218.005
Created: 2026-11-30