MicroadsTeam Cyber by Microads, since 2015 Report an incident

Email & identity

Containing business email compromise before the next invoice

Business email compromise containment, step by step: recall the payment, remove inbox rules and forwarding, revoke OAuth apps, reset MFA, and warn suppliers.

A payment has gone to an account nobody recognizes, or a supplier has phoned to ask why your accounts team changed its bank details. Business email compromise containment is a race against the next invoice the attacker is waiting for, and this is the order to work in.

What business email compromise containment has to achieve

Say the accounts payable clerk entered their password on a convincing fake sign-in page. The attacker logs in, reads the mailbox for a few weeks, finds the threads where invoices get paid, and sets up rules so that replies from certain suppliers disappear before the clerk sees them. Then, at the right moment, they send a polite note with new bank details. From the real mailbox, in the middle of a real conversation.

A password reset deals with almost none of that. Containment has three jobs: try to get the money back, close every route the attacker has into the mailbox, and make sure the next fraudulent message doesn’t land with someone who trusts it. The steps below are in order of urgency, not difficulty.

1. Call the bank before you touch the mailbox

If money has moved, this comes first, and it happens by phone. Call your bank’s fraud line, not your relationship manager’s email. Give them the date, amount, beneficiary account and reference of the transfer, and ask them to request a recall from the receiving bank. For international transfers, ask whether they can raise the recall through SWIFT.

In the United States, file a complaint with the FBI’s IC3 as soon as you have the transfer details. The FBI’s own guidance on business email compromise is blunt about why: prompt reporting gives the best chance of freezing funds. Outside the US, report to the police cybercrime unit. Banks often ask for the reference number.

Nothing guarantees recovery. Speed is the only variable you control. While you’re on the phone, hold any other pending payments to the same supplier until someone has confirmed their details by calling a number you already had on file.

2. Work out whose mailbox was used

Pull the fraudulent message and read its headers, or run a message trace. There are three possibilities, and each puts the containment work somewhere different:

  • It came from your own mailbox. Your account is compromised, and everything below applies to you.
  • It came from the supplier’s real domain. Their mailbox is compromised. Tell them by phone. You still need to check your side.
  • It came from a lookalike domain, one letter off or with a different ending. Possibly no mailbox was compromised at all, though if the attacker knew the details of the conversation, someone’s was.

3. Reset the password and revoke sessions together

In Microsoft 365, reset the password and revoke the user’s sessions in the same sitting. A password reset on its own leaves existing refresh tokens working. Microsoft documents the process in revoking user access in Entra ID. From Microsoft Graph PowerShell:

Revoke-MgUserSignInSession -UserId [email protected]

Access tokens that were already issued can stay valid for a short while afterwards, so consider blocking sign-in for the account until the remaining steps are done. In Google Workspace, the equivalent is a password reset plus signing the user out and resetting sign-in cookies from their page in the Admin console.

4. Find the inbox rules and forwarding

This is where attackers hide, and it’s the step that gets skipped more than any other. In Exchange Online PowerShell:

Get-InboxRule -Mailbox [email protected] -IncludeHidden |
  Format-List Name,Enabled,From,SubjectOrBodyContainsWords,MoveToFolder,ForwardTo,RedirectTo,DeleteMessage,MarkAsRead
Get-Mailbox [email protected] |
  Format-List ForwardingSmtpAddress,ForwardingAddress,DeliverToMailboxAndForward
Get-TransportRule

A malicious rule tends to have a name like “.” or “..”, conditions on words such as invoice, payment, bank or remittance (or on one supplier’s domain), and an action that moves messages to RSS Feeds, Conversation History or Archive, marks them read, or deletes them. Mailbox-level forwarding to an outside address, or a transport rule nobody on your team created, is just as serious.

Save the output to a file before you remove anything. Those rules are evidence, and they show you what the attacker cared about. Microsoft’s walkthrough for responding to a compromised email account covers the same ground with portal paths, if PowerShell isn’t your thing.

5. Revoke OAuth app consents

An attacker who gets a user to consent to an app gets a door that survives a password reset. In the Entra admin center, open Enterprise applications, look at apps with user consent, and check what this user approved recently. Mail.ReadWrite, Mail.Send and offline_access on an app nobody recognizes is the pattern to look for. Revoke the consent, and remove the service principal if the app is malicious.

While you’re there, check whether IMAP and POP are enabled on the mailbox and whether the account has app passwords. Both sidestep most of what you’ve just done. In Google Workspace, review third-party app access under Security, then API controls, and the user’s own list of connected apps.

6. Wipe and re-register MFA

Once inside, attackers often register their own authenticator app or phone number. The account still has MFA. It’s just that the attacker has it too. Look at the user’s authentication methods, and search the audit log for “User registered security info” events. Remove every method, then have the user register again after you’ve confirmed who they are by voice or in person. A Temporary Access Pass makes this straightforward. Check for devices registered to the user in Entra and remove any that aren’t theirs.

If MFA was already on and the attacker got in anyway, assume a session token was stolen through an adversary-in-the-middle phishing page. That points toward phishing-resistant methods and tighter Conditional Access, which is a bigger project for after the incident.

7. Read the audit log for what they saw and sent

The Unified Audit Log tells you how long they were in and what they did. Look for sign-ins from unfamiliar IP addresses and countries, New-InboxRule and Set-InboxRule operations, Add-MailboxPermission, consent to applications, and MailItemsAccessed where your licensing records it. Then go through Sent Items and the deleted folders for messages to suppliers or customers in that window.

Check every other account that signed in from the same IP addresses. Compromised finance mailboxes are often used to phish colleagues, and the second compromise is usually quieter than the first. If the mailbox held personal data the attacker could read, bring in counsel; our breach investigation and notification support helps work out what was exposed. Our business email compromise response covers the audit work end to end, and Microsoft 365 account takeover goes deeper on the identity side.

8. Tell suppliers and customers, by phone

Anyone the attacker emailed from your account, or could have emailed, needs to hear from you directly. Call them on a number from your own records, not one from a recent email signature. Tell them which dates are affected, that any request from you to change bank details should be confirmed by phone, and that you won’t change payment details by email. Follow up in writing once the mailbox is clean.

Inside accounts payable, the control that stops a repeat is simple and unpopular. Any change to a supplier’s bank details gets a call-back to a number already on file, and a second person approves it.

The fraud that hurts most is often the second one, sent a week later from a mailbox everyone thought was fixed. Before you close this out, re-run the rule and forwarding checks, look at the sign-in log one more time, and make sure the call-back rule is written down where AP will see it. If money is still moving or you aren’t sure the attacker is out, report it to our 24/7 desk or email [email protected]; every report is acknowledged within 15 minutes.

Dealing with this right now?

A responder will acknowledge your report within 15 minutes, 24/7.

Related service: Business Email Compromise