Detection rules › Sigma

Scheduled Task Creation with Curl and PowerShell Execution Combo

Severity
medium
Author
Swachchhanda Shrawan Poudel (Nextron Systems)
Source
upstream

Detects the creation of a scheduled task using schtasks.exe, potentially in combination with curl for downloading payloads and PowerShell for executing them. This facilitates executing malicious payloads or connecting with C&C server persistently without dropping the malware sample on the host.

MITRE ATT&CK coverage

TacticTechniques
ExecutionT1053.005 Scheduled Task/Job: Scheduled Task
PersistenceT1053.005 Scheduled Task/Job: Scheduled Task
Privilege EscalationT1053.005 Scheduled Task/Job: Scheduled Task
Defense EvasionT1218 System Binary Proxy Execution
Command & ControlT1105 Ingress Tool Transfer

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation
Security-Auditing4688A new process has been created.

Stages and Predicates

Stage 1: all of selection_img

CommandLine|contains: ' /create '
Image|endswith: '\schtasks.exe'

Stage 2: all of selection_curl

CommandLine|contains: -o
CommandLine|contains: 'curl '
CommandLine|contains: http

Stage 3: all of selection_powershell

CommandLine|contains: powershell

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • /create corpus 14 (sigma 14)
  • -o corpus 2 (sigma 2)
  • curl corpus 8 (sigma 8)
  • http corpus 31 (sigma 31)
  • powershell corpus 16 (sigma 16)
Imageends_with
  • \schtasks.exe corpus 45 (sigma 45)

Neighbors

Stricter alternatives (narrower than this rule)

The rules below may be useful if you find the current rule is too noisy / lacks specificity.