Detection rules › Sigma

Potential Credential Dumping Via WER

Status
test
Severity
high
Log source
category process_creation, product windows
Author
@pbssubhash , Nasreddine Bencherchali
Source
github.com/SigmaHQ/sigma

Detects potential credential dumping via Windows Error Reporting LSASS Shtinkering technique which uses the Windows Error Reporting to dump lsass

Known false positives

  • Windows Error Reporting might produce similar behavior. In that case, check the PID associated with the "-p" parameter in the CommandLine.

MITRE ATT&CK coverage

TacticTechniques
Credential Access

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Potential Credential Dumping Via WER
id: 9a4ccd1a-3526-4d99-b980-9f9c5d3a6ff3
status: test
description: Detects potential credential dumping via Windows Error Reporting LSASS Shtinkering technique which uses the Windows Error Reporting to dump lsass
references:
    - https://github.com/deepinstinct/Lsass-Shtinkering
    - https://media.defcon.org/DEF%20CON%2030/DEF%20CON%2030%20presentations/Asaf%20Gilboa%20-%20LSASS%20Shtinkering%20Abusing%20Windows%20Error%20Reporting%20to%20Dump%20LSASS.pdf
author: '@pbssubhash , Nasreddine Bencherchali'
date: 2022-12-08
modified: 2022-12-09
tags:
    - attack.credential-access
    - attack.t1003.001
logsource:
    product: windows
    category: process_creation
detection:
    selection_img:
        - Image|endswith: '\Werfault.exe'
        - OriginalFileName: 'WerFault.exe'
    selection_cli:
        ParentUser|contains: # covers many language settings
            - 'AUTHORI'
            - 'AUTORI'
        User|contains:
            - 'AUTHORI'
            - 'AUTORI'
        CommandLine|contains|all:
            # Doc: WerFault.exe -u -p <target process> -ip <source process> -s <file mapping handle>
            # Example: C:\Windows\system32\Werfault.exe -u -p 744 -ip 1112 -s 244
            # If the source process is not equal to the target process and the target process is LSASS then this is an indication of this technique
            # Example: If the "-p" points the PID of "lsass.exe" and "-ip" points to a different process than "lsass.exe" then this is a sign of malicious activity
            - ' -u -p '
            - ' -ip '
            - ' -s '
    filter_lsass:
        ParentImage: 'C:\Windows\System32\lsass.exe'
    condition: all of selection_* and not 1 of filter_*
falsepositives:
    - Windows Error Reporting might produce similar behavior. In that case, check the PID associated with the "-p" parameter in the CommandLine.
level: high

Stages and Predicates

Stage 0: condition

all of selection_* and not 1 of filter_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\Werfault.exe'
    - OriginalFileName: 'WerFault.exe'

Stage 2: selection_cli

selection_cli:
    ParentUser|contains:
        - 'AUTHORI'
        - 'AUTORI'
    User|contains:
        - 'AUTHORI'
        - 'AUTORI'
    CommandLine|contains|all:
        - ' -u -p '
        - ' -ip '
        - ' -s '

Stage 3: not filter_lsass

filter_lsass:
    ParentImage: 'C:\Windows\System32\lsass.exe'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
ParentImageeqC:\Windows\System32\lsass.exeexcludes:ParentImage field:"ParentImage" value:"C:\Windows\System32\lsass.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • -ip
  • -s corpus 4 (sigma 3, splunk 1)
  • -u -p
field:"CommandLine" kind:match
Imageends_with
  • \Werfault.exe corpus 8 (sigma 8)
field:"Image" kind:ends_with value:"\Werfault.exe"
OriginalFileNameeq
  • WerFault.exe corpus 3 (sigma 2, elastic 1)
field:"OriginalFileName" kind:eq value:"WerFault.exe"
ParentUsermatch
  • AUTHORI corpus 2 (sigma 2)
  • AUTORI corpus 2 (sigma 2)
field:"ParentUser" kind:match
Usermatch
  • AUTHORI corpus 14 (sigma 14)
  • AUTORI corpus 14 (sigma 14)
field:"user" kind:match