SharePoint, Teams & SOC Playbooks · Hardening & Recovery

Post-Incident Microsoft 365 Tenant Hardening Checklist After Account Takeover

Direct Answer (Key Forensic Takeaway)

To stop repeat BEC and AiTM compromises permanently after an M365 incident, deploy six verified controls: move executives, finance, and admins onto Phishing-Resistant MFA (FIDO2/Passkeys/Windows Hello), block Legacy Auth and Device Code Flow in Conditional Access, require Admin Consent for third-party OAuth apps, turn External Auto-Forwarding Off, lock down Security-Info registration, and close open Teams external federation.

Why This Artifact Matters in M365 Incident Response

Surviving an initial Microsoft 365 account takeover without fixing the underlying tenant misconfigurations guarantees a repeat breach within months. Attackers share compromised tenant blueprints rapidly across initial-access brokers: if Evilginx bypassed push MFA once, or Device Code phishing worked once, another operator will test the same door.

This post-incident hardening checklist maps directly to the 12 attack surfaces monitored in AuditVane (`AV-001`–`AV-012`), turning breach lessons into durable architectural defense.

Prioritize controls by blast radius: first eliminate AiTM cookie capture (`T1557`) and privilege escalation (`T1098`) by putting Tier-0 admins, Helpdesk, Finance, and Executives onto **Phishing-Resistant MFA** (`FIDO2` security keys, synced passkeys in Authenticator where supported, or Windows Hello for Business) paired with **Conditional Access Authentication Context** on PIM.

Second, shut down zero-friction bypasses: block **Legacy Authentication** (`IMAP4`/`POP3`/`SMTP`) AND **Device Code Flow** in Conditional Access, restrict **User OAuth Consent** (`Mail.Read`/`Files.Read`), disable **External Auto-Forwarding** in Outbound Spam Filter Policies, lock **Teams Open Federation**, and require compliant devices/TAPs for **Register Security Information**.

1. RAW TELEMETRY SharePoint, Teams & SOC Playbooks Hardening & Recovery 2. CLIENT-SIDE PARSE AuditVane Engine Microsoft 365 hardening checklist 0 Bytes Uploaded 3. SOC OUTCOME Scoped Containment IOCs · CSV · KQL
Local browser DFIR workflow for Microsoft 365 hardening checklist after breach (Hardening & Recovery)
AdSense-Ready In-Article Placement

Real-World Incident Walkthrough

After containing a three-mailbox AiTM BEC breach, a 450-seat healthcare firm executes this hardening roadmap over two weeks: rolling out YubiKey FIDO2 keys to Finance and Admins, blocking Device Code flow and IMAP4, locking down OAuth user consent, switching SharePoint default links off "Anyone", and verifying zero lingering findings in AuditVane across a 14-day post-remediation log sweep.

Forensic Telemetry Fields & High-Signal Indicators

Telemetry Field / Pattern Meaning in M365 / Entra High-Signal Threat Indicator
1. Phishing-Resistant MFA (FIDO2 / WHfB)Stops Evilginx/Tycoon AiTM proxies cryptographicallyCloses AV-003 / AV-006 bypass vectors
2. Block Legacy Auth & Device Code FlowStops non-MFA IMAP4/SMTP & devicelogin phishingCloses AV-002 & Device Code abuse
3. Lock Down User OAuth ConsentAdmin Consent Workflow required for Mail/FilesCloses AV-005 illicit app persistence
4. Disable External Auto-ForwardingOutbound Spam Policy AutoForwardingMode = OffCloses AV-008 silent SMTP diversion
5. Guard Security-Info RegistrationCA User Action requiring Compliant Device or TAPCloses AV-004 rogue MFA enrollment
6. Teams & SharePoint LockdownAllowlist Teams domains + block Anyone linksCloses Teams vishing & AV-010 anonymous leaks

Before vs. After Post-Incident Tenant Hardening

Security ControlDefault / Vulnerable Tenant StateHardened Enterprise State
Admin & Finance MFASMS, Voice, or Standard Push MFA (AiTM-vulnerable)FIDO2 Hardware Key / Windows Hello for Business + Token Protection
Device Code & Legacy AuthPermitted or excluded for legacy groupsBlocked globally via Conditional Access + Exchange Auth Policy
OAuth App User ConsentUsers can self-approve third-party Mail.Read appsRestricted to Verified Publishers (low-risk) or Admin Consent Only
Teams External FederationAllowAllKnownDomains + AllowPublicUsers = TrueDomain Allowlist only + Consumer Teams accounts blocked
Executive Account ResetsAny Tier-1 helpdesk tech can reset CEO passwordExecutives & Admins isolated inside Restricted Management AUs (RMAUs)

Target Hardened Tenant Security Baseline Summary

{
  "AuthStrengthAdminsAndVIPs": "PhishingResistantMFA (FIDO2 / WHfB)",
  "LegacyAuthAndDeviceCode": "Blocked via CA + Exchange AuthPolicy",
  "RegisterSecurityInfoAction": "Restricted to Trusted Location / Compliant Device / TAP",
  "UserOAuthConsent": "Admin Consent Required for High-Risk Scopes",
  "OutboundAutoForwarding": "Off",
  "SharePointAnyoneLinks": "Disabled"
}

Implementing these six baseline controls eliminates over 90% of recurring cloud BEC, AiTM, and OAuth persistence vectors seen in real-world M365 incident response.

Verify Core Exchange & Tenant Hardening Controls via PowerShell

Connect-ExchangeOnline
# 1. Verify Unified Audit Logging & Mailbox Recovery:
Get-AdminAuditLogConfig | Select-Object UnifiedAuditLogIngestionEnabled
Get-HostedOutboundSpamFilterPolicy | Format-Table Name, AutoForwardingMode
Get-OrganizationConfig | Format-List OAuth2ClientProfileEnabled, DefaultAuthenticationPolicy
# 2. Verify Teams External Access:
Get-CsTenantFederationConfiguration | Format-List AllowFederatedUsers, AllowPublicUsers, AllowedDomains

Sample Hardened Verification Output

UnifiedAuditLogIngestionEnabled : True
Name    AutoForwardingMode
----    ------------------
Default Off

Step-by-Step Triage, Containment & Verification

  1. Confirm UnifiedAuditLogIngestionEnabled = True, SingleItemRecoveryEnabled = True, and RetainDeletedItemsFor = 30 across mailboxes.
  2. Enroll FIDO2 hardware keys / Passkeys / Windows Hello for Business on ALL admins, Helpdesk, Finance, HR, and Executives, and enforce via Conditional Access Authentication Strengths.
  3. Deploy Conditional Access rules blocking Legacy Authentication AND Device Code Authentication Flow globally.
  4. Configure Entra Conditional Access User Action: "Register security information" requiring an Intune-compliant device, corporate IP, or Temporary Access Pass.
  5. Restrict Entra User Consent Settings (`Enterprise Applications -> Consent and permissions`), enable the Admin Consent Workflow, and restrict `Microsoft Graph Command Line Tools` (`14d82eec`) via Assignment Required = Yes.
  6. Set Exchange Outbound Spam Policy `AutoForwardingMode = Off`, disable SharePoint Anyone links, restrict Teams External Access domains, and run a 14-day post-hardening verification sweep in AuditVane.

How to Verify Containment Completed Cleanly

  • Conditional Access What-If verifies Phishing-Resistant MFA, Legacy Auth Block, Device Code Block, and Register Security Info rules evaluate cleanly.
  • 14-day post-containment Purview + Entra logs return zero AV-001 through AV-012 surprises.
  • Break-glass FIDO2 emergency accounts verified exempt from CA lockout while actively monitored.

Analyst Blind Spots, Licensing Quirks & False Positives

Never enable a tenant-wide "Require Compliant Device" or "Phishing-Resistant MFA" Conditional Access rule without testing in **Report-Only** mode first and verifying your two `.onmicrosoft.com` FIDO2 Break-Glass accounts are explicitly excluded from the policy!

Also watch out when disabling `AutoForwardingMode`—confirm with IT whether any authorized external ticketing or CRM forwarding connector needs a narrow scoped exception via dedicated rule rather than leaving global forwarding open.

Frequently Asked Questions

What is the single highest-impact fix to stop Evilginx / Tycoon AiTM phishing?

Enforcing Phishing-Resistant MFA (FIDO2 security keys, Passkeys, or Windows Hello for Business) via Conditional Access Authentication Strengths—because FIDO2 binds cryptographically to login.microsoftonline.com and fails on reverse-proxy domains.

Should small businesses on Business Premium use Conditional Access instead of Security Defaults?

Yes! Microsoft 365 Business Premium includes Entra ID P1, unlocking custom Conditional Access policies to block Device Code flow, restrict foreign countries, and guard security-info registration.

How can AuditVane help verify tenant cleanup?

Export fresh Purview UAL CSV and Entra Sign-In JSON logs 7–14 days after containment and run them locally in AuditVane to confirm zero lingering persistence indicators.

What are Restricted Management Administrative Units (RMAUs)?

An Entra ID feature preventing regular Helpdesk or User Administrators from resetting passwords or MFA on protected executives and Tier-0 admins.

Related Forensics Guides