Detection rules › Sigma

Abused Debug Privilege by Arbitrary Parent Processes

Status
test
Severity
high
Log source
category process_creation, product windows
Author
Semanur Guneysu @semanurtg, oscd.community
Source
github.com/SigmaHQ/sigma

Detection of unusual child processes by different system processes

MITRE ATT&CK coverage

TacticTechniques
Privilege Escalation

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Abused Debug Privilege by Arbitrary Parent Processes
id: d522eca2-2973-4391-a3e0-ef0374321dae
status: test
description: Detection of unusual child processes by different system processes
references:
    - https://image.slidesharecdn.com/kheirkhabarovoffzonefinal-181117201458/95/hunting-for-privilege-escalation-in-windows-environment-74-638.jpg
author: 'Semanur Guneysu @semanurtg, oscd.community'
date: 2020-10-28
modified: 2022-11-11
tags:
    - attack.privilege-escalation
    - attack.t1548
logsource:
    product: windows
    category: process_creation
detection:
    selection_parent:
        ParentImage|endswith:
            - '\winlogon.exe'
            - '\services.exe'
            - '\lsass.exe'
            - '\csrss.exe'
            - '\smss.exe'
            - '\wininit.exe'
            - '\spoolsv.exe'
            - '\searchindexer.exe'
        User|contains: # covers many language settings
            - 'AUTHORI'
            - 'AUTORI'
    selection_img:
        - Image|endswith:
              - '\powershell.exe'
              - '\pwsh.exe'
              - '\cmd.exe'
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'pwsh.dll'
              - 'Cmd.Exe'
    filter:
        CommandLine|contains|all:
            - ' route '
            - ' ADD '
    condition: all of selection_* and not filter
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection_* and not filter

Stage 1: selection_parent

selection_parent:
    ParentImage|endswith:
        - '\winlogon.exe'
        - '\services.exe'
        - '\lsass.exe'
        - '\csrss.exe'
        - '\smss.exe'
        - '\wininit.exe'
        - '\spoolsv.exe'
        - '\searchindexer.exe'
    User|contains:
        - 'AUTHORI'
        - 'AUTORI'

Stage 2: selection_img

selection_img:
    - Image|endswith:
          - '\powershell.exe'
          - '\pwsh.exe'
          - '\cmd.exe'
    - OriginalFileName:
          - 'PowerShell.EXE'
          - 'pwsh.dll'
          - 'Cmd.Exe'

Stage 3: not filter

filter:
    CommandLine|contains|all:
        - ' route '
        - ' ADD '

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
CommandLinematch ADD excludes:CommandLine field:"CommandLine" value:" ADD "
CommandLinematch route excludes:CommandLine field:"CommandLine" value:" route "

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageends_with
  • \cmd.exe corpus 130 (sigma 130)
  • \powershell.exe corpus 179 (sigma 178, kusto 1)
  • \pwsh.exe corpus 165 (sigma 164, kusto 1)
field:"Image" kind:ends_with
OriginalFileNameeq
  • Cmd.Exe corpus 81 (sigma 43, elastic 21, splunk 17)
  • PowerShell.EXE corpus 138 (sigma 84, splunk 30, elastic 24)
  • pwsh.dll corpus 112 (sigma 79, splunk 30, elastic 3)
field:"OriginalFileName" kind:eq
ParentImageends_with
  • \csrss.exe corpus 3 (sigma 3)
  • \lsass.exe corpus 3 (sigma 3)
  • \searchindexer.exe corpus 3 (sigma 3)
  • \services.exe corpus 8 (sigma 8)
  • \smss.exe corpus 2 (sigma 2)
  • \spoolsv.exe corpus 5 (sigma 5)
  • \wininit.exe corpus 2 (sigma 2)
  • \winlogon.exe corpus 5 (sigma 5)
field:"ParentImage" kind:ends_with
Usermatch
  • AUTHORI corpus 14 (sigma 14)
  • AUTORI corpus 14 (sigma 14)
field:"user" kind:match