Detection rules › Splunk
Common Exchange Recon cmdlets (PowerShell)
Detect Common Exchange cmdlet reconnaissance commands used by attackers in order to collect information and/or to spread malware within the network after gaining access to a machine
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Discovery |
References
Telemetry coverage
Rule body
id: '5693.5955'
title: Common Exchange Recon cmdlets
description: 'Detect Common Exchange cmdlet reconnaissance commands used by attackers
in order to collect information and/or to spread malware within the network after
gaining access to a machine. - Threat Actor Association: APT29/Nobelium/Cozy Bear,
CL-STA-0043 - Software Association: DatopLoader'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_powershell` (TERM(EventCode=4104) OR
TERM(EventCode=4103)) (TERM(Get-AcceptedDomain) OR TERM(Get-CASMailbox) TERM(Get-Mailbox)
OR TERM(Get-ManagementRoleAssignment) OR TERM(Get-OrganizationConfig) OR TERM(Get-MailboxExportRequest)
OR TERM(Get-OwaVirtualDirectory) OR TERM(Get-WebServicesVirtualDirectory) OR TERM(Get-MailboxRegionalConfiguration)
OR TERM(Get-ExchangeServer) OR TERM(Get-InboxRule) OR TERM(Get-MailboxPermission))
| table _time, host, user signature_id, process, process_* `group_events("host",1s)` '
techniques:
- execution:command and scripting interpreter:powershell
- discovery:account discovery:email account
technique_id:
- T1087.003
- 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
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq |
Search terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "Get-AcceptedDomain" |
| 1 | "Get-CASMailbox" |
| 1 | "Get-Mailbox" |
| 1 | "Get-ManagementRoleAssignment" |
| 1 | "Get-OrganizationConfig" |
| 1 | "Get-MailboxExportRequest" |
| 1 | "Get-OwaVirtualDirectory" |
| 1 | "Get-WebServicesVirtualDirectory" |
| 1 | "Get-MailboxRegionalConfiguration" |
| 1 | "Get-ExchangeServer" |
| 1 | "Get-InboxRule" |
| 1 | "Get-MailboxPermission" |