Detection rules › Sigma

Potential SAM database user credentials dumped with DCshadow

Status
experimental
Severity
high
Log source
product windows, service security
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker would dump user passwords using the DCshadow attack.

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1003.001 OS Credential Dumping: LSASS Memory

Event coverage

Rule body yaml

title: Potential SAM database user credentials dumped with DCshadow
description: Detects scenarios where an attacker would dump user passwords using the DCshadow attack.
correlation: correlate TargetLogonId from ID 4624 with SubjectLogonId from ID 4661 to identify the source of the enumeration.
requirements: extended rights auditing enabled (https://www.manageengine.com/products/active-directory-audit/active-directory-auditing-configuration-guide-configure-object-level-auditing-manually.html)
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0006-Credential%20Access/T1003-Credential%20dumping
- https://www.ired.team/offensive-security-experiments/active-directory-kerberos-abuse/t1207-creating-rogue-domain-controllers-with-dcshadow
- https://medium.com/@maarten.goet/dcshadow-detecting-a-rogue-domain-controller-replicating-malicious-changes-to-your-active-1e22440df9ad
- https://github.com/AlsidOfficial/UncoverDCShadow
- https://github.com/shellster/DCSYNCMonitor
- https://blog.alsid.eu/dcshadow-explained-4510f52fc19d
- https://stealthbits.com/blog/detecting-dcshadow-with-event-logs/
- https://www.labofapenetrationtester.com/2018/05/dcshadow-sacl.html
- https://blog.stealthbits.com/creating-persistence-with-dcshadow/
- https://book.hacktricks.xyz/windows/active-directory-methodology/dcshadow
tags:
- attack.credential_access
- attack.t1003.001
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4661
    SubjectUserSid: S-1-5-18
    ProcessName|endswith: '\lsass.exe'
    ObjectServer: Security Account Manager
    ObjectType:
      - SAM_SERVER
      - SAM_DOMAIN
    ObjectName|startswith:
      - CN=
      - DC=
    AccessList|contains|all:
      - '%%5392' # ReadPasswordParameters
      - '%%5447' # SetPassword
  condition: selection | count(ObjectName) by Computer > 10
falsepositives:
- None
level: high

Stages and Predicates

Stage 0: condition

selection | count(ObjectName) by Computer > 10

Stage 1: selection

selection:
  EventID: 4661
  SubjectUserSid: S-1-5-18
  ProcessName|endswith: '\lsass.exe'
  ObjectServer: Security Account Manager
  ObjectType:
    - SAM_SERVER
    - SAM_DOMAIN
  ObjectName|startswith:
    - CN=
    - DC=
  AccessList|contains|all:
    - '%%5392'
    - '%%5447'
Threshold
> 10

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
AccessListmatch
  • %%5392 corpus 2 (sigma 2)
  • %%5447 corpus 2 (sigma 2)
ObjectNamestarts_with
  • CN=
  • DC= corpus 2 (sigma 2)
ObjectServereq
  • Security Account Manager corpus 7 (sigma 7)
ObjectTypeeq
  • SAM_DOMAIN corpus 3 (sigma 3)
  • SAM_SERVER
ProcessNameends_with
  • \lsass.exe corpus 7 (sigma 7)
SubjectUserSideq
  • S-1-5-18 corpus 4 (sigma 2, elastic 1, splunk 1)