PowerShell Scheduled Task Creation via ScriptBlock Logging

Identifies PowerShell script blocks that create and register scheduled tasks using TaskScheduler cmdlets or CIM WMI method calls.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2021-12-28
Updated
2026-07-31

ATT&CK techniques

Execution → Priv Esc
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Defense Evasion

  5. Cred Access

  6. Discovery

  7. Lateral Movement

  8. Collection

  9. C2

  10. Exfiltration

  11. Impact

What it detects

This rule identifies PowerShell script activity that constructs and registers Windows Scheduled Tasks by matching common cmdlets such as New-ScheduledTaskAction, New-ScheduledTaskTrigger, and Register-ScheduledTask. It also catches CIM-based scheduled task creation by looking for Invoke-CimMethod targeting PS_ScheduledTask in the TaskScheduler WMI namespace. These behaviors matter because scheduled tasks can enable recurring or initial execution of attacker-controlled code for persistence or execution staging. The detection relies on Script Block Logging telemetry containing the relevant command and parameter strings.

Related detections9 linkedT1053.005 — drag to rearrange
Suspicious Scheduled Task CacheTask Reconfigured to Run as SYSTEM
Malicious NodeSnake RAT Persistence via Scheduled Task and Node.js (via process_creation)
Malicious Scheduled Task Masquerading as Windows Defender Sync via schtasks (via process_creation)
Suspicious Scheduled Task Creation Launching mshta via schtasks (via process_creation)
Suspicious Service or Task Named windowsinspectionupdate (via process_creation)
Suspicious Scheduled Task Creation Referencing dllFake Batch Scripts (via process_creation)
Suspicious Scheduled Task Creation With WebDAV Loader Task Names (via process_creation)
Suspicious Scheduled Task Creation with ClickFix Update Recon Name (via process_creation)
Malicious Scheduled Task Named Gentlemen via Schtasks
PowerShell Scheduled Task Creation via ScriptBlock Logging
Pivot detection · T1053.005 · 9 related

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.