Detection rules › Sigma

Stickey key called CMD via command execution

Status
experimental
Severity
high
Log source
category process_creation, product windows
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker calls the stickey key and execute CMD.

Known false positives

  • None

MITRE ATT&CK coverage

Telemetry coverage

Rule body

title: Stickey key called CMD via command execution
description: Detects scenarios where an attacker calls the stickey key and execute CMD.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0004-Privilege%20Escalation/T1546-Image%20File%20Execution%20Options%20Injection
- https://blogs.technet.microsoft.com/jonathantrull/2016/10/03/detecting-sticky-key-backdoors/
- https://www.mandiant.com/resources/apt29-domain-frontin
- https://www.clearskysec.com/wp-content/uploads/2020/02/ClearSky-Fox-Kitten-Campaign-v1.pdf
- https://blog.talosintelligence.com/2022/08/recent-cyber-attack.html?m=1
tags:
- attack.privilege_escalation
- attack.t1546.008
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  category: process_creation
detection:
  selection_process:
    EventID: 4688
    Version: 2  # parent process name is available starting Windows 10 / Server 2016 and higher
    ParentProcessName|endswith: \winlogon.exe

  selection_sysmon:
    EventID: 1
    ParentImage|endswith: \winlogon.exe

  selection_command_line:
    CommandLine|contains: cmd
    CommandLine|contains:
      - sethc.exe
      - utilman.exe
      - osk.exe
      - Magnify.exe
      - Narrator.exe
      - DisplaySwitch.exe
  condition: (selection_process or selection_sysmon) and selection_command_line
falsepositives:
- None
level: high

Stages and Predicates

Stage 0: condition

(selection_process or selection_sysmon) and selection_command_line

Stage 1: selection_process

selection_process:
  EventID: 4688
  Version: 2
  ParentProcessName|endswith: \winlogon.exe

Stage 2: selection_sysmon

selection_sysmon:
  EventID: 1
  ParentImage|endswith: \winlogon.exe

Stage 3: selection_command_line

selection_command_line:
  CommandLine|contains: cmd
  CommandLine|contains:
    - sethc.exe
    - utilman.exe
    - osk.exe
    - Magnify.exe
    - Narrator.exe
    - DisplaySwitch.exe

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • DisplaySwitch.exe corpus 3 (sigma 3)
  • Magnify.exe corpus 3 (sigma 3)
  • Narrator.exe corpus 3 (sigma 3)
  • osk.exe corpus 3 (sigma 3)
  • sethc.exe corpus 4 (sigma 4)
  • utilman.exe corpus 3 (sigma 3)
field:"CommandLine" kind:match
ParentImageends_with
  • \winlogon.exe corpus 5 (sigma 5)
field:"ParentImage" kind:ends_with value:"\winlogon.exe"
ParentProcessNameends_with
  • \winlogon.exe
field:"parent_process_name" kind:ends_with value:"\winlogon.exe"
Versioneq
  • 2 corpus 7 (sigma 7)
field:"Version" kind:eq value:"2"