Microsoft 365 inbox forwarding rule

Severity highCloud & SaaSSingle eventstablecloud.identity.m365_inbox_forwarding_rule · v1.0.0

A Microsoft 365 mailbox inbox rule (New-InboxRule / Set-InboxRule) that forwards, redirects, or auto-deletes mail.

What it detects

A Microsoft 365 mailbox inbox rule (New-InboxRule / Set-InboxRule) that forwards, redirects, or auto-deletes mail. Attacker-created forwarding rules silently exfiltrate a compromised mailbox's mail and hide replies — a classic post-BEC persistence and email-collection move that survives a password reset.

MITRE ATT&CK mapping

  • T1114.003Email Collection: Email Forwarding Rule· Collection

False positives and triage

Users and admins do create legitimate forwarding/redirect rules. Confirm the destination is external / unexpected and correlate with the mailbox owner — a rule forwarding to an outside address the user doesn't control is the signal.

The rule

Declarative YAML read by the detection engine — data, never executed. Confidence 80%. Source: rules/cloud/m365_inbox_forwarding_rule.yaml, licensed under the Apache License 2.0.

id: cloud.identity.m365_inbox_forwarding_rule
version: 1.0.0
status: stable
severity: high
confidence: 0.8
platforms: [application]
mitre_techniques: [T1114.003]
description: |
  A Microsoft 365 mailbox inbox rule (New-InboxRule / Set-InboxRule) that forwards,
  redirects, or auto-deletes mail. Attacker-created forwarding rules silently
  exfiltrate a compromised mailbox's mail and hide replies — a classic post-BEC
  persistence and email-collection move that survives a password reset.
match:
  provider: Office365
  event_action_any:
    - New-InboxRule
    - Set-InboxRule
  raw_message_contains_any:
    - "ForwardTo="
    - "ForwardAsAttachmentTo="
    - "RedirectTo="
    - "DeleteMessage=True"
correlation_keys: [user_name]
false_positive_guidance: |
  Users and admins do create legitimate forwarding/redirect rules. Confirm the
  destination is external / unexpected and correlate with the mailbox owner —
  a rule forwarding to an outside address the user doesn't control is the signal.

Related detections

Run this rule on your own logs — offline

KIROSEC runs this rule and the rest of the library over Windows, Linux, macOS and cloud audit logs on the analyst's own machine. Every alert links to the events that raised it, and nothing leaves the device.

Browse all detections