Detection rules › Sigma

Service abuse with backdoored "command failure" (Reg via command)

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

Detects scenarios where an attacker modify the configuration of a service to trigger an action when the service is crashed.

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Service abuse with backdoored "command failure" (Reg via command)
description: Detects scenarios where an attacker modify the configuration of a service to trigger an action when the service is crashed.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0003-Persistence/T1543.003-Create%20or%20Modify%20System%20Process-Windows%20Service
- https://twitter.com/JohnLaTwC/status/1432689635122159623?s=09
- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc742019(v=ws.11)
- https://pentestlab.blog/2020/01/22/persistence-modify-existing-service/
tags:
- attack.persistence
- attack.t1543.003
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  category: process_creation
detection:
  selection:
    EventID: 4688
    NewProcessName|endswith: \reg.exe
    CommandLine|contains|all: # Full command: REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time" /v FailureCommand /t REG_SZ /d "C:\tmp\pentestlab.exe"
      - REG ADD
      - '\SYSTEM\CurrentControlSet\Services\'
      - FailureCommand
  condition: selection
falsepositives:
- administrator reconfiguring service
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
  EventID: 4688
  NewProcessName|endswith: \reg.exe
  CommandLine|contains|all:
    - REG ADD
    - '\SYSTEM\CurrentControlSet\Services\'
    - FailureCommand

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
  • FailureCommand corpus 3 (sigma 3)
  • REG ADD corpus 14 (sigma 13, kusto 1)
  • \SYSTEM\CurrentControlSet\Services\ corpus 4 (sigma 4)
NewProcessNameends_with
  • \reg.exe corpus 58 (sigma 58)