Detection rules › Splunk

Modify Exchange Access Settings (PowerShell)

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

Set-CASMailbox cmdlet to configure client access settings on a mailbox. For example, you can configure settings for Exchange ActiveSync, Outlook, Outlook on the web, POP3, and IMAP4. Attacker added their own devices as allowed IDs for active sync

MITRE ATT&CK coverage

References

Event coverage

Rule body yaml

id: '5696.5958'
title: Modify Exchange Access Settings
description: 'Set-CASMailbox cmdlet to configure client access settings on a mailbox.
  For example, you can configure settings for Exchange ActiveSync, Outlook, Outlook
  on the web, POP3, and IMAP4. Attacker added their own devices as allowed IDs for
  active sync. - Threat Actor Association: APT29/Nobelium/Cozy Bear'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_powershell` (TERM(EventCode=4104) OR
  TERM(EventCode=4103)) TERM(Set-CASMailbox) | table _time, host, user signature_id,
  process, process_* `group_events("host",1s)` '
techniques:
- execution:command and scripting interpreter:powershell
technique_id:
- T1059.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: table

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

Stage 3: bucket

bucket _time

Stage 4: 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)

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"Set-CASMailbox"