Scheduled Task/Job: Scheduled Task T1053.005

Tactics: Execution, Persistence, Privilege Escalation

Adversaries may abuse the Windows Task Scheduler to perform task scheduling for initial or recurring execution of malicious code. There are multiple ways to access the Task Scheduler in Windows. The schtasks utility can be run directly on the command line, or the Task Scheduler can be opened through the GUI within the Administrator Tools section of the Control Panel. In some cases, adversaries have used a .NET wrapper for the Windows Task Scheduler, and alternatively, adversaries have used the Windows netapi32 library and Windows Management Instrumentation (WMI) to create a scheduled task. Adversaries may also utilize the Powershell Cmdlet `Invoke-CimMethod`, which leverages WMI class `PS_ScheduledTask` to create a scheduled task via an XML path.

Events covered

25 catalog events are tagged with this technique by at least one rule.

ProviderEventTitle
SysmonEvent ID 1Process creation
SysmonEvent ID 3Network connection
SysmonEvent ID 7Image loaded
SysmonEvent ID 11FileCreate
SysmonEvent ID 12RegistryEvent (Object create and delete)
SysmonEvent ID 13RegistryEvent (Value Set)
SysmonEvent ID 14RegistryEvent (Key and Value Rename)
Security-AuditingEvent ID 4656A handle to an object was requested.
Security-AuditingEvent ID 4688A new process has been created.
Security-AuditingEvent ID 4698A scheduled task was created.
Security-AuditingEvent ID 4699A scheduled task was deleted.
Security-AuditingEvent ID 4700A scheduled task was enabled.
Security-AuditingEvent ID 4701A scheduled task was disabled.
Security-AuditingEvent ID 4702A scheduled task was updated.
Security-AuditingEvent ID 4799A security-enabled local group membership was enumerated.
Security-AuditingEvent ID 5136A directory service object was modified.
Security-AuditingEvent ID 5145A network share object was checked to see whether client can be granted desired access.
Defender-DeviceProcessEventsanyProcess activity (any)
Defender-DeviceProcessEventsProcessCreatedProcess created
PowerShellEvent ID 4103Payload Context: ContextInfo User Data: UserData.
PowerShellEvent ID 4104Creating Scriptblock text (MessageNumber of MessageTotal).
TaskSchedulerEvent ID 129Task Scheduler launch task "Name" , instance "TaskName" with process ID Path.
TaskSchedulerEvent ID 200Task Scheduler launched action "TaskName" in instance "ActionName" of task "Name".
TaskSchedulerEvent ID 201Task Scheduler successfully completed task "Name" , instance "TaskInstanceId" , action "TaskName" .
Service-Control-ManagerEvent ID 7045A service was installed in the system.

Authoring guide

Patterns shared across the 118 rules above: which fields they filter on, what specific values they look for, and what they exclude. The catalog normalizes field names across vendors so Sigma's Image, Elastic's process.name, and Splunk's process_name collapse into one row. Each rule contributes at most once per row.

Fields filtered most (63 distinct)

The fields most rules look at when detecting this technique. The How column shows the operators authors use (eq, wildcard, regex_match, match) and how often each appears. Sample values are concrete examples to start from, not an exhaustive list.

FieldRulesHowSample values
CommandLine52contains 42, match 4, in 3, regex_match 3, ends_with 1, eq 1, is_not_null 1 /create , /create, /create , /change , create
Image34ends_with 31, contains 3, eq 3, is_not_null 1, starts_with 1\schtasks.exe, \cmd.exe, .exe, :\temp\, :\users\public\
EventID21eq 18, in 34698, 4104, 4688, 4700, 4702
OriginalFileName20eq 19, in 1schtasks.exe, cmd.exe, control.exe, cscript.exe, mshta.exe
process_name19eq 17, in 3schtasks.exe, powershell.exe, cmd.exe, at.exe, bash.exe
EventType10eq 6, starts_with 3, ne 1Image loaded, scheduled-task-created, ProcessCreated, creation, deleted
event.type10eq 8, ne 2start, change, deletion
parent_process_name9eq 9, in 1svchost.exe, CompatTelRunner.exe, ScreenConnect.ClientService.exe, ScreenConnect.WindowsBackstageShell.exe, ScreenConnect.WindowsClient.exe
ParentCommandLine8contains 6, ends_with 1, eq 1, regex_match 1, starts_with 1-executionpolicy bypass -windowstyle hidden -e jab, -k, -k netsvcs, -p, -s
ParentImage8ends_with 4, contains 2, eq 2\powershell.exe, :\program files (x86)\zemana\antimalware\antimalware.exe, :\program files\axis communications\axis camera..., :\program files\axis communications\axis device..., :\temp\
TargetObject8contains 3, wildcard 3, ends_with 2, eq 1*\software\microsoft\windows..., \command, \microsoft\windows nt\currentversion\schedule\taskcache\tasks\, \microsoft\windows..., \microsoft\windows nt\currentversion\schedule\taskcache\tree\
Channel7eq 7, in 7
eventtype7eq 7
TaskName6eq 3, contains 2, ends_with 1, match 1SC Scheduled Scan, UpdatMachine, \Microsoft\Windows\RemovalTools\MRT_ERROR_HB, \SynchronizeTimeZone, \Windows TeamCity Settings User Interface
event.category6eq 6process, library, driver, file, iam

Top indicator values (1134 distinct)

Specific (field, operator, value) combinations the rules check for, ranked by how many rules under this technique use each one. The Corpus reach column counts how many rules across the entire catalog (any technique) check the same combination. High numbers point to widely-used indicators that are likely noisy on their own; combine them with another condition for useful signal. Blank means the combination is specific to rules under this technique. Click a value to expand the rules under this technique that use it.

FieldKindValueRules (here)Corpus reach
Imageends_with
\schtasks.exe
2656
OriginalFileNameeq
schtasks.exe
1823
process_nameeq
schtasks.exe
1021
process_nameeq
powershell.exe
4104
CommandLinecontains
/create
915
CommandLinecontains
/create
99
CommandLinecontains
/create
55
CommandLinecontains
create
424
CommandLinecontains
nt aut
43
CommandLinecontains
powershell
425
CommandLinecontains
wscript
416
CommandLinecontains
/change
33
CommandLinecontains
%appdata%
313
CommandLinecontains
cmd.exe /c
36
CommandLinecontains
cmd.exe /k
35
CommandLinecontains
cmd.exe /r
35
CommandLinecontains
cscript
315
CommandLinecontains
frombase64string
312
CommandLinecontains
schtasks
36
EventIDeq
4698
714
EventIDeq
4104
3268
EventIDeq
4688
3313
event.typeeq
start
6606
AccessListcontains
%%4417
411
event.categoryeq
process
4128
event.categoryeq
library
313
parent_process_nameeq
svchost.exe
413
EventTypeeq
scheduled-task-created
33
EventTypestarts_with
Image loaded
310
dll.nameeq
taskschd.dll
34

Exclusions (168 distinct)

Field/operator/value combinations excluded by rules under this technique (top-level not() clauses), sorted by how many rules exclude each. These are the false-positive paths the community has learned to filter out. A new rule that ignores the high-count entries here will likely fire on the same noisy paths. Click a value to expand the rules under this technique that exclude it.

FieldKindValueRules excluding
Imageends_with
\schtasks.exe
3
userends_with
$
3
CommandLinecontains
/tn tvinstallrestore
2
CommandLinecontains
update_task.xml
2
CommandLinecontains
-m:
1
CommandLinecontains
system
1
CommandLinecontains
.tmp\maintenancetask.xml
1
CommandLinecontains
.tmp\systrayautostart.xml
1
CommandLinecontains
.tmp\updatefallbacktask.xml
1
CommandLinecontains
.tmp\watchdogservicecontrolmanagertimeout.xml
1
CommandLinecontains
.xml
1
CommandLinecontains
/create /f /ru system /sc weekly /tn avirasystemspeedupverify /tr
1
CommandLinecontains
/create /f /tn
1
IntegrityLeveleq
System
2
process_nameeq
powershell.exe
2

Rules under this technique

Every rule in the catalog tagged with this technique, grouped by vendor. Click a rule title for its full predicates, exclusions, and indicators.

Platform (all)
Domain (all)

Sigma 58 rules

Elastic 19 rules

Splunk 35 rules

Kusto 4 rules

YARA-L 1 rule

Panther 1 rule