Detection rules › Sigma
Suspicious Modification Of Scheduled Tasks
Detects when an attacker tries to modify an already existing scheduled tasks to run from a suspicious location Attackers can create a simple looking task in order to avoid detection on creation as it's often the most focused on Instead they modify the task after creation to include their malicious payload
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | T1053.005 Scheduled Task/Job: Scheduled Task |
| Persistence | T1053.005 Scheduled Task/Job: Scheduled Task |
| Privilege Escalation | T1053.005 Scheduled Task/Job: Scheduled Task |
Event coverage
| Provider | Event ID | Title |
|---|---|---|
| Sysmon | 1 | Process creation |
| Security-Auditing | 4688 | A new process has been created. |
Stages and Predicates
Stage 1: all of selection_schtasks
CommandLine|contains: ' /Change '
CommandLine|contains: ' /TN '
Image|endswith: '\schtasks.exe'
Stage 2: all of selection_susp_locations
or:
CommandLine|contains: '%ProgramData%'
CommandLine|contains: '%appdata%'
CommandLine|contains: '%comspec%'
CommandLine|contains: '%localappdata%'
CommandLine|contains: 'C:\Perflogs\'
CommandLine|contains: 'C:\ProgramData\'
CommandLine|contains: '\AppData\Local\Temp'
CommandLine|contains: '\AppData\Roaming\'
CommandLine|contains: '\Desktop\'
CommandLine|contains: '\Downloads\'
CommandLine|contains: '\Temporary Internet'
CommandLine|contains: '\Users\Public\'
CommandLine|contains: '\WINDOWS\Temp\'
Stage 3: all of selection_susp_images
or:
CommandLine|contains: 'bash '
CommandLine|contains: bash.exe
CommandLine|contains: bitsadmin
CommandLine|contains: certutil
CommandLine|contains: 'cmd /c '
CommandLine|contains: 'cmd /k '
CommandLine|contains: 'cmd /r '
CommandLine|contains: 'cmd.exe /c '
CommandLine|contains: 'cmd.exe /k '
CommandLine|contains: 'cmd.exe /r '
CommandLine|contains: cscript
CommandLine|contains: forfiles
CommandLine|contains: 'hh '
CommandLine|contains: hh.exe
CommandLine|contains: mshta
CommandLine|contains: powershell
CommandLine|contains: regsvr32
CommandLine|contains: rundll32
CommandLine|contains: scrcons
CommandLine|contains: scriptrunner
CommandLine|contains: 'wmic '
CommandLine|contains: wmic.exe
CommandLine|contains: wscript
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.
| Field | Kind | Values |
|---|---|---|
CommandLine | match |
|
Image | ends_with |
|