Scheduled Task/Job T1053

Tactics: Execution, Persistence, Privilege Escalation

Adversaries may abuse task scheduling functionality to facilitate initial or recurring execution of malicious code. Utilities exist within all major operating systems to schedule programs or scripts to be executed at a specified date and time. A task can also be scheduled on a remote system, provided the proper authentication is met (ex: RPC and file and printer sharing in Windows environments). Scheduling a task on a remote system typically may require being a member of an admin or otherwise privileged group on the remote system.

Events covered

35 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-DeviceInfoanyDevice information
Defender-DeviceProcessEventsanyProcess activity
Defender-DeviceProcessEventsProcessCreatedProcess created
ESFexecProcess Execution
ESFwriteFile Write
Linux-AuditdEvent ID 1300SYSCALL
Linux-AuditdEvent ID 1302PATH
Linux-AuditdEvent ID 1307CWD
Linux-AuditdEvent ID 1327PROCTITLE
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" .
RPCFWEvent ID 3An RPC server function was called.
Service-Control-ManagerEvent ID 7045A service was installed in the system.
Sysmon-for-LinuxEvent ID 1Process Create
Sysmon-for-LinuxEvent ID 11File created

Authoring guide

These 226 rules share fields, values, and exclusions.

Fields filtered most (117 distinct)

These fields appear most often in rule filters.

FieldRulesHowSample values
CommandLine79contains 59, regex_match 10, in 8, wildcard 7, match 3, ends_with 1, is_not_null 1, length_compare 1 /create , -create , /Create, (?i)\-(L|R|N|D|C)|IdentitiesOnly=yes|StrictHostKeyChecking=no|ssh, * setsid *
Image52ends_with 38, contains 5, eq 5, wildcard 5, starts_with 4, is_not_null 2, in 1\schtasks.exe, , ./*, /boot/*, /dev/shm/*
process_basename49eq 33, in 17, starts_with 3, is_not_null 2schtasks.exe, bash, csh, dash, cmd.exe
EventType45eq 29, in 9, ne 4, starts_with 3exec, start, creation, modification, rename
EventID33eq 28, in 54698, 4104, 4688, 1, 4700
TargetFilename30starts_with 13, wildcard 10, contains 4, eq 3, in 3, ends_with 1?:\Windows\System32\Tasks\*, ?:\Windows\Tasks\*, /etc/cron.allow, /etc/cron.d/*, /etc/systemd/system/*
event.type29eq 23, ne 6start, deletion, change
OriginalFileName27eq 25, in 1, ne 1schtasks.exe, Cmd.Exe, cmd.exe, Adobe Installer, CONTROL.EXE
process.args26eq 15, starts_with 7, in 6, wildcard 5, contains 4-c, -create, --command, -cl, /create
parent_process_basename19eq 16, in 7, starts_with 1, wildcard 1svchost.exe, cron, crond, systemd, CompatTelRunner.exe
ParentImage11ends_with 5, contains 2, eq 2, wildcard 2/dev/shm/*, \powershell.exe, ., ./*, /boot/*
TargetObject10wildcard 5, contains 3, ends_with 2, eq 1H*\Software\Microsoft\Windows\CurrentVersion\Policies\Exp..., H*\Software\Microsoft\Windows\CurrentVersion\Run\*, H*\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\..., *\SOFTWARE\Microsoft\Windows..., HKLM\SOFTWARE\Microsoft\Windows...
ParentCommandLine9contains 6, regex_match 2, ends_with 1, eq 1(?i)Temp\x5c[A-Za-z]{8}\.tmp, *, *-k*, *-p*, *-s*
TaskContent9contains 5, in 2, regex_match 2#1, (?i)Hidden(>|>)true, *<Command>C:\Windows\System32\CompMgmtLauncher.exe&..., *<Command>C:\Windows\System32\eventvwr.msc</Command>*, *<Command>C:\Windows\System32\zh-CN\eventvwr.msc&lt...
event.category9eq 8, in 1process, library, driver, file, registry

Top indicator values (2303 distinct)

These values appear most often in rule predicates.

FieldKindValueRules (here)Corpus reach
Imageends_with
\schtasks.exe
2655
OriginalFileNameeq
schtasks.exe
2129
event.typeeq
start
201036
EventIDeq
4698
1313
process_basenameeq
schtasks.exe
1330
process_basenameeq
powershell.exe
6187
process_basenameeq
svchost.exe
521
EventTypeeq
start
10388
EventTypeeq
exec
9547
CommandLinecontains
/create
915
CommandLinecontains
*/create*
88
CommandLinecontains
*/create *
55
CommandLinecontains
-create
44
CommandLinecontains
–create
44
process_basenamein
bash
8181
process_basenamein
csh
8148
process_basenamein
dash
8150
process_basenamein
fish
8151
process_basenamein
ksh
8149
process_basenamein
sh
8180
process_basenamein
tcsh
8145
process_basenamein
zsh
8180
TargetFilenamestarts_with
?:\Windows\System32\Tasks\*
66
TargetFilenamestarts_with
?:\Windows\Tasks\*
57
event.typene
deletion
633
process.argseq
-create
66
process.argseq
/create
67
process.code_signature.existseq
false
5118
process.code_signature.trustedeq
false
5114
AccessListcontains
%%4417
411

Exclusions (1070 distinct)

These values appear most often in top-level exclusions.

FieldKindValueRules excluding
process_basenameeq
powershell.exe
5
file.extensionin
dpkg-remove
4
file.extensionin
swp
4
file.extensionin
swx
4
process.Ext.token.integrity_level_nameeq
system
4
process.code_signature.trustedeq
true
4
userends_with
*$
4
Imageends_with
\schtasks.exe
3
Imagein
./usr/bin/podman
3
Imagein
/bin/autossl_check
3
Imagein
/bin/chef-client
3
Imagein
/bin/dnf
3
Imagein
/bin/dnf-automatic
3
Imagein
/bin/dockerd
3
Imagein
/bin/dpkg
3

Rules under this technique

These vendors publish rules tagged with this technique.

Platform (all)
Domain (all)

Sigma 79 rules

Elastic 60 rules

Splunk 66 rules

Kusto 15 rules

YARA-L 1 rule

Panther 5 rules