Detection rules › Sigma

Sticky key sethc file failed replacement

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

Detects scenarios where an attacker failed to replace the original sethc.exe file by cmd.exe.

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Sticky key sethc file failed replacement
description: Detects scenarios where an attacker failed to replace the original sethc.exe file by cmd.exe.
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
tags:
- attack.privilege_escalation
- attack.t1546.008
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  service: security
detection:
  selection: # No ID 4688 will be triggered if access is denied
    EventID: 4656
    ObjectServer: Security
    ObjectType: File
    ObjectName|endswith: 'sethc.exe'
    ProcessName|endswith: 'cmd.exe'
    EventType: AUDIT_FAILURE
    AccessReason|contains: '%4417: %%1805' # WriteData (or AddFile):  Not granted
  condition: selection
falsepositives:
- None
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
  EventID: 4656
  ObjectServer: Security
  ObjectType: File
  ObjectName|endswith: 'sethc.exe'
  ProcessName|endswith: 'cmd.exe'
  EventType: AUDIT_FAILURE
  AccessReason|contains: '%4417: %%1805'

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
AccessReasonmatch
  • %4417: %%1805
EventTypeeq
  • AUDIT_FAILURE
ObjectNameends_with
  • sethc.exe
ObjectServereq
  • Security corpus 5 (sigma 5)
ObjectTypeeq
  • File corpus 10 (sigma 8, splunk 2)
ProcessNameends_with
  • cmd.exe corpus 2 (sigma 1, splunk 1)