Detection rules › Sigma

Scheduled TaskCache Change by Uncommon Program

Status
test
Severity
high
Log source
category registry_set, product windows
Author
Syed Hasan (@syedhasan009)
Source
github.com/SigmaHQ/sigma

Monitor the creation of a new key under 'TaskCache' when a new scheduled task is registered by a process that is not svchost.exe, which is suspicious

MITRE ATT&CK coverage

Telemetry coverage

Rule body

title: Scheduled TaskCache Change by Uncommon Program
id: 4720b7df-40c3-48fd-bbdf-fd4b3c464f0d
status: test
description: Monitor the creation of a new key under 'TaskCache' when a new scheduled task is registered by a process that is not svchost.exe, which is suspicious
references:
    - https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/
    - https://labs.f-secure.com/blog/scheduled-task-tampering/
author: Syed Hasan (@syedhasan009)
date: 2021-06-18
modified: 2025-10-22
tags:
    - attack.privilege-escalation
    - attack.execution
    - attack.persistence
    - attack.t1053
    - attack.t1053.005
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject|contains: 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\'
    filter_main_empty:
        Details: '(Empty)'
    filter_main_null:
        Details: null
    filter_main_other:
        TargetObject|contains:
            - 'Microsoft\Windows\UpdateOrchestrator'
            - 'Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask\Index'
            - 'Microsoft\Windows\Flighting\OneSettings\RefreshCache\Index'
    filter_main_mousocoreworker:
        Image|endswith: 'C:\Windows\System32\MoUsoCoreWorker.exe'
    filter_main_services:
        Image|endswith: 'C:\Windows\System32\services.exe'
    filter_main_tiworker:
        Image|startswith: 'C:\Windows\'
        Image|endswith: '\TiWorker.exe'
    filter_main_svchost:
        Image: 'C:\WINDOWS\system32\svchost.exe'
    filter_main_ngen:
        Image|startswith: 'C:\Windows\Microsoft.NET\Framework' # \Framework\ and \Framework64\
        Image|endswith: '\ngen.exe'
        TargetObject|contains:
            - '\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{B66B135D-DA06-4FC4-95F8-7458E1D10129}'
            - '\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\.NET Framework\.NET Framework NGEN'
    filter_main_office:
        Image:
            - 'C:\Program Files\Microsoft Office\root\Integration\Integrator.exe'
            - 'C:\Program Files (x86)\Microsoft Office\root\Integration\Integrator.exe'
            - 'C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exe'
            - 'C:\Program Files (x86)\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exe'
    filter_main_msiexec:
        Image: 'C:\Windows\System32\msiexec.exe'
    filter_main_explorer:
        Image: 'C:\Windows\explorer.exe'
        TargetObject|contains: '\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\PLA\Server Manager Performance Monitor\'
    filter_main_system:
        Image: 'System'
    filter_main_runtimebroker:
        Image: 'C:\Windows\System32\RuntimeBroker.exe'
    filter_optional_dropbox_updater:
        Image:
            - 'C:\Program Files (x86)\Dropbox\Update\DropboxUpdate.exe'
            - 'C:\Program Files\Dropbox\Update\DropboxUpdate.exe'
    filter_optional_edge:
        Image|endswith:
            - 'C:\Program Files (x86)\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe'
            - 'C:\Program Files\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe'
    filter_optional_onedrive:
        Image|endswith:
            - 'C:\Program Files (x86)\Microsoft OneDrive\OneDrive.exe'
            - 'C:\Program Files\Microsoft OneDrive\OneDrive.exe'
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_* and not 1 of filter_optional_*

Stage 1: selection

selection:
    TargetObject|contains: 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\'

Stage 2: not filter_main_*

filter_main_empty:
    Details: '(Empty)'
filter_main_null:
    Details: null
filter_main_other:
    TargetObject|contains:
        - 'Microsoft\Windows\UpdateOrchestrator'
        - 'Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask\Index'
        - 'Microsoft\Windows\Flighting\OneSettings\RefreshCache\Index'
filter_main_mousocoreworker:
    Image|endswith: 'C:\Windows\System32\MoUsoCoreWorker.exe'
filter_main_services:
    Image|endswith: 'C:\Windows\System32\services.exe'
filter_main_tiworker:
    Image|startswith: 'C:\Windows\'
    Image|endswith: '\TiWorker.exe'
filter_main_svchost:
    Image: 'C:\WINDOWS\system32\svchost.exe'
filter_main_ngen:
    Image|startswith: 'C:\Windows\Microsoft.NET\Framework'
    Image|endswith: '\ngen.exe'
    TargetObject|contains:
        - '\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{B66B135D-DA06-4FC4-95F8-7458E1D10129}'
        - '\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\.NET Framework\.NET Framework NGEN'
filter_main_office:
    Image:
        - 'C:\Program Files\Microsoft Office\root\Integration\Integrator.exe'
        - 'C:\Program Files (x86)\Microsoft Office\root\Integration\Integrator.exe'
        - 'C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exe'
        - 'C:\Program Files (x86)\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exe'
filter_main_msiexec:
    Image: 'C:\Windows\System32\msiexec.exe'
filter_main_explorer:
    Image: 'C:\Windows\explorer.exe'
    TargetObject|contains: '\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\PLA\Server Manager Performance Monitor\'
filter_main_system:
    Image: 'System'
filter_main_runtimebroker:
    Image: 'C:\Windows\System32\RuntimeBroker.exe'

Stage 3: not filter_optional_*

filter_optional_dropbox_updater:
    Image:
        - 'C:\Program Files (x86)\Dropbox\Update\DropboxUpdate.exe'
        - 'C:\Program Files\Dropbox\Update\DropboxUpdate.exe'
filter_optional_edge:
    Image|endswith:
        - 'C:\Program Files (x86)\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe'
        - 'C:\Program Files\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe'
filter_optional_onedrive:
    Image|endswith:
        - 'C:\Program Files (x86)\Microsoft OneDrive\OneDrive.exe'
        - 'C:\Program Files\Microsoft OneDrive\OneDrive.exe'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
TargetObjectmatch\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{B66B135D-DA06-4FC4-95F8-7458E1D10129}excludes:TargetObject field:"TargetObject" value:"\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\{B66B135D-DA06-4FC4-95F8-7458E1D10129}"
TargetObjectmatch\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\.NET Framework\.NET Framework NGENexcludes:TargetObject field:"TargetObject" value:"\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\.NET Framework\.NET Framework NGEN"
Imageends_with\ngen.exeexcludes:Image field:"Image" value:"\ngen.exe"
Imagestarts_withC:\Windows\Microsoft.NET\Frameworkexcludes:Image field:"Image" value:"C:\Windows\Microsoft.NET\Framework"
Imageends_with\TiWorker.exeexcludes:Image field:"Image" value:"\TiWorker.exe"
Imagestarts_withC:\Windows\excludes:Image field:"Image" value:"C:\Windows\"
ImageeqC:\Windows\explorer.exeexcludes:Image field:"Image" value:"C:\Windows\explorer.exe"
TargetObjectmatch\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\PLA\Server Manager Performance Monitor\excludes:TargetObject field:"TargetObject" value:"\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\PLA\Server Manager Performance Monitor\"
Detailseq(Empty)excludes:Details field:"Details" value:"(Empty)"
Detailsis_null(no value, null check)excludes:Details
Imageends_withC:\Windows\System32\MoUsoCoreWorker.exeexcludes:Image field:"Image" value:"C:\Windows\System32\MoUsoCoreWorker.exe"
Imageends_withC:\Windows\System32\services.exeexcludes:Image field:"Image" value:"C:\Windows\System32\services.exe"
ImageeqC:\Program Files (x86)\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exeexcludes:Image field:"Image" value:"C:\Program Files (x86)\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exe"
ImageeqC:\Program Files (x86)\Microsoft Office\root\Integration\Integrator.exeexcludes:Image field:"Image" value:"C:\Program Files (x86)\Microsoft Office\root\Integration\Integrator.exe"
ImageeqC:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exeexcludes:Image field:"Image" value:"C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exe"
ImageeqC:\Program Files\Microsoft Office\root\Integration\Integrator.exeexcludes:Image field:"Image" value:"C:\Program Files\Microsoft Office\root\Integration\Integrator.exe"
ImageeqC:\WINDOWS\system32\svchost.exeexcludes:Image field:"Image" value:"C:\WINDOWS\system32\svchost.exe"
ImageeqC:\Windows\System32\RuntimeBroker.exeexcludes:Image field:"Image" value:"C:\Windows\System32\RuntimeBroker.exe"
ImageeqC:\Windows\System32\msiexec.exeexcludes:Image field:"Image" value:"C:\Windows\System32\msiexec.exe"
ImageeqSystemexcludes:Image field:"Image" value:"System"
TargetObjectmatchMicrosoft\Windows\Flighting\OneSettings\RefreshCache\Indexexcludes:TargetObject field:"TargetObject" value:"Microsoft\Windows\Flighting\OneSettings\RefreshCache\Index"
TargetObjectmatchMicrosoft\Windows\SoftwareProtectionPlatform\SvcRestartTask\Indexexcludes:TargetObject field:"TargetObject" value:"Microsoft\Windows\SoftwareProtectionPlatform\SvcRestartTask\Index"
TargetObjectmatchMicrosoft\Windows\UpdateOrchestratorexcludes:TargetObject field:"TargetObject" value:"Microsoft\Windows\UpdateOrchestrator"
Imageends_withC:\Program Files (x86)\Microsoft OneDrive\OneDrive.exeexcludes:Image field:"Image" value:"C:\Program Files (x86)\Microsoft OneDrive\OneDrive.exe"
Imageends_withC:\Program Files (x86)\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exeexcludes:Image field:"Image" value:"C:\Program Files (x86)\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe"
Imageends_withC:\Program Files\Microsoft OneDrive\OneDrive.exeexcludes:Image field:"Image" value:"C:\Program Files\Microsoft OneDrive\OneDrive.exe"
Imageends_withC:\Program Files\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exeexcludes:Image field:"Image" value:"C:\Program Files\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe"
ImageeqC:\Program Files (x86)\Dropbox\Update\DropboxUpdate.exeexcludes:Image field:"Image" value:"C:\Program Files (x86)\Dropbox\Update\DropboxUpdate.exe"
ImageeqC:\Program Files\Dropbox\Update\DropboxUpdate.exeexcludes:Image field:"Image" value:"C:\Program Files\Dropbox\Update\DropboxUpdate.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
TargetObjectmatch
  • SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\
field:"TargetObject" kind:match value:"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\"