Detection rules › Sigma

HackTool - CrackMapExec Process Patterns

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects suspicious process patterns found in logs when CrackMapExec is used

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1003.001 OS Credential Dumping: LSASS Memory

Event coverage

Rule body yaml

title: HackTool - CrackMapExec Process Patterns
id: f26307d8-14cd-47e3-a26b-4b4769f24af6
status: test
description: Detects suspicious process patterns found in logs when CrackMapExec is used
references:
    - https://mpgn.gitbook.io/crackmapexec/smb-protocol/obtaining-credentials/dump-lsass
author: Florian Roth (Nextron Systems)
date: 2022-03-12
modified: 2023-02-13
tags:
    - attack.credential-access
    - attack.t1003.001
logsource:
    product: windows
    category: process_creation
detection:
    selection_lsass_dump1:
        CommandLine|contains|all:
            - 'tasklist /fi '
            - 'Imagename eq lsass.exe'
        CommandLine|contains:
            - 'cmd.exe /c '
            - 'cmd.exe /r '
            - 'cmd.exe /k '
            - 'cmd /c '
            - 'cmd /r '
            - 'cmd /k '
        User|contains: # covers many language settings
            - 'AUTHORI'
            - 'AUTORI'
    selection_lsass_dump2:
        CommandLine|contains|all:
            - 'do rundll32.exe C:\windows\System32\comsvcs.dll, MiniDump'
            - '\Windows\Temp\'
            - ' full'
            - '%%B'
    selection_procdump:
        CommandLine|contains|all:
            - 'tasklist /v /fo csv'
            - 'findstr /i "lsass"'
    condition: 1 of selection*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

1 of selection*

Stage 1: selection_lsass_dump1

selection_lsass_dump1:
    CommandLine|contains|all:
        - 'tasklist /fi '
        - 'Imagename eq lsass.exe'
    CommandLine|contains:
        - 'cmd.exe /c '
        - 'cmd.exe /r '
        - 'cmd.exe /k '
        - 'cmd /c '
        - 'cmd /r '
        - 'cmd /k '
    User|contains:
        - 'AUTHORI'
        - 'AUTORI'

Stage 2: selection_lsass_dump2

selection_lsass_dump2:
    CommandLine|contains|all:
        - 'do rundll32.exe C:\windows\System32\comsvcs.dll, MiniDump'
        - '\Windows\Temp\'
        - ' full'
        - '%%B'

Stage 3: selection_procdump

selection_procdump:
    CommandLine|contains|all:
        - 'tasklist /v /fo csv'
        - 'findstr /i "lsass"'

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
  • full corpus 3 (sigma 3)
  • %%B
  • Imagename eq lsass.exe
  • \Windows\Temp\ corpus 12 (sigma 12)
  • cmd /c corpus 4 (sigma 4)
  • cmd /k corpus 4 (sigma 4)
  • cmd /r corpus 4 (sigma 4)
  • cmd.exe /c corpus 6 (sigma 6)
  • cmd.exe /k corpus 5 (sigma 5)
  • cmd.exe /r corpus 5 (sigma 5)
  • do rundll32.exe C:\windows\System32\comsvcs.dll, MiniDump
  • findstr /i "lsass"
  • tasklist /fi
  • tasklist /v /fo csv
Usermatch
  • AUTHORI corpus 14 (sigma 14)
  • AUTORI corpus 14 (sigma 14)