Detection rules › Sigma

Renamed Schtasks Execution

Status
experimental
Severity
high
Log source
product windows, category process_creation
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.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

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

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
CommandLinematchschtasks
Imageends_with\schtasks.exe

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.

FieldKindValues
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
OriginalFileNameeq
  • schtasks.exe corpus 23 (sigma 18, splunk 4, elastic 1)