Skip to content
Home/Insights/Uncategorized/The Phishing Email Came From a Real Colleague. That Was the Problem.

The Phishing Email Came From a Real Colleague. That Was the Problem.

The Phishing Email Came From a Real Colleague. That Was the Problem.

Lessons from a Microsoft 365 incident investigation: device-code phishing, a hidden inbox rule, and a phishing campaign sent from a genuine business mailbox.

Most phishing defences are built to catch a fake sender: the lookalike domain, the spoofed display name, the failed SPF check.

But what happens when the sender is real?

We recently investigated an incident where an attacker took over a legitimate Microsoft 365 mailbox and used it to send phishing emails to colleagues, partners and customers. Every message passed authentication, because every message really did come from the organisation’s own domain.

The suspicious activity was spotted and contained quickly. Our Anadata team then carried out a full Digital Forensics and Incident Response (DFIR) investigation to reconstruct exactly what happened. Here is what we found, and what every Microsoft 365 organisation can learn from it.

How the attack unfolded

  • Day 1: A user received a phishing email styled as a shared-workspace invitation, linking to an external domain.
  • Within the hour: Microsoft Entra logged a device-code sign-in from a source never seen before on that account. One failed attempt, then a success seconds later. MFA was satisfied.
  • About a week later, in a single session: An inbox rule was created to mark incoming mail as read and permanently delete it. Hundreds of mailbox items were opened within minutes. Large volumes of email were sent, and the sent copies were deleted as they went out.
  • The result: Message traces confirmed a phishing campaign sent to internal colleagues and to multiple external organisations, including customers.

Days passed between the initial access and the campaign. That gap is typical: attackers often wait, observe and choose their moment.

Lesson 1: MFA was satisfied. Access was still unauthorised.

Device-code authentication is a legitimate feature for signing in on devices where typing a password is impractical, such as smart TVs, CLI tools and conference-room hardware. The user is shown a code and asked to enter it at a Microsoft page.

Attackers abuse this by starting the sign-in themselves and persuading the victim to enter the code. The victim completes MFA on a genuine Microsoft page, and the attacker receives the session. No password is stolen, and nothing looks wrong to the user.

MFA is essential, but it protects the person signing in, not the flow they are signing in through.

  • Block device-code flow with Conditional Access wherever it isn’t needed for an approved business workflow (validate first, then enforce).
  • Require phishing-resistant MFA (FIDO2 keys, passkeys, Windows Hello) for privileged and high-risk accounts.
  • Alert on sign-ins from new sources or with authentication patterns that don’t match the user’s normal behaviour.
  • Review application consent and permissions regularly.

Lesson 2: A genuine sender is not the same as a safe sender.

The campaign messages looked like routine business notifications: task confirmations, document reviews, workspace invitations. They came from a known colleague or vendor, through legitimate infrastructure, with valid authentication.

SPF, DKIM and DMARC answer one question: did this message really come from this domain? They cannot tell you whether the account behind it has been taken over.

Detection therefore has to look at the behaviour of the sending account, not just its identity. A mailbox that suddenly sends a burst of messages in one session, to recipients it has never contacted, is a signal regardless of how clean the headers are.

Lesson 3: The inbox rule is the tell.

Before the bulk sending began, the attacker created a rule to mark incoming messages as read and permanently delete them. That hides bounce-backs, replies such as “Did you really send this?”, and security notifications from the real user.

Malicious inbox rules are one of the most reliable early indicators of a compromised mailbox. Watch for:

  • New or modified rules that delete, move or mark messages as read.
  • Changes to forwarding, delegates or mailbox permissions.
  • Unusual bursts of mailbox-item access or outbound email.
  • Any of the above shortly after an authentication anomaly.

Individually, each of these can be noise. Correlated, they tell a clear story.

Lesson 4: A password reset is not session revocation.

The response included a credential reset, mailbox investigation, Microsoft Purview content searches to identify campaign messages, and invalidation of active sessions.

The order matters. Device-code phishing hands the attacker a token, not a password, and resetting the password does not necessarily terminate sessions or tokens that have already been issued. Treat them as two distinct containment steps, and revoke sessions as part of first response rather than as a follow-up.

A practical containment sequence:

  • Contain: Reset credentials and revoke all active sessions and refresh tokens.
  • Preserve: Export sign-in logs, mailbox audit records and message traces before retention limits expire.
  • Investigate: Review authentication events, inbox rules, forwarding, permissions and outbound activity.
  • Scope the campaign: Search for related messages using multiple indicators, not just one subject line.
  • Verify remediation: Confirm message removal and other fixes through evidence, not assumptions.
  • Improve: Update detections, access policies and the response playbook.

Lesson 5: Be honest about what the evidence can’t prove.

Good forensics separates what happened from what probably happened.

The evidence strongly linked the phishing email to the device-code sign-in, but could not independently confirm that the recipient clicked the link or entered the code. Message traces confirmed that the campaign messages were delivered, but delivery is not interaction: the records could not show whether anyone opened them, clicked, or entered credentials. And the mailbox-audit records confirmed that large numbers of items were opened, but did not identify each item individually.

Stating these limits clearly is not a weakness of the investigation. It is what allows leadership, clients and partners to make decisions based on what is actually known.

Your Microsoft 365 checklist

  • Identity: Restrict device-code flow, extend Conditional Access coverage, and use phishing-resistant MFA for high-risk accounts.
  • Mailbox detection: Alert on suspicious inbox rules, bulk mailbox access, deletion activity and outbound spikes, correlated with sign-in events.
  • Telemetry: Make Entra sign-in logs, Exchange Online audits, message traces and Purview records available to your security team.
  • Retention: Keep logs long enough to reconstruct an incident that started weeks before it was noticed.
  • Readiness: Rehearse a compromised-mailbox scenario, with clear owners for containment, investigation, remediation and client communication.

Trust has to be continuously verified

This incident did not involve a sophisticated exploit. It involved a convincing email, a legitimate sign-in feature and a trusted mailbox. That combination is exactly why business email compromise remains so effective.

Identity security and email security are not separate disciplines. Strong authentication, mailbox monitoring, sound logging and a tested response plan only reduce risk when they work together.

If your organisation is dealing with a suspected Microsoft 365 account compromise, phishing incident or business email compromise, Anadata can help you investigate what happened and what to fix.

Share Email
Previous Your AI Agent Has Permission. But Does It Have Authority? Next AI in Practice – Engineering lessons from building with AI