← Back to SOC feed Coverage →

HostExportingMailboxAndRemovingExport[Solarigate]

kql MEDIUM Azure-Sentinel
DeviceProcessEvents
backdoorhuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-07T11:00:00Z · Confidence: medium

Hunt Hypothesis

Hosts exporting a mailbox from an on-prem Exchange server and subsequently removing the export may indicate exfiltration of sensitive data by an adversary. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect potential data theft or reconnaissance activities early.

KQL Query

// Adjust the timeframe to change the window events need to occur within to alert
let timeframe = 1h;
DeviceProcessEvents
  | where FileName  in~ ("powershell.exe", "cmd.exe")
  | where ProcessCommandLine  contains 'New-MailboxExportRequest'
  | project-rename NewMailBoxExpCmd = ProcessCommandLine  
  | summarize by DeviceName , timekey = bin(Timestamp, timeframe), NewMailBoxExpCmd, AccountName 
  | join kind=inner (DeviceProcessEvents
  | where FileName in~ ("powershell.exe", "cmd.exe")
  | where ProcessCommandLine contains 'Remove-MailboxExportRequest'
  | project-rename RemoveMailBoxExpCmd = ProcessCommandLine
  | summarize by DeviceName, timekey = bin(Timestamp, timeframe), RemoveMailBoxExpCmd, AccountName) on DeviceName, timekey, AccountName
  | extend commands = pack_array(NewMailBoxExpCmd, RemoveMailBoxExpCmd)  
  | summarize by timekey, DeviceName, tostring(commands), AccountName
  | project-reorder timekey, DeviceName, AccountName, ['commands']
  | extend HostCustomEntity = DeviceName, AccountCustomEntity = AccountName

Analytic Rule Definition

id: 1a6f998a-b9a4-4030-bd58-6606d66608f9
name: HostExportingMailboxAndRemovingExport[Solarigate]
description: |
  This hunting query looks for hosts exporting a mailbox from an on-prem Exchange server, followed by
  that same host removing the export within a short time window. This pattern has been observed by attackers
  when exfiltrating emails from a target environment. A Mailbox export is unlikely to be a common command run so look for
  activity from unexpected hosts and accounts.
  Reference: https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/
  Query insprired by Azure Sentinel detection https://github.com/Azure/Azure-Sentinel/blob/master/Hunting%20Queries/SecurityEvent/HostExportingMailboxAndRemovingExport.yaml
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceProcessEvents
tactics:
- Collection
query: |
  // Adjust the timeframe to change the window events need to occur within to alert
  let timeframe = 1h;
  DeviceProcessEvents
    | where FileName  in~ ("powershell.exe", "cmd.exe")
    | where ProcessCommandLine  contains 'New-MailboxExportRequest'
    | project-rename NewMailBoxExpCmd = ProcessCommandLine  
    | summarize by DeviceName , timekey = bin(Timestamp, timeframe), NewMailBoxExpCmd, AccountName 
    | join kind=inner (DeviceProcessEvents
    | where FileName in~ ("powershell.exe", "cmd.exe")
    | where ProcessCommandLine contains 'Remove-MailboxExportRequest'
    | project-rename RemoveMailBoxExpCmd = ProcessCommandLine
    | summarize by DeviceName, timekey = bin(Timestamp, timeframe), RemoveMailBoxExpCmd, AccountName) on DeviceName, timekey, AccountName
    | extend commands = pack_array(NewMailBoxExpCmd, RemoveMailBoxExpCmd)  
    | summarize by timekey, DeviceName, tostring(commands), AccountName
    | project-reorder timekey, DeviceName, AccountName, ['commands']
    | extend HostCustomEntity = DeviceName, AccountCustomEntity = AccountName

Required Data Sources

Sentinel TableNotes
DeviceProcessEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Collection/HostExportingMailboxAndRemovingExport[Solarigate].yaml