T1070.008 IBM QRadar · QRadar

Detect Clear Mailbox Data in IBM QRadar

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/

QRadar Detection Query

IBM QRadar (QRadar)
sql
SELECT
  DATEFORMAT(starttime, 'YYYY-MM-dd HH:mm:ss') AS event_time,
  sourceip,
  username,
  QIDNAME(qid) AS event_name,
  CATEGORYNAME(category) AS category_name,
  "Process CommandLine" AS command_line,
  "Process Name" AS process_name,
  devicehostname AS hostname,
  LOGSOURCENAME(deviceid) AS log_source
FROM events
WHERE
  LOGSOURCETYPEID(deviceid) IN (12, 13, 352)
  AND starttime > (CURRENT_TIMESTAMP - 86400000)
  AND (
    LOWER("Process CommandLine") LIKE '%remove-mailboxexportrequest%'
    OR LOWER("Process CommandLine") LIKE '%remove-mailboximportrequest%'
    OR (LOWER("Process CommandLine") LIKE '%search-mailbox%' AND LOWER("Process CommandLine") LIKE '%-deletecontent%')
    OR LOWER("Process CommandLine") LIKE '%remove-transportrule%'
    OR LOWER("Process CommandLine") LIKE '%disable-transportrule%'
    OR LOWER("Process CommandLine") LIKE '%new-transportrule%'
    OR LOWER("Process CommandLine") LIKE '%remove-inboxrule%'
    OR LOWER("Process CommandLine") LIKE '%set-inboxrule%'
    OR LOWER("Process CommandLine") LIKE '%new-inboxrule%'
    OR LOWER("Process CommandLine") LIKE '%new-compliancesearchaction%'
    OR LOWER("Process CommandLine") LIKE '%remove-moverequest%'
    OR LOWER("Process CommandLine") LIKE '%-purgetype harddelete%'
    OR LOWER("Process CommandLine") LIKE '%-purgetype softdelete%'
    OR LOWER("Process CommandLine") LIKE '%remove-recoverableitemscleanup%'
  )
  AND LOWER("Process Name") IN ('powershell.exe', 'pwsh.exe')
ORDER BY starttime DESC
high severity high confidence

Detects Exchange PowerShell cmdlets for mailbox data clearing and evidence destruction (T1070.008). Queries process creation events from Windows Security/Sysmon log sources where PowerShell command lines contain Exchange management commands targeting mailbox exports, transport rules, inbox rules, or hard-delete purge operations.

Data Sources

Windows Security Audit Log (EventID 4688)Sysmon Process Create eventsMicrosoft Windows DSM (QRadar Windows log source)

Required Tables

events

False Positives & Tuning

  • Scheduled Exchange maintenance scripts run by Exchange administrators during off-hours for export request cleanup
  • Automated compliance workflows that perform mailbox searches with deletion as part of GDPR or data retention enforcement
  • Helpdesk or O365 admin onboarding/offboarding runbooks that remove inbox rules and transport rules during account lifecycle management
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