Detection rule
Disable Important Scheduled Task
Overview
Detects when adversaries stop services or processes by disabling their respective scheduled tasks in order to conduct data destructive activities
- Rule id
9ac94dc8-9042-493c-ba45-3b5e7c86b980- ATT&CK techniques
- T1489 Service Stop
- Severity
- High
- Confidence
- Low
- Origin
- SigmaHQ (community)
- SigmaHQ status
test- Used in defense packs
- n0n, The Gentlemen, qilin, Akira, safepay, Play, everest, majinahanashi
Validation
- ExperimentalSyntax checked only. Not yet tested on events.
- Test-data validatedMatched positive test events and ignored near-miss events. Not yet run in a production SIEM.
- SIEM-validatedRun in a real SIEM, with a recorded result.
2 of 2 positive test events matched; 1 of 1 near-miss events were correctly ignored. Community rule reused unmodified from SigmaHQ. OffSet7 converted it and tested it on synthetic events.
Detection logic and queries
Queries are shown exactly as generated. Test them in your environment before you deploy them.
Sigma
Sigma (YAML) · 9ac94dc8-9042-493c-ba45-3b5e7c86b980
title: Disable Important Scheduled Task
id: 9ac94dc8-9042-493c-ba45-3b5e7c86b980
related:
- id: 7595ba94-cf3b-4471-aa03-4f6baa9e5fad # Security-Audting Eventlog
type: similar
- id: 9e3cb244-bdb8-4632-8c90-6079c8f4f16d # TaskScheduler EventLog
type: similar
status: test
description: Detects when adversaries stop services or processes by disabling their respective scheduled tasks in order to conduct data destructive activities
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1490/T1490.md#atomic-test-8---windows---disable-the-sr-scheduled-task
- https://twitter.com/MichalKoczwara/status/1553634816016498688
- https://thedfirreport.com/2021/10/18/icedid-to-xinglocker-ransomware-in-24-hours/
author: frack113, Nasreddine Bencherchali (Nextron Systems), X__Junior
date: 2021-12-26
modified: 2026-03-11
tags:
- attack.impact
- attack.t1489
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\schtasks.exe'
- OriginalFileName: 'schtasks.exe'
selection_cli_disable:
CommandLine|contains|windash: '/disable'
selection_cli_task:
CommandLine|contains:
# Add more important tasks
- '\Windows\BitLocker'
- '\Windows\ExploitGuard'
- '\Windows\ExploitGuard\ExploitGuard MDM policy Refresh'
- '\Windows\SystemRestore\SR'
- '\Windows\UpdateOrchestrator\'
- '\Windows\Windows Defender\'
- '\Windows\WindowsBackup\'
- '\Windows\WindowsUpdate\'
condition: all of selection_*
falsepositives:
- Unknown
level: high
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_schtasks_disable/info.yml
simulation:
- type: atomic-red-team
name: Windows - Disable the SR scheduled task
technique: T1490
atomic_guid: 1c68c68d-83a4-4981-974e-8993055fa034QRadar AQL
IBM QRadar AQL (hunting query)Hunting query
Hunting search for the Log Activity tab or the API. It is not a QRadar rule.
AQL search for the Log Activity tab or the API. It is NOT a deployable QRadar rule: real-time detection in QRadar is a CRE (Custom Rule Engine) rule, for which this build only writes a design specification (qradar_cre).
SELECT * FROM events WHERE devicetype=12 AND ((LOWER("Process Path") LIKE '%\schtasks.exe' OR LOWER("Process Name") LIKE '%\schtasks.exe') OR Filename='schtasks.exe') AND (LOWER(Command) LIKE '%-disable%' OR LOWER(Command) LIKE '%/disable%' OR LOWER(Command) LIKE '%–disable%' OR LOWER(Command) LIKE '%—disable%' OR LOWER(Command) LIKE '%―disable%') AND (LOWER(Command) LIKE '%\windows\bitlocker%' OR LOWER(Command) LIKE '%\windows\exploitguard%' OR LOWER(Command) LIKE '%\windows\exploitguard\exploitguard mdm policy refresh%' OR LOWER(Command) LIKE '%\windows\systemrestore\sr%' OR LOWER(Command) LIKE '%\windows\updateorchestrator\%' OR LOWER(Command) LIKE '%\windows\windows defender\%' OR LOWER(Command) LIKE '%\windows\windowsbackup\%' OR LOWER(Command) LIKE '%\windows\windowsupdate\%')QRadar CRE
Design for the QRadar Rule Wizard. It is not importable and has not been tested in QRadar.
- Rule name
OffSet7: Disable Important Scheduled Task- Rule type
- Event rule (Local)
- Log source types
- Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1
Building blocks
BB:OffSet7:Disable Important Scheduled Task:selection_img(match)Any of the groups matches (OR): build one BB per group and a parent BB "when an event matches any of" them.Process Path / Process Nameends with:\schtasks.exeFilenameis equal to (case-insensitive):schtasks.exe
BB:OffSet7:Disable Important Scheduled Task:selection_cli_disable(match)All test lines must match (AND).Commandcontains:/disable
BB:OffSet7:Disable Important Scheduled Task:selection_cli_task(match)All test lines must match (AND).Commandcontains:\Windows\BitLocker,\Windows\ExploitGuard,\Windows\ExploitGuard\ExploitGuard MDM policy Refresh,\Windows\SystemRestore\SR,\Windows\UpdateOrchestrator\,\Windows\Windows Defender\,\Windows\WindowsBackup\,\Windows\WindowsUpdate\
Main rule, option A (building blocks)
- when the event(s) were detected by one or more of these log source types:
Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1 - when an event matches the condition built from these building blocks:
(ALL of [BB:OffSet7:Disable Important Scheduled Task:selection_img, BB:OffSet7:Disable Important Scheduled Task:selection_cli_disable, BB:OffSet7:Disable Important Scheduled Task:selection_cli_task])
Main rule, option B (AQL filter test)
- when the event matches this AQL filter query:
devicetype=12 AND ((LOWER("Process Path") LIKE '%\schtasks.exe' OR LOWER("Process Name") LIKE '%\schtasks.exe') OR Filename='schtasks.exe') AND (LOWER(Command) LIKE '%-disable%' OR LOWER(Command) LIKE '%/disable%' OR LOWER(Command) LIKE '%–disable%' OR LOWER(Command) LIKE '%—disable%' OR LOWER(Command) LIKE '%―disable%') AND (LOWER(Command) LIKE '%\windows\bitlocker%' OR LOWER(Command) LIKE '%\windows\exploitguard%' OR LOWER(Command) LIKE '%\windows\exploitguard\exploitguard mdm policy refresh%' OR LOWER(Command) LIKE '%\windows\systemrestore\sr%' OR LOWER(Command) LIKE '%\windows\updateorchestrator\%' OR LOWER(Command) LIKE '%\windows\windows defender\%' OR LOWER(Command) LIKE '%\windows\windowsbackup\%' OR LOWER(Command) LIKE '%\windows\windowsupdate\%')
Rule response
- Severity 7, credibility 6, relevance 7
- Ensure the detected event is part of an offense; index offense on Log Source (host) and annotate with the rule title and OffSet7 rule id
- Respond no more than once per 30 minutes per Log Source (tune per environment)
Limitations
- QRadar AQL LIKE / CRE string tests are case-sensitive unless the property is lower-cased; the AQL option uses LOWER() where the backend applied it.
Splunk
Splunk SPLSearch
Search for Splunk with Windows/Sysmon field names. A scheduled search or ES correlation search also needs a schedule, time range, throttling and an adaptive response, set in your environment.
(Image="*\\schtasks.exe" OR OriginalFileName="schtasks.exe") (CommandLine="*-disable*" OR CommandLine="*/disable*" OR CommandLine="*–disable*" OR CommandLine="*—disable*" OR CommandLine="*―disable*") (CommandLine IN ("*\\Windows\\BitLocker*", "*\\Windows\\ExploitGuard*", "*\\Windows\\ExploitGuard\\ExploitGuard MDM policy Refresh*", "*\\Windows\\SystemRestore\\SR*", "*\\Windows\\UpdateOrchestrator\\*", "*\\Windows\\Windows Defender\\*", "*\\Windows\\WindowsBackup\\*", "*\\Windows\\WindowsUpdate\\*"))Splunk savedsearches.conf stanzaScheduled search template
Template stanza. Review schedule, alert actions and index/sourcetype for your environment before enabling.
[default]
dispatch.earliest_time = -30d
dispatch.latest_time = now
[Disable Important Scheduled Task]
description = Detects when adversaries stop services or processes by disabling their respective scheduled tasks in order to conduct data destructive activities
search = (Image="*\\schtasks.exe" OR OriginalFileName="schtasks.exe") (CommandLine="*-disable*" OR CommandLine="*/disable*" OR CommandLine="*–disable*" OR CommandLine="*—disable*" OR CommandLine="*―disable*") (CommandLine IN ("*\\Windows\\BitLocker*", "*\\Windows\\ExploitGuard*", "*\\Windows\\ExploitGuard\\ExploitGuard MDM policy Refresh*", "*\\Windows\\SystemRestore\\SR*", "*\\Windows\\UpdateOrchestrator\\*", "*\\Windows\\Windows Defender\\*", "*\\Windows\\WindowsBackup\\*", "*\\Windows\\WindowsUpdate\\*"))Microsoft Sentinel
Microsoft Sentinel KQL (ASIM)Hunting query
Hunting query over ASIM-normalized tables. An analytics rule also needs a schedule, entity mapping and alert grouping.
imProcessCreate
| where (TargetProcessName endswith "\\schtasks.exe" or TargetProcessFileOriginalName =~ "schtasks.exe") and (TargetProcessCommandLine contains "-disable" or TargetProcessCommandLine contains "/disable" or TargetProcessCommandLine contains "–disable" or TargetProcessCommandLine contains "—disable" or TargetProcessCommandLine contains "―disable") and (TargetProcessCommandLine contains "\\Windows\\BitLocker" or TargetProcessCommandLine contains "\\Windows\\ExploitGuard" or TargetProcessCommandLine contains "\\Windows\\ExploitGuard\\ExploitGuard MDM policy Refresh" or TargetProcessCommandLine contains "\\Windows\\SystemRestore\\SR" or TargetProcessCommandLine contains "\\Windows\\UpdateOrchestrator\\" or TargetProcessCommandLine contains "\\Windows\\Windows Defender\\" or TargetProcessCommandLine contains "\\Windows\\WindowsBackup\\" or TargetProcessCommandLine contains "\\Windows\\WindowsUpdate\\")Defender XDR
Microsoft Defender XDR KQLHunting query
Advanced hunting query. A custom detection rule also needs a frequency, impacted entities and actions.
DeviceProcessEvents
| where (FolderPath endswith "\\schtasks.exe" or ProcessVersionInfoOriginalFileName =~ "schtasks.exe") and (ProcessCommandLine contains "-disable" or ProcessCommandLine contains "/disable" or ProcessCommandLine contains "–disable" or ProcessCommandLine contains "—disable" or ProcessCommandLine contains "―disable") and (ProcessCommandLine contains "\\Windows\\BitLocker" or ProcessCommandLine contains "\\Windows\\ExploitGuard" or ProcessCommandLine contains "\\Windows\\ExploitGuard\\ExploitGuard MDM policy Refresh" or ProcessCommandLine contains "\\Windows\\SystemRestore\\SR" or ProcessCommandLine contains "\\Windows\\UpdateOrchestrator\\" or ProcessCommandLine contains "\\Windows\\Windows Defender\\" or ProcessCommandLine contains "\\Windows\\WindowsBackup\\" or ProcessCommandLine contains "\\Windows\\WindowsUpdate\\")Elastic
Elastic Lucene (ECS)Hunting query
Lucene query over ECS fields (Winlogbeat/Elastic Agent Windows mappings). A detection rule also needs an index pattern, schedule and actions.
(process.executable:*\\schtasks.exe OR process.pe.original_file_name:schtasks.exe) AND process.command_line:(*\-disable* OR *\/disable* OR *–disable* OR *—disable* OR *―disable*) AND (process.command_line:(*\\Windows\\BitLocker* OR *\\Windows\\ExploitGuard* OR *\\Windows\\ExploitGuard\\ExploitGuard\ MDM\ policy\ Refresh* OR *\\Windows\\SystemRestore\\SR* OR *\\Windows\\UpdateOrchestrator\\* OR *\\Windows\\Windows\ Defender\\* OR *\\Windows\\WindowsBackup\\* OR *\\Windows\\WindowsUpdate\\*))Elastic EQL (ECS)Hunting query
EQL query over ECS fields. Usable in an Elastic Security EQL rule after review; index pattern and schedule are set per environment.
any where (process.executable:"*\\schtasks.exe" or process.pe.original_file_name:"schtasks.exe") and process.command_line like~ ("*-disable*", "*/disable*", "*–disable*", "*—disable*", "*―disable*") and (process.command_line like~ ("*\\Windows\\BitLocker*", "*\\Windows\\ExploitGuard*", "*\\Windows\\ExploitGuard\\ExploitGuard MDM policy Refresh*", "*\\Windows\\SystemRestore\\SR*", "*\\Windows\\UpdateOrchestrator\\*", "*\\Windows\\Windows Defender\\*", "*\\Windows\\WindowsBackup\\*", "*\\Windows\\WindowsUpdate\\*"))Elastic ES|QL (ECS)Hunting query
ES|QL query over ECS fields; the FROM clause uses * and must be narrowed to your indices.
from * metadata _id, _index, _version | where (ends_with(process.executable, "\\schtasks.exe") or process.pe.original_file_name=="schtasks.exe") and (process.command_line like "*-disable*" or process.command_line like "*/disable*" or process.command_line like "*–disable*" or process.command_line like "*—disable*" or process.command_line like "*―disable*") and (process.command_line like "*\\\\Windows\\\\BitLocker*" or process.command_line like "*\\\\Windows\\\\ExploitGuard*" or process.command_line like "*\\\\Windows\\\\ExploitGuard\\\\ExploitGuard MDM policy Refresh*" or process.command_line like "*\\\\Windows\\\\SystemRestore\\\\SR*" or process.command_line like "*\\\\Windows\\\\UpdateOrchestrator\\\\*" or process.command_line like "*\\\\Windows\\\\Windows Defender\\\\*" or process.command_line like "*\\\\Windows\\\\WindowsBackup\\\\*" or process.command_line like "*\\\\Windows\\\\WindowsUpdate\\\\*")Required telemetry
- Log source
product: windows · category: process_creation- Fields used
CommandLineImageOriginalFileName
False positives
- Unknown
Investigation and response
No OffSet7 investigation guidance has been written for this rule yet. Start from the false positives above and the ATT&CK technique pages.
References
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1490/T1490.md#atomic-test-8---windows---disable-the-sr-scheduled-task
- https://twitter.com/MichalKoczwara/status/1553634816016498688
- https://thedfirreport.com/2021/10/18/icedid-to-xinglocker-ransomware-in-24-hours/
Author and attribution
- Author
- frack113, Nasreddine Bencherchali (Nextron Systems), X__Junior
- Source
- SigmaHQ ·
rules/windows/process_creation/proc_creation_win_schtasks_disable.yml - Upstream commit
9688134317a2- Licence
- Detection Rule License (DRL) 1.1
Version history
- Version 1Imported from SigmaHQ
- OffSet7 build · SigmaHQ
9688134317a2