Detection rules › Sigma

Potential Credential Dumping Via WER

Status
test
Severity
high
Log source
product windows, category process_creation
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

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1003.001 OS Credential Dumping: LSASS Memory

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

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

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
ParentImageeqC:\Windows\System32\lsass.exe

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
  • -ip
  • -s corpus 4 (sigma 3, splunk 1)
  • -u -p
Imageends_with
  • \Werfault.exe corpus 9 (sigma 9)
OriginalFileNameeq
  • WerFault.exe corpus 2 (sigma 2)
ParentUsermatch
  • AUTHORI corpus 2 (sigma 2)
  • AUTORI corpus 2 (sigma 2)
Usermatch
  • AUTHORI corpus 14 (sigma 14)
  • AUTORI corpus 14 (sigma 14)