Detection rules › Sigma

Exchange server impersonation via PrivExchange relay attack

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

Detects scenarios where an attacker relays Exchange server authentication to abuse Exchange servers permissions and escalate privileges.

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Exchange server impersonation via PrivExchange relay attack
description: Detects scenarios where an attacker relays Exchange server authentication to abuse Exchange servers permissions and escalate privileges.
references:
- https://dirkjanm.io/abusing-exchange-one-api-call-away-from-domain-admin/
- https://twitter.com/_dirkjan/status/1091632489561575424?s=20
tags:
- attack.credential_access
- attack.t1557.001
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4624
    AuthenticationPackageName: NTLM
    LogonProcessName: NtLmSsp
    LogonType: 3
    Computer: '%domain_controllers%' # Logon event has to be generated on a DC
    TargetUserName: # Exchange server HOSTNAMES list + "$"
      - SRVEXCH01$
      - SRVEXCH02$
      - SRVEXCH03$
  filter:
    IpAddress: '%exchange_server_ips%' # Source has to be attacker relay
  condition: selection and not filter
falsepositives:
- None
level: high

Stages and Predicates

Stage 0: condition

selection and not filter

Stage 1: selection

selection:
  EventID: 4624
  AuthenticationPackageName: NTLM
  LogonProcessName: NtLmSsp
  LogonType: 3
  Computer: '%domain_controllers%'
  TargetUserName:
    - SRVEXCH01$
    - SRVEXCH02$
    - SRVEXCH03$

Stage 2: not filter

filter:
  IpAddress: '%exchange_server_ips%'

Exclusions

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

FieldKindExcluded values
IpAddresseq%exchange_server_ips%

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
AuthenticationPackageNameeq
  • NTLM corpus 9 (sigma 5, elastic 2, splunk 1, kusto 1)
Computereq
  • %domain_controllers% corpus 3 (sigma 3)
LogonProcessNameeq
  • NtLmSsp corpus 2 (sigma 2)
LogonTypeeq
  • 3 corpus 40 (splunk 13, sigma 12, elastic 9, kusto 6)
TargetUserNameeq
  • SRVEXCH01$
  • SRVEXCH02$
  • SRVEXCH03$