Mailbox forwarding and inbox rules: the quiet sign of a compromised mailbox

After taking over a mailbox, attackers add rules that forward mail outside or hide replies in obscure folders. How to find these rules in Exchange Online and Google Workspace, block external forwarding, and respond.

Lesson 11 of 16 · 10 min read · practice only with authorization

Diagram

Rules an attacker leaves behind

Follow the path. One example at a time.

Step 1 of 4

Rule

A new inbox rule moves messages and marks them read.

Illustration: Rule
Name: "."
Conditions: SubjectOrBodyContainsWords: invoice, payment, wire
Actions: MoveToFolder: RSS Subscriptions; MarkAsRead: true

The example on the open step is one illustration, or the fix you can paste into an application you own.

What this page is made of

3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.

  1. Odd rule names

    What fails
    Rules named with a dot or a single character are hard to notice.
    Who is affected
    The mailbox owner and their correspondents.
    What you would notice
    Rules with one-character names that move or delete mail.
    What you change
    Alert on New-InboxRule and Set-InboxRule with move or delete actions.
  2. External forwarding

    What fails
    Mail forwarded to personal addresses leaks every message.
    Who is affected
    Everyone who emails the account.
    What you would notice
    ForwardingSmtpAddress to an external domain.
    What you change
    Block automatic external forwarding in the outbound policy.
  3. Business email compromise

    What fails
    Rules hiding payment replies support invoice fraud.
    Who is affected
    Finance and vendors.
    What you would notice
    Rules matching invoice or payment keywords.
    What you change
    Train finance to confirm bank changes by phone.

Google Workspace

Admin console > Reporting > Audit and investigation > Gmail log events shows filter and forwarding changes. Disable automatic forwarding for organizational units that do not need it.

Check yourself

Recognition and the fix. Nothing here is a procedure.

1 / 3

A rule named "." moves mail containing "payment" to RSS Subscriptions. What is it for?

Sibling techniques

Pages at the same depth, plus a lab and a glossary card for this one.

This page stands on its own. The lab and the glossary card are the next reading.

Practice

  1. LabControl benchA failure is described. Choose the control that changes the outcome.

Glossary

  1. CardMailbox forwarding rulesMail starts leaving the organization through a rule the user did not mention.