T1070.008 Sumo Logic CSE · Sumo

Detect Clear Mailbox Data in Sumo Logic CSE

Adversaries may modify mail and mail application data to remove evidence of their activity. Email applications allow users and other programs to export and delete mailbox data via command line tools or use of APIs. Adversaries may use Exchange PowerShell cmdlets (e.g., Remove-MailboxExportRequest, Search-Mailbox with DeleteContent), O365/Graph API calls, or command-line mail utilities on Linux/macOS to delete emails, purge Deleted Items, remove sent items, wipe transport rules, or remove export request logs. This covers tracks from phishing delivery, internal spearphishing, email-based C2, and email exfiltration.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1070 Indicator Removal
Sub-technique
T1070.008 Clear Mailbox Data
Canonical reference
https://attack.mitre.org/techniques/T1070/008/

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
(_sourceCategory="Windows/EventLogs" OR _sourceCategory="endpoint/windows/sysmon")
| where EventID in ("4688", "1")
| parse field=CommandLine "*" as cmd
| eval cmd_lower = toLowerCase(cmd)
| where Image matches "*powershell.exe" OR Image matches "*pwsh.exe"
| eval remove_export     = if(cmd_lower matches "*remove-mailboxexportrequest*", 1, 0)
| eval search_delete     = if(cmd_lower matches "*search-mailbox*" AND cmd_lower matches "*-deletecontent*", 1, 0)
| eval remove_transport  = if(cmd_lower matches "*remove-transportrule*" OR cmd_lower matches "*disable-transportrule*" OR cmd_lower matches "*new-transportrule*", 1, 0)
| eval inbox_rule_manip  = if(cmd_lower matches "*remove-inboxrule*" OR cmd_lower matches "*set-inboxrule*" OR cmd_lower matches "*new-inboxrule*", 1, 0)
| eval purge_content     = if(cmd_lower matches "*-purgetype harddelete*" OR cmd_lower matches "*-purgetype softdelete*" OR cmd_lower matches "*purgeallitems*", 1, 0)
| eval remove_move_req   = if(cmd_lower matches "*remove-moverequest*", 1, 0)
| eval compliance_search = if(cmd_lower matches "*new-compliancesearchaction*" OR cmd_lower matches "*remove-compliancesearch*", 1, 0)
| eval recoverable_clean = if(cmd_lower matches "*remove-recoverableitemscleanup*", 1, 0)
| eval suspicion_score = remove_export + search_delete + remove_transport + inbox_rule_manip + purge_content + remove_move_req + compliance_search + recoverable_clean
| where suspicion_score > 0
| fields _messageTime, hostname, User, Image, cmd, remove_export, search_delete, remove_transport, inbox_rule_manip, purge_content, remove_move_req, compliance_search, recoverable_clean, suspicion_score
| sort by suspicion_score desc, _messageTime desc
high severity high confidence

Detects Exchange PowerShell cmdlet abuse for mailbox data clearing aligned with T1070.008. Parses Windows Security and Sysmon process creation events to score command lines against known Exchange mailbox cover-track operations including export request removal, hard-delete purges, transport rule wipes, and recoverable items cleanup.

Data Sources

Windows Security Event Log (EventID 4688)Sysmon Process Creation (EventID 1)Windows endpoint telemetry via Sumo Logic collector

Required Tables

Windows/EventLogs source categoryendpoint/windows/sysmon source category

False Positives & Tuning

  • IT automation pipelines that clean up stale mailbox export requests after successful archive migrations or PST exports
  • Security operations center workflows using Search-Mailbox -DeleteContent under formal legal hold release or data subject access request fulfillment
  • Exchange hybrid migration scripts that remove move requests and reconfigure transport rules as part of batch cutover operations
Download portable Sigma rule (.yml)

Other platforms for T1070.008


Testing Methodology

Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Remove Mailbox Export Request via Exchange PowerShell

    Expected signal: Sysmon Event ID 1: powershell.exe with CommandLine containing 'Remove-MailboxExportRequest'. Office 365 Unified Audit Log: RecordType=ExchangeAdmin, Operation=New-MailboxExportRequest followed by Remove-MailboxExportRequest from same UserId. Exchange Admin Audit Log entries for both operations. PowerShell ScriptBlock Log (Event ID 4104) with full cmdlet invocation.

  2. Test 2Search-Mailbox with DeleteContent to Purge Emails

    Expected signal: Sysmon Event ID 1: powershell.exe with CommandLine containing 'Search-Mailbox' and '-DeleteContent'. Windows Security Event ID 4688 (if enabled) with same details. PowerShell ScriptBlock Log (Event ID 4104) capturing full cmdlet with all parameters. Exchange Admin Audit Log entry with full command details.

  3. Test 3Create Suppression Transport Rule to Delete Security Notifications

    Expected signal: Sysmon Event ID 1: powershell.exe with CommandLine containing 'New-TransportRule' and 'DeleteMessage'. Office 365 Unified Audit Log / Exchange Admin Audit Log: RecordType=ExchangeAdmin, Operation=New-TransportRule with full rule parameters. PowerShell ScriptBlock Log (Event ID 4104) with complete rule definition including -DeleteMessage flag.

  4. Test 4Delete Emails via Linux mail Command

    Expected signal: Linux auditd: execve syscall for 'mail' binary with arguments containing 'd' (delete) flag. Syslog: process invocation of /usr/bin/mail or /bin/mail. If Sysmon for Linux is deployed: ProcessCreate event with Image=/usr/bin/mail and CommandLine containing delete arguments.

  5. Test 5Remove Inbox Rule to Cover Tracks After Rule-Based Exfiltration

    Expected signal: Sysmon Event ID 1: powershell.exe with CommandLine containing 'Remove-InboxRule'. Exchange Admin Audit Log and O365 Unified Audit Log: Operations New-InboxRule then Remove-InboxRule from same account. PowerShell ScriptBlock Log (Event ID 4104) capturing both rule creation and removal. If alerting on New-InboxRule, the forwarding rule creation would also trigger separately.

Unlock Pro Content

Get the full detection package for T1070.008 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections