BEC & Exchange Forensics · T1114.003 / T1564.008

UpdateInboxRules vs. New-InboxRule: Hunting Hidden EWS & MAPI Rules

Direct Answer (Key Forensic Takeaway)

New-InboxRule records Exchange REST/PowerShell cmdlet rule creation with explicit Parameters, whereas UpdateInboxRules fires when OWA, Outlook desktop, EWS, or MAPI clients alter rules—embedding actions inside OperationProperties (RuleOperation, RuleActions) and enabling attackers using EWS/MAPI tooling to craft corrupted hidden rules invisible without -IncludeHidden or MFCMAPI.

Architecture & Telemetry Context

One of the costliest gaps in legacy SIEM alert rules is filtering Exchange Online logs solely for Operation == "New-InboxRule". In reality, whenever a threat actor opens Outlook on the Web inside a replayed AiTM session or runs an automated EWS script, Exchange Online logs UpdateInboxRules instead.

Even trickier, offensive MAPI frameworks (such as Ruler or custom EWS scripts) manipulate low-level MAPI rule properties directly—stripping or corrupting rule provider strings so the rule executes silently on Exchange servers while disappearing from Outlook’s Rules & Alerts dialog.

Inside Purview AuditData, UpdateInboxRules records populate an OperationProperties array containing RuleOperation (Add, Modify, Delete), RuleCondition, and RuleActions (often a serialized JSON sub-array listing MoveToFolder or MarkAsRead), alongside ClientInfoString showing whether OWA, Outlook, or an EWS client triggered the change.

When an attacker creates a hidden MAPI rule by omitting PR_RULE_MSG_NAME or altering PR_RULE_PROVIDER, standard Get-InboxRule omits it completely. Passing -IncludeHidden reveals nearly all hidden MAPI rules, while inspecting the mailbox’s Top of Information Store -> Inbox associated contents table via MFCMAPI catches even heavily corrupted MAPI rule blobs.

1. RAW TELEMETRY BEC & Exchange Forensics T1114.003 / T1564.008 2. CLIENT-SIDE PARSE AuditVane Engine UpdateInboxRules vs New-InboxRule 0 Bytes Uploaded 3. SOC OUTCOME Scoped Containment IOCs · CSV · KQL
Local browser DFIR workflow for UpdateInboxRules vs New-InboxRule (T1114.003 / T1564.008)
AdSense-Ready In-Article Placement

New-InboxRule vs. UpdateInboxRules Forensic Telemetry

FeatureNew-InboxRule / Set-InboxRuleUpdateInboxRules
Typical Client OriginPowerShell, Exchange Admin Center, REST APIsOWA webmail, Outlook Desktop, EWS, MAPI tools
Purview RecordType1 (ExchangeAdmin)2 (ExchangeItem) or 1 depending on path
Where Actions Are StoredAuditData.Parameters arrayAuditData.OperationProperties (RuleActions JSON)
Hidden MAPI RiskStandard visible Exchange ruleCan hide from UI/standard Get-InboxRule

Forensic Telemetry Fields & High-Signal Indicators

Telemetry Field / Pattern Meaning in M365 / Entra High-Signal Threat Indicator
New-InboxRule / Set-InboxRuleExchange Admin / REST / PowerShell pathExplicit Parameters.* dictionary in AuditData
UpdateInboxRulesOWA, Outlook MAPI/RPC, and EWS clientsInspect OperationProperties.RuleActions & RuleOperation
OperationProperties.RuleOperationAdd, Modify, or Delete action flagVerify unexpected Add/Modify from foreign IP
ClientInfoStringClient protocol originDistinguishes OWA browser vs. EWS/MAPI scripts
-IncludeHidden switchReveals hidden MAPI rules in PowerShellMandatory during every BEC mailbox check
MFCMAPI Associated ContentsLow-level MAPI property table editorRemoves corrupted rules missing PR_RULE_MSG_NAME

UpdateInboxRules AuditData Structure with RuleActions

{
  "CreationTime": "2026-12-01T10:04:12Z",
  "Operation": "UpdateInboxRules",
  "UserId": "exec@contoso-demo.invalid",
  "ClientIPAddress": "194.26.135.210",
  "ClientInfoString": "Client=OWA;Action=Options",
  "OperationProperties": [
    { "Name": "RuleOperation", "Value": "Add" },
    { "Name": "RuleName", "Value": " " },
    { "Name": "RuleActions", "Value": "[{\"ActionType\":\"MoveToFolder\",\"Folder\":\"Deleted Items\"},{\"ActionType\":\"MarkAsRead\",\"Value\":true}]" }
  ]
}

Notice two stealth tricks inside this payload: RuleName is a single blank space (" "), and RuleActions lives as an escaped JSON string nested inside OperationProperties.Value. AuditVane surfaces OperationProperties.RuleActions directly in the Event Inspector and fires AV-001 automatically.

Sweep Hidden MAPI Rules & Hunt UpdateInboxRules in PowerShell

# 1. Hunt UpdateInboxRules across tenant:
Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-30) -EndDate (Get-Date) -Operations UpdateInboxRules,New-InboxRule,Set-InboxRule -SessionId ([guid]::NewGuid()) -SessionCommand ReturnLargeSet -ResultSize 5000
# 2. Check live mailbox INCLUDING hidden MAPI rules:
Get-InboxRule -Mailbox "exec@domain.com" -IncludeHidden | Format-Table Name, RuleIdentity, Enabled, Description -Wrap

Sample Hidden Rule Output (-IncludeHidden)

Name RuleIdentity        Enabled Description
---- ------------        ------- -----------
     98412309841209381   True    If the message includes "wire", move to Deleted Items and mark as read.

Real-World Incident Walkthrough

An executive reports that invoices from a major supplier vanish seconds after arrival, yet Helpdesk checks Outlook Desktop Rules and runs Get-InboxRule in PowerShell—seeing zero rules. Believing Exchange is glitching, they escalate to DFIR.

The responder exports Purview UAL logs into AuditVane and spots an UpdateInboxRules entry from 194.26.135.210 with ClientInfoString="Client=OWA;Action=Options" and RuleActions containing MoveToFolder="Deleted Items". Running Get-InboxRule -IncludeHidden immediately exposes the hidden rule that standard Get-InboxRule skipped.

Step-by-Step Triage, Containment & Verification

  1. Update SIEM and Purview searches to always include UpdateInboxRules alongside New-InboxRule, Set-InboxRule, and Enable-InboxRule.
  2. Drop UAL exports into AuditVane—rule AV-001 inspects UpdateInboxRules RuleActions strings automatically.
  3. During live containment, ALWAYS append -IncludeHidden to Get-InboxRule.
  4. If a rule still executes after Get-InboxRule -IncludeHidden appears blank, inspect the mailbox Inbox Associated Contents table via MFCMAPI to purge corrupted MAPI rule items.
  5. Check ClientInfoString to determine whether OWA cookie replay or an EWS/MAPI script planted the rule.
  6. Revoke refresh tokens and review Entra Sign-Ins for that same window.

How to Verify Containment Completed Cleanly

  • UpdateInboxRules operations audited across the full compromise timeframe.
  • Get-InboxRule -IncludeHidden returned zero unauthorized or blank-named rules.
  • Inbox delivery verified working normally via test email after rule deletion.

Analyst Blind Spots, Licensing Quirks & False Positives

Be careful when passing blank or whitespace Rule Names (`" "`) into Remove-InboxRule—always delete by the numeric `RuleIdentity` GUID (`Remove-InboxRule -Mailbox user@domain.com -Identity 98412309841209381`) rather than by `-Name`.

Also remember that deleting a rule via OWA or Outlook triggers an UpdateInboxRules event with RuleOperation="Delete"—do not mistake your own SOC remediation timestamp for attacker activity.

Frequently Asked Questions

Can an attacker make an Exchange inbox rule completely invisible in Outlook?

Yes. Modifying MAPI rule properties via EWS/MAPI tools can hide rules from Outlook UI and standard Get-InboxRule—requiring -IncludeHidden or MFCMAPI to uncover.

Does Get-InboxRule -IncludeHidden catch every hidden rule?

It catches the vast majority of hidden rules; rare corrupted rules missing PR_RULE_PROVIDER require MFCMAPI cleanup.

Does AuditVane flag UpdateInboxRules automatically?

Yes, AuditVane AV-001 evaluates UpdateInboxRules and inspects nested RuleActions strings for DeleteMessage, MarkAsRead, MoveToFolder, and forwarding.

Why does UpdateInboxRules sometimes show RecordType 2 instead of 1?

Exchange treats OWA/MAPI mailbox rule updates as mailbox item/folder operations (RecordType 2) rather than Exchange Admin cmdlets (RecordType 1).

Related Forensics Guides