Detection rules › Sigma

Potential Privilege Escalation via Service Permissions Weakness

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Teymur Kheirkhabarov
Source
github.com/SigmaHQ/sigma

Detect modification of services configuration (ImagePath, FailureCommand and ServiceDLL) in registry by processes with Medium integrity level

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Potential Privilege Escalation via Service Permissions Weakness
id: 0f9c21f1-6a73-4b0e-9809-cb562cb8d981
status: test
description: Detect modification of services configuration (ImagePath, FailureCommand and ServiceDLL) in registry by processes with Medium integrity level
references:
    - https://speakerdeck.com/heirhabarov/hunting-for-privilege-escalation-in-windows-environment
    - https://pentestlab.blog/2017/03/31/insecure-registry-permissions/
author: Teymur Kheirkhabarov
date: 2019-10-26
modified: 2024-12-01
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.execution
    - attack.stealth
    - attack.t1574.011
logsource:
    product: windows
    category: process_creation
detection:
    selection:
        IntegrityLevel:
            - 'Medium'
            - 'S-1-16-8192'
        CommandLine|contains|all:
            - 'ControlSet'
            - 'services'
        CommandLine|contains:
            - '\ImagePath'
            - '\FailureCommand'
            - '\ServiceDll'
    condition: selection
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    IntegrityLevel:
        - 'Medium'
        - 'S-1-16-8192'
    CommandLine|contains|all:
        - 'ControlSet'
        - 'services'
    CommandLine|contains:
        - '\ImagePath'
        - '\FailureCommand'
        - '\ServiceDll'

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
  • ControlSet corpus 3 (sigma 3)
  • \FailureCommand
  • \ImagePath
  • \ServiceDll
  • services corpus 3 (sigma 2, splunk 1)
IntegrityLeveleq
  • Medium corpus 3 (sigma 3)
  • S-1-16-8192 corpus 3 (sigma 3)