Detection rules › Sigma

Renamed Schtasks Execution

Status
experimental
Severity
high
Log source
category process_creation, product windows
Author
Swachchhanda Shrawan Poudel (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the execution of renamed schtasks.exe binary, which is a legitimate Windows utility used for scheduling tasks. One of the very common persistence techniques is schedule malicious tasks using schtasks.exe. Since, it is heavily abused, it is also heavily monitored by security products. To evade detection, threat actors may rename the schtasks.exe binary to schedule their malicious tasks.

Known false positives

  • Unlikely

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Renamed Schtasks Execution
id: f91e51c9-f344-4b32-969b-0b6f6b8537d4
status: experimental
description: |
    Detects the execution of renamed schtasks.exe binary, which is a legitimate Windows utility used for scheduling tasks.
    One of the very common persistence techniques is schedule malicious tasks using schtasks.exe.
    Since, it is heavily abused, it is also heavily monitored by security products. To evade detection, threat actors may rename the schtasks.exe binary to schedule their malicious tasks.
references:
    - https://x.com/JangPr0/status/1932034543026065833
    - https://ss64.com/nt/schtasks.html
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2025-11-27
tags:
    - attack.execution
    - attack.persistence
    - attack.privilege-escalation
    - attack.stealth
    - attack.t1036.003
    - attack.t1053.005
logsource:
    category: process_creation
    product: windows
detection:
    selection_cmd_operation:
        CommandLine|contains|windash:
            - ' /create '
            - ' /delete '
            - ' /query '
            - ' /change '
            - ' /run '
            - ' /end '
    selection_cmd_flags:
        CommandLine|contains|windash:
            - ' /tn '
            - ' /tr '
            - ' /sc '
            - ' /st '
            - ' /ru '
            - ' /fo '
    selection_pe:
        OriginalFileName: 'schtasks.exe'
    filter_main_cmd:
        CommandLine|contains: 'schtasks'
    filter_main_img:
        Image|endswith: '\schtasks.exe'
    condition: (all of selection_cmd_* and not filter_main_cmd) or (selection_pe and not filter_main_img)
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

(all of selection_cmd_* and not filter_main_cmd) or (selection_pe and not filter_main_img)

Stage 1: selection_cmd_operation

selection_cmd_operation:
    CommandLine|contains|windash:
        - ' /create '
        - ' /delete '
        - ' /query '
        - ' /change '
        - ' /run '
        - ' /end '

Stage 2: selection_cmd_flags

selection_cmd_flags:
    CommandLine|contains|windash:
        - ' /tn '
        - ' /tr '
        - ' /sc '
        - ' /st '
        - ' /ru '
        - ' /fo '

Stage 3: not filter_main_cmd

filter_main_cmd:
    CommandLine|contains: 'schtasks'

Stage 4: selection_pe

selection_pe:
    OriginalFileName: 'schtasks.exe'

Stage 5: not filter_main_img

filter_main_img:
    Image|endswith: '\schtasks.exe'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
CommandLinematchschtasksexcludes:CommandLine field:"CommandLine" value:"schtasks"
Imageends_with\schtasks.exeexcludes:Image field:"Image" value:"\schtasks.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • /change transforms: windash corpus 3 (sigma 3)
  • /create transforms: windash corpus 15 (sigma 15)
  • /delete transforms: windash corpus 2 (sigma 2)
  • /end transforms: windash
  • /fo transforms: windash
  • /query transforms: windash
  • /ru transforms: windash
  • /run transforms: windash
  • /sc transforms: windash
  • /st transforms: windash
  • /tn transforms: windash corpus 2 (sigma 2)
  • /tr transforms: windash
field:"CommandLine" kind:match
OriginalFileNameeq
  • schtasks.exe corpus 31 (sigma 18, elastic 9, splunk 4)
field:"OriginalFileName" kind:eq value:"schtasks.exe"