Detection rules › Sigma

Classes Autorun Keys Modification

Status
test
Severity
medium
Log source
product windows, category registry_set
Author
Victor Sergeev, Daniil Yugoslavskiy, Gleb Sukhodolskiy, Timur Zinniatullin, oscd.community, Tim Shelton, frack113 (split)
Source
github.com/SigmaHQ/sigma

Detects modification of Windows Registry Classes keys used for persistence. Adversaries modify these autostart extensibility points (ASEP) to execute malicious code when file types are opened or actions are performed. Various legitimate software also uses these keys. Currently, this rule only filters out known legitimate software paths, thus it is recommended to review and tune filters for your environment to reduce false positives before deploying to production.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 13RegistryEvent (Value Set)

Rule body yaml

title: Classes Autorun Keys Modification
id: 9df5f547-c86a-433e-b533-f2794357e242
related:
    - id: 17f878b8-9968-4578-b814-c4217fc5768c
      type: obsolete
status: test
description: |
    Detects modification of Windows Registry Classes keys used for persistence.
    Adversaries modify these autostart extensibility points (ASEP) to execute malicious code when file types are opened or actions are performed.
    Various legitimate software also uses these keys. Currently, this rule only filters out known legitimate software paths,
    thus it is recommended to review and tune filters for your environment to reduce false positives before deploying to production.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1547.001/T1547.001.md
    - https://learn.microsoft.com/en-us/sysinternals/downloads/autoruns
    - https://gist.github.com/GlebSukhodolskiy/0fc5fa5f482903064b448890db1eaf9d # a list with registry keys
author: Victor Sergeev, Daniil Yugoslavskiy, Gleb Sukhodolskiy, Timur Zinniatullin, oscd.community, Tim Shelton, frack113 (split)
date: 2019-10-25
modified: 2025-10-22
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1547.001
logsource:
    category: registry_set
    product: windows
detection:
    selection_classes_base:
        TargetObject|contains: '\Software\Classes'
    selection_classes_target:
        TargetObject|contains:
            - '\Folder\ShellEx\ExtShellFolderViews'
            - '\Folder\ShellEx\DragDropHandlers'
            - '\Folder\Shellex\ColumnHandlers'
            - '\Filter'
            - '\Exefile\Shell\Open\Command\(Default)'
            - '\Directory\Shellex\DragDropHandlers'
            - '\Directory\Shellex\CopyHookHandlers'
            - '\CLSID\{AC757296-3522-4E11-9862-C17BE5A1767E}\Instance'
            - '\CLSID\{ABE3B9A4-257D-4B97-BD1A-294AF496222E}\Instance'
            - '\CLSID\{7ED96837-96F0-4812-B211-F13C24117ED3}\Instance'
            - '\CLSID\{083863F1-70DE-11d0-BD40-00A0C911CE86}\Instance'
            - '\Classes\AllFileSystemObjects\ShellEx\DragDropHandlers'
            - '\.exe'
            - '\.cmd'
            - '\ShellEx\PropertySheetHandlers'
            - '\ShellEx\ContextMenuHandlers'
    filter_main_drivers:
        Image: 'C:\Windows\System32\drvinst.exe'
    filter_main_empty:
        Details: '(Empty)'
    filter_main_null:
        Details: null
    filter_main_svchost:
        Image: 'C:\Windows\System32\svchost.exe'
        # If more targets are found from "svchost". Please exclude the whole image
        TargetObject|contains: '\lnkfile\shellex\ContextMenuHandlers\'
    filter_optional_msoffice:
        Details: '{807583E5-5146-11D5-A672-00B0D022E945}'
    condition: all of selection_* and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Legitimate software automatically (mostly, during installation) sets up autorun keys for legitimate reason
    - Legitimate administrator sets up autorun keys for legitimate reason
level: medium

Stages and Predicates

Stage 0: condition

all of selection_* and not 1 of filter_main_* and not 1 of filter_optional_*

Stage 1: selection_classes_base

selection_classes_base:
    TargetObject|contains: '\Software\Classes'

Stage 2: selection_classes_target

selection_classes_target:
    TargetObject|contains:
        - '\Folder\ShellEx\ExtShellFolderViews'
        - '\Folder\ShellEx\DragDropHandlers'
        - '\Folder\Shellex\ColumnHandlers'
        - '\Filter'
        - '\Exefile\Shell\Open\Command\(Default)'
        - '\Directory\Shellex\DragDropHandlers'
        - '\Directory\Shellex\CopyHookHandlers'
        - '\CLSID\{AC757296-3522-4E11-9862-C17BE5A1767E}\Instance'
        - '\CLSID\{ABE3B9A4-257D-4B97-BD1A-294AF496222E}\Instance'
        - '\CLSID\{7ED96837-96F0-4812-B211-F13C24117ED3}\Instance'
        - '\CLSID\{083863F1-70DE-11d0-BD40-00A0C911CE86}\Instance'
        - '\Classes\AllFileSystemObjects\ShellEx\DragDropHandlers'
        - '\.exe'
        - '\.cmd'
        - '\ShellEx\PropertySheetHandlers'
        - '\ShellEx\ContextMenuHandlers'

Stage 3: not filter_main_*

filter_main_drivers:
    Image: 'C:\Windows\System32\drvinst.exe'
filter_main_empty:
    Details: '(Empty)'
filter_main_null:
    Details: null
filter_main_svchost:
    Image: 'C:\Windows\System32\svchost.exe'
    TargetObject|contains: '\lnkfile\shellex\ContextMenuHandlers\'

Stage 4: not filter_optional_msoffice

filter_optional_msoffice:
    Details: '{807583E5-5146-11D5-A672-00B0D022E945}'

Exclusions

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

FieldKindExcluded values
ImageeqC:\Windows\System32\svchost.exe
TargetObjectmatch\lnkfile\shellex\ContextMenuHandlers\
Detailseq(Empty)
Detailsis_null(no value, null check)
ImageeqC:\Windows\System32\drvinst.exe
Detailseq{807583E5-5146-11D5-A672-00B0D022E945}

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
TargetObjectmatch
  • \.cmd
  • \.exe
  • \CLSID\{083863F1-70DE-11d0-BD40-00A0C911CE86}\Instance corpus 2 (sigma 2)
  • \CLSID\{7ED96837-96F0-4812-B211-F13C24117ED3}\Instance corpus 2 (sigma 2)
  • \CLSID\{ABE3B9A4-257D-4B97-BD1A-294AF496222E}\Instance corpus 2 (sigma 2)
  • \CLSID\{AC757296-3522-4E11-9862-C17BE5A1767E}\Instance corpus 2 (sigma 2)
  • \Classes\AllFileSystemObjects\ShellEx\DragDropHandlers
  • \Directory\Shellex\CopyHookHandlers corpus 2 (sigma 2)
  • \Directory\Shellex\DragDropHandlers corpus 2 (sigma 2)
  • \Exefile\Shell\Open\Command\(Default)
  • \Filter
  • \Folder\ShellEx\DragDropHandlers corpus 2 (sigma 2)
  • \Folder\ShellEx\ExtShellFolderViews corpus 2 (sigma 2)
  • \Folder\Shellex\ColumnHandlers corpus 2 (sigma 2)
  • \ShellEx\ContextMenuHandlers corpus 2 (sigma 2)
  • \ShellEx\PropertySheetHandlers corpus 2 (sigma 2)
  • \Software\Classes