Sigma rule: Schedule Task Creation From Env Variable Or Potentially Suspicious Path Via Schtasks.EXE
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-7aff483710f5, updated 2025-10-07T00:00:00.000Z.
Rule
- Title
- Schedule Task Creation From Env Variable Or Potentially Suspicious Path Via Schtasks.EXE
- Status
- test
- Level
- medium
- Author
- Florian Roth (Nextron Systems)
- Date
- 2022-02-21
- Modified
- 2025-10-07
- File
- rules/windows/process_creation/proc_creation_win_schtasks_env_folder.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects Schtask creations that point to a suspicious folder or an environment variable often used by malware
Log source
- product
- windows
- category
- process_creation
Detection
selection_1_create:
Image|endswith: '\schtasks.exe'
CommandLine|contains|windash: ' /create '
selection_1_all_folders:
CommandLine|contains:
- ':\Perflogs'
- ':\Users\All Users\'
- ':\Users\Default\'
- ':\Users\Public'
- ':\Windows\Temp'
- '\AppData\Local\'
- '\AppData\Roaming\'
- '%AppData%'
- '%Public%'
selection_2_parent:
ParentCommandLine|endswith: '\svchost.exe -k netsvcs -p -s Schedule'
selection_2_some_folders:
CommandLine|contains:
- ':\Perflogs'
- ':\Windows\Temp'
- '\Users\Public'
- '%Public%'
filter_optional_other:
- ParentCommandLine|contains: 'unattended.ini'
- CommandLine|contains: 'update_task.xml'
filter_optional_team_viewer:
CommandLine|contains: '/Create /TN TVInstallRestore /TR'
filter_optional_avira_install:
# Comment out this filter if you dont use AVIRA
CommandLine|contains|all:
- '/Create /Xml '
- '\Temp\.CR.'
- '\Avira_Security_Installation.xml'
filter_optional_avira_other:
# Comment out this filter if you dont use AVIRA
CommandLine|contains|all:
- '/Create /F /TN'
- '/Xml '
- '\Temp\'
- 'Avira_'
CommandLine|contains:
- '.tmp\UpdateFallbackTask.xml'
- '.tmp\WatchdogServiceControlManagerTimeout.xml'
- '.tmp\SystrayAutostart.xml'
- '.tmp\MaintenanceTask.xml'
filter_optional_klite_codec:
CommandLine|contains|all:
- '\Temp\'
- '/Create /TN "klcp_update" /XML '
- '\klcp_update_task.xml'
condition: ( all of selection_1_* or all of selection_2_* ) and not 1 of filter_optional_*False positives (as the rule lists them)
- Benign scheduled tasks creations or executions that happen often during software installations
- Software that uses the AppData folder and scheduled tasks to update the software in the AppData folders
Tags
- attack.privilege-escalation
- attack.persistence
- attack.execution
- attack.t1053.005
MITRE ATT&CK ids this rule names
Related rules
References
- https://www.welivesecurity.com/2022/01/18/donot-go-do-not-respawn/
- https://www.joesandbox.com/analysis/514608/0/html#324415FF7D8324231381BAD48A052F85DF04
- https://blog.talosintelligence.com/gophish-powerrat-dcrat/
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_schtasks_env_folder.yml
Sources and licences
SigmaHQ
"Schedule Task Creation From Env Variable Or Potentially Suspicious Path Via Schtasks.EXE" by Florian Roth (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_schtasks_env_folder.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Schedule Task Creation From Env Variable Or Potentially Suspicious Path Via Schtasks.EXE",
entity page, dataset version ref-7aff483710f5, updated 2025-10-07T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/81325ce1-be01-4250-944f-b4789644556f (accessed 2026-11-03).
Underlying source: SigmaHQ rule 81325ce1-be01-4250-944f-b4789644556f, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.