Microsoft’s Midnight Blizzard breach was not a software bug but a failure of identity trust: attackers used a valid OAuth application and stolen credentials to gain persistent access, exploiting the gap between what the system verified and what it should have trusted. This article explains how the attack worked, why traditional patching could not have prevented it, and what organizations must change in their identity security model.
Formula
The trust score is calculated as Trust = 100 − Risk Score, where the risk score (0–100) is derived from factors like device health, login location, and user behavior. The token lifetime is simply the number of days the access token remains valid before requiring re-authentication. In practice, a trust score below a threshold (e.g., 70) should trigger step-up authentication or session revocation.
Worked Example
Using the default values: token lifetime = 30 days, risk score = 50.
- Trust score = 100 − 50 = 50 (below the 70 threshold, so access should be challenged).
- Expiry date = 30 days from now.
This illustrates that a moderate risk score still yields a trust score that many systems would accept, which is exactly the kind of gap Midnight Blizzard exploited.
Background: What Actually Happened
In January 2024, Microsoft disclosed that a Russian state-sponsored group (tracked as Midnight Blizzard, also known as APT29 or Cozy Bear) had accessed corporate email accounts of senior leadership and cybersecurity employees. The attack began in November 2023 with a password spray attack that compromised a legacy, non-production test tenant account. Crucially, that account had OAuth application permissions that allowed the attacker to create and grant a malicious app with full access to the Microsoft corporate environment. The attacker then used that app to read emails and exfiltrate data over several months. No software vulnerability was exploited; the failure was that a dormant, low-privilege account held powerful identity delegation rights.
Why It Was Not a Package Bug
Many initial reports framed the breach as a “bug” or “zero-day,” but the evidence points to a configuration and trust failure. There was no memory corruption, no SQL injection, no unpatched server. The attack chain relied on:
- Weak password on a legacy account (no MFA).
- Over-privileged OAuth consent – the account could grant app permissions without admin approval.
- Lack of conditional access policies that would block risky logins.
- No alerting on unusual OAuth app creation.
Patching would not have stopped any of these. Identity trust means verifying not just who is asking, but what they are allowed to ask for, and why they need it.
How Identity Trust Works (and Where It Breaks)
Modern identity systems use a combination of authentication (verifying the user) and authorization (what the user can do). The “trust” comes from a risk engine that scores each sign-in attempt based on:
- User behavior (typing speed, mouse movements, typical hours).
- Device health (is it managed, patched, jailbroken?).
- Network location (known IP, anonymizing VPN, impossible travel).
- Session context (is the token being used from the same device?).
In Midnight Blizzard, the password spray succeeded because the legacy account had no MFA and no conditional access policy. Even after the password was changed, the attacker had already created a backdoor OAuth app – a persistent identity that did not depend on the password. This is the core lesson: identity trust must be continuously evaluated, not just at login.
Common Problems and Misconceptions
A frequent misconception is that MFA alone would have prevented the attack. While MFA would have blocked the initial password spray, it would not have stopped an attacker who later gained a session token or OAuth app. Another common problem is that organizations treat OAuth applications as “safe” because they are internal. In reality, any app with Mail.Read or Files.ReadWrite.All permissions is a potential data exfiltrator. Also, many admins do not realize that a test tenant is still part of the corporate tenant if it shares the same Azure AD (now Entra ID).
How to Choose the Right Mitigations
To address identity trust failures, prioritize controls in this order:
- Enforce MFA on all accounts, especially legacy and service accounts.
- Restrict OAuth consent – require admin approval for any app requesting high-privilege permissions.
- Implement conditional access policies that block risky sign-ins and require device compliance for sensitive data.
- Monitor and audit OAuth applications and their permissions regularly; revoke unused ones.
- Use privileged identity management to grant just-in-time access to admin roles.
Start with the quick wins (MFA, consent restrictions) and then move to continuous monitoring. The goal is to reduce the attack surface and shorten the window of exposure.
Comparisons: Identity Trust vs. Traditional Security
Traditional perimeter security assumed that if you were inside the network, you were trusted. Identity trust flips that: trust is never implicit, and every request is evaluated. Midnight Blizzard is a perfect case study of the old model failing – the attacker was “inside” via a valid OAuth app, and the network had no way to distinguish malicious use from legitimate use. Modern identity trust would have flagged the abnormal behavior (e.g., a test account creating an app at 3 AM, or a token being used from a new IP) and revoked access automatically.
Safety and Operational Considerations
When implementing identity trust controls, be careful not to lock out legitimate users. Always test conditional access policies in report-only mode first. Also, ensure that break-glass accounts (emergency admin accounts) are exempt from MFA but monitored heavily. For OAuth apps, maintain an inventory and review permissions quarterly. Finally, remember that identity trust is not a one-time project – it requires continuous tuning of risk scores and policies based on real usage patterns.
Frequently Asked Questions
Was Midnight Blizzard a zero-day exploit?
No. The attack used a password spray and a legitimate OAuth application. There was no vulnerability in Microsoft’s code; the failure was in configuration and monitoring.
Could MFA have prevented the breach?
MFA would have blocked the initial password spray, but the attacker could have used other methods like token theft or phishing. In this case, the OAuth app created after the initial compromise would still have been a backdoor.
What is an OAuth application and why is it dangerous?
An OAuth app is a third-party application that users or admins grant permissions to access resources (e.g., email, files). It is dangerous because it can hold powerful permissions and persist even after a user’s password is changed, making it a stealthy backdoor.
How can I detect if my tenant has been compromised like this?
Look for unusual OAuth apps, especially those with high permissions created by non-admin users. Use Azure AD (Entra ID) sign-in logs to spot impossible travel or repeated failures. Also, monitor for any app that has been granted Mail.Read or Files.ReadWrite.All and is not in your approved list.
Is identity trust only for large enterprises?
No. Small and medium businesses are often targeted because they have weaker controls. Even a basic conditional access policy (e.g., block sign-ins from anonymous IPs) and MFA can reduce risk significantly.
Related
Formula used
in t | Token lifetime (days) | days | 30 | 1 | 365 in r | Risk score (0-100) | - | 50 | 0 | 100 out trust | Trust score | - | 100 - r | 0 out expiry | Expiry date (days from now) | - | t | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Jenkins vs GitHub Actions: Which CI/CD Fits Your Team?
- Turn Off Backup Encryption in iTunes?
- Campus Tech Innovation Hubs: What They Are
- Poco C51 Airtel Prepaid Locked Variant India?
- Shared VPS Hosting: Is It Better?
- Disk Defrag Pro: What It Does and Whether You Need It