T1070.008 CrowdStrike LogScale · LogScale

Detect Clear Mailbox Data in CrowdStrike LogScale

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/

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
#event_simpleName = "ProcessRollup2"
| ImageFileName = /(?i)(powershell\.exe|pwsh\.exe)$/
| CommandLine = /(?i)(Remove-MailboxExportRequest|Remove-MailboxImportRequest|Remove-TransportRule|Disable-TransportRule|New-TransportRule|Remove-InboxRule|Set-InboxRule|New-InboxRule|New-ComplianceSearchAction|Remove-MoveRequest|Remove-RecoverableItemsCleanup|Set-MailboxMessageConfiguration|-PurgeType\s+(Hard|Soft)Delete|Search-Mailbox.*-DeleteContent)/
| eval remove_export = if(CommandLine = /(?i)Remove-MailboxExportRequest/, 1, 0)
| eval search_delete = if(CommandLine = /(?i)Search-Mailbox/ AND CommandLine = /(?i)-DeleteContent/, 1, 0)
| eval transport_manip = if(CommandLine = /(?i)(Remove-TransportRule|Disable-TransportRule|New-TransportRule)/, 1, 0)
| eval inbox_manip = if(CommandLine = /(?i)(Remove-InboxRule|Set-InboxRule|New-InboxRule)/, 1, 0)
| eval purge_hard = if(CommandLine = /(?i)-PurgeType\s+HardDelete/, 1, 0)
| eval purge_soft = if(CommandLine = /(?i)-PurgeType\s+SoftDelete/, 1, 0)
| eval compliance_del = if(CommandLine = /(?i)(New-ComplianceSearchAction|Remove-ComplianceSearch)/, 1, 0)
| eval recoverable_wipe = if(CommandLine = /(?i)Remove-RecoverableItemsCleanup/, 1, 0)
| eval suspicion_score = remove_export + search_delete + transport_manip + inbox_manip + purge_hard + purge_soft + compliance_del + recoverable_wipe
| where suspicion_score > 0
| groupBy([ComputerName, UserName, CommandLine], function=[count(as=event_count), max(suspicion_score, as=max_score), min(@timestamp, as=first_seen), max(@timestamp, as=last_seen)])
| sort(max_score, order=desc)
high severity high confidence

CrowdStrike Falcon LogScale (CQL) query detecting Exchange PowerShell-based mailbox data clearing consistent with T1070.008. Correlates ProcessRollup2 events where PowerShell executes Exchange management cmdlets for removing mailbox export requests, purging recoverable items, wiping transport rules, and manipulating inbox rules. Scores each event by number of suspicious indicators and groups by host and user for triage.

Data Sources

CrowdStrike Falcon EDR ProcessRollup2 eventsFalcon sensor process telemetry on Exchange/management hosts

Required Tables

ProcessRollup2 event stream

False Positives & Tuning

  • Exchange hybrid configuration scripts that run Remove-MoveRequest and configure transport rules during on-premises to Exchange Online migrations
  • Automated IT runbooks triggered by ITSM ticketing systems for account deprovisioning that clean inbox rules via PowerShell as part of offboarding
  • Third-party email security tools (Proofpoint, Mimecast) that provision and deprovision transport rules via PowerShell API wrappers during policy synchronization
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