Whenever a major cloud service disruption impacts Microsoft 365—such as an Exchange Online mail delivery delay, Teams connectivity freeze, or portal degradation—threat actors launch coordinated incident-capitalizing phishing campaigns.
Adversaries know that end-users and IT helpdesk teams are primed to expect administrative notifications regarding service restoration. Fake notices with subject lines like "Action Required: Re-authenticate Mailbox Post-Outage", "Microsoft 365 Service Interruption - Verify Stalled Messages", or "IT Helpdesk: Password Resync Required" achieve click-through rates up to 500% higher than typical opportunistic phishing lures.
In this enterprise security runbook, we provide ready-to-deploy Kusto Query Language (KQL) hunting queries for Microsoft Defender XDR, explain how to audit recently impacted users, and demonstrate how to harden Defender for Office 365 anti-phishing policies against brand impersonation.
Anatomy of a Post-Outage Phishing Campaign
Adversaries exploit psychological cognitive biases: urgency, authority, and relief. Following a service outage:
- Lure Generation: The attacker monitors public status pages (e.g.,
@MSFT365Statuson X or the Service Health Dashboard). As soon as Microsoft reports service recovery, the attacker broadcasts lures styled as official Microsoft or internal IT support communications. - Adversary-in-the-Middle (AiTM) Proxies: Links point to phishing infrastructure running reverse-proxy frameworks (Evilginx, Modlishka) that proxy legitimate Microsoft Entra ID login flows, stealing session cookies and bypassing SMS/Authenticator push notifications.
- QR Code Injection (Quishing): To bypass standard email URL scanners, the malicious re-authentication URL is embedded inside an attached PDF image disguised as an "Emergency QR Code Login Token".
KQL Hunting Query 1: Detecting Inbound Outage & Verification Lures
Open the Microsoft Defender portal (security.microsoft.com) and navigate to Hunting > Advanced Hunting. Execute the following KQL query to identify emails received in the last 48 hours containing outage-themed lure keywords from external senders:
// KQL: Post-Outage Phishing Campaign Detector
// Inspects external inbound messages referencing incident/outage terminology
EmailEvents
| where Timestamp >= ago(48h)
| where EmailDirection == "Inbound"
| where Subject has_any (
"service degradation", "service incident", "outage recovery",
"stalled messages", "undelivered messages", "mailbox resync",
"re-authenticate", "exchange notification", "verify mailbox",
"service restored", "unsent messages queue"
)
| project Timestamp, InternetMessageId, SenderFromAddress, SenderIPv4,
RecipientEmailAddress, Subject, DeliveryAction, ThreatTypes, DetectionMethods
| sort by Timestamp desc
KQL Hunting Query 2: Identifying Clicked Phishing Links & AiTM Tokens
If malicious emails slipped past automated transport filters, this query identifies which users actually clicked the links and whether those clicks resulted in suspicious sign-ins:
// KQL: Correlate Outage Phishing URL Clicks with Sign-In Telemetry
let OutageEmails = EmailEvents
| where Timestamp >= ago(48h)
| where EmailDirection == "Inbound"
| where Subject has_any ("outage", "stalled", "resync", "service recovery", "undelivered")
| project NetworkMessageId, RecipientEmailAddress;
UrlClickEvents
| where Timestamp >= ago(48h)
| join kind=inner OutageEmails on NetworkMessageId
| where ActionType == "ClickAllowed" or IsClickedThrough == 1
| project ClickTime = Timestamp, AccountUpn, Url, IPAddress, ActionType
| join kind=inner (
AADSignInEventsBeta
| where Timestamp >= ago(48h)
| project SignInTime = Timestamp, AccountUpn, IPAddress, ClientAppUsed, IsInteractive, RiskLevelAggregated
) on AccountUpn
| where SignInTime between (ClickTime .. (ClickTime + 30m))
| project AccountUpn, ClickTime, SignInTime, Url, PhishIP = IPAddress, RiskLevelAggregated
| sort by ClickTime desc
PowerShell Remediation: Purging Phishing Messages & Resetting Compromised Sessions
If a malicious campaign is detected, SOC analysts can leverage the Exchange Online and Microsoft Graph PowerShell modules to instantly purge the email from all recipient mailboxes and revoke user refresh tokens:
# Script: Remediate-PostOutagePhishing.ps1
# Requires: ExchangeOnlineManagement & Microsoft.Graph.Authentication
Connect-ExchangeOnline -UserPrincipalName admin@lab365.in
Connect-MgGraph -Scopes "User.ReadWrite.All" -NoWelcome
$MaliciousSender = "[email protected]"
$MaliciousSubject = "*Exchange Outage Account Resync*"
Write-Host "Searching for malicious outage phishing emails..." -ForegroundColor Cyan
# 1. Purge from all mailboxes via Compliance Search & Purge
$SearchName = "OutagePhish_Purge_$(Get-Date -Format 'yyyyMMdd_HHmm')"
New-ComplianceSearch -Name $SearchName `
-ExchangeLocation All `
-ContentMatchQuery "from:$MaliciousSender AND subject:$MaliciousSubject"
Start-ComplianceSearch -Identity $SearchName
# Wait for search to complete
while ((Get-ComplianceSearch -Identity $SearchName).Status -ne "Completed") {
Start-Sleep -Seconds 5
}
# Execute hard delete
New-ComplianceSearchAction -SearchName $SearchName -Purge -PurgeType HardDelete -Confirm:$false
Write-Host "[✔] Purge initiated across all tenant mailboxes." -ForegroundColor Green
# 2. Invalidate sessions for victim accounts who clicked
$VictimUPNs = @("[email protected]", "[email protected]")
foreach ($upn in $VictimUPNs) {
Write-Host "Revoking sign-in sessions for potentially compromised user: $upn" -ForegroundColor Yellow
Revoke-MgUserSign -UserId $upn
}
Write-Host "[✔] Refresh tokens invalidated. User must re-authenticate with Phishing-Resistant MFA." -ForegroundColor Green
Defensive Hardening in Defender for Office 365
To immunize your tenant against future incident-themed attacks:
- Enable Spoof Intelligence Strict Thresholds: Ensure that SPF/DKIM/DMARC failures on external impersonators are set to Quarantine rather than Junk Email. Review our guide on ARC Email Authentication.
- Configure Mailbox Intelligence Impersonation Protection: Add VIP senders and corporate communication aliases (e.g.,
[email protected],[email protected]) to the Targeted Users to Protect list in the Anti-Phishing policy. - Mandate FIDO2 Passkeys for Administrators: Enforce phishing-resistant credentials so that even if an administrator clicks an AiTM reverse-proxy link, the cryptographic challenge cannot be relayed. See our Entra ID Passkey FIDO2 Guide.
Summary Checklist
- Monitor Incident Windows: Heighten SOC vigilance immediately during and 48 hours following any M365 Service Health Advisory.
- Run Proactive KQL: Query
EmailEventsandUrlClickEventsfor outage lure keywords. - Automate Token Revocation: Revoke sign-in tokens (
Revoke-MgUserSign) for any user who clicked suspicious links during the window. - Enforce Anti-Phishing Policies: Leverage Defender for Office 365 brand impersonation and Safe Links protection.