Skip to content

Siemphony is in beta and still being built. How a rule earns its badge.

Siemphony’s repertoire

Mailbox export requests removed or mailbox content purged

Siemphony@siemphonylowT1070.008unverified
Matches PowerShell script block logging (EventID 4104) where the recorded block either removes the record of a mailbox export or import job, or issues a cmdlet that permanently deletes message content. The first arm needs no second gate: `Remove-MailboxExportRequest` and `Remove-MailboxImportRequest` are distinctive enough on their own, and removing the request object is the step that erases the evidence a PST was ever produced. The second arm is gated twice — a purging cmdlet (`Search-Mailbox`, `New-ComplianceSearchAction`) *and* the switch that makes it destructive (`-DeleteContent`, `-Purge`) — because both cmdlets are read-only without the switch and are run constantly for discovery. MITRE's `PowerShellCommandMatch` and `CmdletFilter` knobs name `Remove-MailboxExportRequest` and `Remove-*` actions; the purge-switch pairing is authored here. Script Block Logging is off by default and is not enabled by the Microsoft or CIS baselines, so without the *Turn on PowerShell Script Block Logging* policy this rule returns zero rows because the host is blind, not because nothing happened. Two limits are structural. 4104 records the whole block, including comments and help text, so a runbook that merely documents these cmdlets is logged identically to one that runs them. And an Exchange Online administrator working in the admin centre, through Graph, or in a session whose cmdlets execute on Microsoft's side leaves no local 4104 at all — the brief's Office Suite analytic AN0740 really lives in the unified audit log, which this brief's log source list does not contain. The brief's other Windows legs (Sysmon EventID 23 `file_delete` with `TargetFilename`, and Security 4663 with `ObjectName`/`ProcessName`) are separate feeds with their own field names and are not combined here. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0266, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full description

The detection

The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.

detection.yml

Sentinel · KQL

Run this as a search.

Event| where (EventID == 4104 and ((ScriptBlockText contains "Remove-MailboxExportRequest" or ScriptBlockText contains "Remove-MailboxImportRequest") or ((ScriptBlockText contains "Search-Mailbox" or ScriptBlockText contains "New-ComplianceSearchAction") and (ScriptBlockText contains "-DeleteContent" or ScriptBlockText contains "-Purge"))))

Splunk · SPL

Run this as a search.

index=* (EventID="4104" AND ((ScriptBlockText="*Remove-MailboxExportRequest*" OR ScriptBlockText="*Remove-MailboxImportRequest*") OR ((ScriptBlockText="*Search-Mailbox*" OR ScriptBlockText="*New-ComplianceSearchAction*") AND (ScriptBlockText="*-DeleteContent*" OR ScriptBlockText="*-Purge*"))))

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE (event.code == 4104 AND ((TO_LOWER(powershell.file.script_block_text) LIKE "*remove-mailboxexportrequest*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*remove-mailboximportrequest*") OR ((TO_LOWER(powershell.file.script_block_text) LIKE "*search-mailbox*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*new-compliancesearchaction*") AND (TO_LOWER(powershell.file.script_block_text) LIKE "*-deletecontent*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*-purge*"))))

Wazuh · XML rule

Deploy to your manager — this is a rule, not a search.

<group name="sigma,windows,">  <!-- Rule ids must be unique on your manager; 100000+ is the user range. -->  <!-- 2 rules: the Sigma condition ORs across different fields,       which one rule cannot express. Any one matching is a hit. -->  <rule id="100000" level="5">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="EventID" type="pcre2">(?i)^4104$</field>    <field name="ScriptBlockText" type="pcre2">(?i)(Remove-MailboxExportRequest|Remove-MailboxImportRequest)</field>    <description>Mailbox export requests removed or mailbox content purged (1/2)</description>    <mitre>      <id>T1070.008</id>    </mitre>  </rule>   <rule id="100001" level="5">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="EventID" type="pcre2">(?i)^4104$</field>    <field name="ScriptBlockText" type="pcre2">(?i)(Search-Mailbox|New-ComplianceSearchAction)</field>    <field name="ScriptBlockText" type="pcre2">(?i)(-DeleteContent|-Purge)</field>    <description>Mailbox export requests removed or mailbox content purged (2/2)</description>    <mitre>      <id>T1070.008</id>    </mitre>  </rule></group>

Verdicts · reactions · comments

Community

Verdicts from engineers who actually deployed it, and the conversation around it.

Log in to react
Not yet reported on

Nobody has run this in a real environment and said what happened.

Verdicts from engineers who deployed it

0 cast

No verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.

Log in to report a verdict.

Log in to join the discussion.

No comments yet. Someone who deploys this will have something to say about it.