Anatomy of a Breach

Anatomy of a Breach: Microsoft Exchange and Hafnium — 250,000 Servers Compromised in a Global Mass Exploitation Event

> series: anatomy_of_a_breach —— part: 147 —— target: microsoft_exchange_servers —— servers: 250,000 —— attacker: hafnium_china —— exploits: proxylogon<span class="cursor-blink">_</span>_

Hedgehog Security 31 March 2021 14 min read

250,000 Exchange servers. Four zero-days. Every unpatched server on the internet compromised.

On 2 March 2021, Microsoft disclosed four zero-day vulnerabilities in on-premises Microsoft Exchange Server — CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, and CVE-2021-27065 — collectively known as ProxyLogon. The vulnerabilities, which had been exploited by Hafnium (a Chinese state-sponsored group) since at least January 2021, allowed unauthenticated remote code execution against any internet-facing Exchange server. Microsoft released emergency out-of-band patches, but by that point, an estimated 250,000 servers globally had already been compromised.

The situation deteriorated rapidly after the patches were released: multiple additional threat groups — including ransomware operators — reverse-engineered the patches to create their own exploits and began mass-scanning and compromising every unpatched Exchange server on the internet. The NCSC issued urgent guidance to UK organisations to patch immediately and check for web shells that indicated prior compromise. The Hafnium/Exchange event was one of the largest mass exploitation events in history — affecting governments, businesses, and organisations of every size in every country.


Recommended

Not sure where to start?

We'll scope your test for free and tell you exactly what you need. No obligation, no hard sell.

Free Scoping Call

Once the patch was released, every criminal reverse-engineered it.

250,000 Servers Compromised
The scale was extraordinary: a quarter of a million Exchange servers compromised globally, including thousands of UK organisations. Any organisation running on-premises Exchange with Outlook Web Access (OWA) exposed to the internet was potentially affected. Our <a href="/vulnerability-scanning">vulnerability scanning</a> identifies internet-facing Exchange servers and their patch status.
Web Shells for Persistent Access
The attackers installed web shells — small scripts that provide persistent remote access — on compromised servers. Even after patching, these web shells remained, giving the attackers continued access. Patching alone was not sufficient; organisations also needed to check for and remove web shells. <a href="https://www.socinabox.co.uk">SOC in a Box</a> detects web shell installation and usage.
Patch-to-Exploit Pipeline
Once Microsoft released the patches, criminal groups reverse-engineered them to identify the vulnerabilities and create exploits — attacking in the window between patch release and patch application. <a href="/cyber-essentials">Cyber Essentials Danzell's</a> 14-day patching mandate is critical for exactly this scenario.
Email Server = Crown Jewels
Exchange servers hold an organisation's entire email archive — years of internal communications, client data, strategic plans, and confidential information. Compromising Exchange provides access to the most sensitive corporate data. Our <a href="/penetration-testing/infrastructure">infrastructure testing</a> assesses email server security.

Thousands of UK organisations affected. The NCSC issued emergency guidance.

The NCSC issued urgent guidance to all UK organisations running on-premises Exchange, and multiple UK organisations were confirmed as compromised. For any UK organisation still running on-premises Exchange servers, the Hafnium event was a watershed: the risk of maintaining internet-facing Exchange was demonstrated to be existential. Many organisations accelerated their migration to Exchange Online (Microsoft 365) in the aftermath.

Vulnerability scanning identifies unpatched Exchange servers. Infrastructure testing checks for web shells and indicators of compromise. Cyber Essentials mandates 14-day patching. SOC in a Box monitors for Exchange exploitation attempts and web shell activity. And UK Cyber Defence provides the forensic investigation capability to determine whether your Exchange servers were compromised during the Hafnium campaign.


250,000 Exchange servers compromised globally. Was yours one of them?

<a href="/vulnerability-scanning">Vulnerability scanning</a> identifies unpatched Exchange. <a href="/penetration-testing/infrastructure">Infrastructure testing</a> detects web shells. <a href="/cyber-essentials">Cyber Essentials</a> mandates 14-day patching.

Next Step

Not sure where to start?

We'll scope your test for free and tell you exactly what you need. No obligation, no hard sell.

Free Scoping Call

Related Articles