Detection rules › Splunk

Exchange New Export Request (PowerShell)

Group by
_time, host
Source
github.com/anvilogic-forge/armory

This use case looks for exchange cmdlet to output email into a pst file. Adversaries may use these commands in order to exfiltrate sensitive information. - Threat Group Association: APT, 29, APT31, CL-STA-0043

MITRE ATT&CK coverage

References

Event coverage

Rule body yaml

id: '5694.5956'
title: Exchange New Export Request
description: 'This use case looks for exchange cmdlet to output email into a pst file.
  Adversaries may use these commands in order to exfiltrate sensitive information.
  - Threat Group Association: APT, 29, APT31, CL-STA-0043 - Software Association:
  ALPHV/BlackCat, Conti, Hafnium, Qakbot/Qbot, SEABORGIUM'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_powershell` (TERM(EventCode=4104) OR
  TERM(EventCode=4103)) TERM(New-MailboxExportRequest) | regex process="(?i)-FilePath.{1,}\.pst"
  | table _time, host, user signature_id, process, process_* `group_events("host",1s)` '
techniques:
- collection:email collection:local email collection
- collection:email collection:remote email collection
technique_id:
- T1114.002
- T1114.001
data_category:
- PowerShell logs
- Process command-line parameters
references:
- https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/

Stages and Predicates

Stage 1: search

search EventCode=4103 EventCode=4104 source="*" source IN ("WinEventLog:Microsoft-Windows-PowerShell/Operational", "WinEventLog:Windows", "XmlWinEventLog:Microsoft-Windows-PowerShell/Operational")

Stage 2: regex

regex match(process, "(?i)-FilePath.{1,}\.pst")

Stage 3: table

table _time, host, process, process_*, signature_id, user

Stage 4: bucket

bucket _time

Stage 5: stats

stats BY host, _time

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
EventCodeeq
  • 4103 corpus 105 (splunk 105)
  • 4104 corpus 268 (splunk 268)
processregex_match
  • "(?i)-FilePath.{1,}.pst"

Search terms

Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.

StageTerm
1TERM
1TERM
1"New-MailboxExportRequest"