HAFNIUM — Microsoft Exchange

2021-03-02

The early-2021 mass-exploitation campaign against on-premises Microsoft Exchange Server installations, in which four previously undisclosed vulnerabilities (CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, and CVE-2021-27065 — collectively the "ProxyLogon" cluster) were exploited at scale across more than 250,000 servers globally — formally attributed by the United States, the United Kingdom, the European Union, NATO, Japan, Australia, New Zealand, and Canada in a coordinated statement of 19 July 2021 to actors associated with the People's Republic of China's Ministry of State Security.

Audio readout of this dossier.

Background

Microsoft Exchange Server is the on-premises enterprise email and calendaring platform produced by Microsoft Corporation. The on-premises product (distinct from the Microsoft 365 / Exchange Online cloud service) is deployed across a substantial fraction of the world's small, medium, and large enterprise environments, of public-sector institutions, and of educational institutions. Exchange Server holds, by virtue of its function, the entire institutional email corpus of an affected organisation; a successful intrusion into a properly-administered Exchange Server typically provides extended access to the affected organisation's communications stream and, in many configurations, to authentication infrastructure interconnected with the Exchange installation.1

The vulnerabilities subsequently designated CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, and CVE-2021-27065 — collectively the "ProxyLogon" cluster, after the principal CVE-2021-26855 server-side request-forgery vulnerability that gave rise to authenticated access — were identified across late 2020 and early 2021. The vulnerabilities were communicated to Microsoft by the security researcher Orange Tsai of the DEVCORE team in early January 2021. Microsoft scheduled patch development across January and February 2021 with planned public disclosure as part of the regular monthly security-update release cycle. Across the period from approximately early January 2021 onward, however, the vulnerabilities had been independently identified and were being actively exploited at scale by the cyber-intrusion set subsequently designated HAFNIUM by Microsoft.2

The Operation

The mass-exploitation campaign moved across two operationally distinct phases. The first phase, characterised in subsequent Microsoft and security-firm reporting as a "limited and targeted" exploitation campaign, ran from approximately early January 2021 through late February 2021. In this phase, HAFNIUM-attributed operators exploited the ProxyLogon vulnerabilities against selected high-value targets — by Microsoft's subsequent characterisation, principally United States-based research universities, defence contractors, law firms, infectious-disease researchers, policy think-tanks, and non-governmental organisations — in a manner substantially consistent with traditional human-directed cyber-espionage tradecraft.3

The second phase, beginning in approximately late February 2021 and accelerating sharply across 26–28 February 2021 once it became clear that Microsoft was preparing patches, was a mass-exploitation campaign in which HAFNIUM-attributed operators (and, in subsequent days and weeks, multiple other state and non-state cyber actors who reverse-engineered the patches and the public-disclosure detail) compromised every reachable, unpatched on-premises Exchange Server they could identify on the public internet. The compromise included, in most observed cases, the deployment of one or more web shells — small server-side scripts permitting persistent remote command execution — to enable subsequent revisitation of the compromised host. Microsoft estimated that more than 250,000 Exchange servers globally were compromised across the campaign.4

Microsoft released the out-of-band emergency patches and disclosed the vulnerability and the HAFNIUM attribution publicly on 2 March 2021. The Cybersecurity and Infrastructure Security Agency (CISA) issued Emergency Directive 21-02 on 3 March 2021 requiring Federal civil agencies to apply the patches or to disconnect their on-premises Exchange installations. The operational reality of the campaign — that the patches were necessary but not sufficient, because already-compromised servers retained the operator-deployed web shells regardless of the underlying vulnerability fix — produced a sustained tail of investigation, remediation, and re-compromise across the subsequent weeks.5

Disclosure

The Federal Bureau of Investigation, in an unprecedented operational action, obtained a search-and-seizure warrant from the United States District Court for the Southern District of Texas in April 2021 authorising the FBI to access compromised Microsoft Exchange Servers in the United States and to remove the operator-deployed web shells from those servers without the prior knowledge or consent of the affected server owners. The warrant — granted on 9 April 2021 and executed across the subsequent weeks — was the first publicly known instance of such an FBI cleanup operation. The Justice Department announced the action on 13 April 2021, characterising the operation as a removal of malicious software from hundreds of compromised Exchange installations across the United States. The legal basis (warranted access to private systems for the purpose of removing operator-deployed malware) has been the subject of subsequent academic and policy analysis.6

The formal attribution of the HAFNIUM operation to the People's Republic of China's Ministry of State Security was made on 19 July 2021 in a coordinated statement issued simultaneously by the United States Government, the United Kingdom Government, the European Union, NATO, Japan, Australia, New Zealand, and Canada. The 19 July 2021 attribution statement was the broadest coordinated Western-and-allied-state attribution of state-level cyber activity on the public record at the date of the statement. The United States Department of Justice, on the same date, unsealed indictments against four MSS officers attached to the Hainan State Security Department in connection with separate cyber-intrusion activity tracked as APT40 / Leviathan; the indictments and the broader 19 July 2021 statement together constituted the most extensive public-record specification of MSS-attributed cyber activity to that point.7

The Chinese Government rejected the attribution. The Ministry of Foreign Affairs of the People's Republic of China characterised the 19 July 2021 statement as "groundless" and the underlying allegations as "fabrications"; subsequent Chinese Government statements have continued to deny state direction of the activity.8

Legacy

HAFNIUM is the canonical reference case for state-level mass-exploitation as a tradecraft. The operational pattern — the use of unreported zero-day vulnerabilities for an initial limited-targeting campaign, followed (when the operators identified that public disclosure was imminent) by the deliberate burning of those vulnerabilities through indiscriminate mass exploitation to maximise the operator's pre-patch access — has been substantially replicated in subsequent campaigns. The pattern has been incorporated into the threat-modelling work of major Western Government and private-sector cyber-defence institutions and into the threat assessments of partner governments.9

The FBI cleanup operation of April 2021 is a separate matter of public-record significance. The operation established the precedent that the United States Government, by judicial warrant, could access privately-owned compromised systems within the United States and remove operator-deployed malware without the prior consent of the system owner. The legal basis for the operation has been the subject of substantial subsequent academic commentary, including critical commentary from civil-liberties organisations and from academic legal scholars. The operation has been replicated in successor cases including the May 2023 takedown of the Snake malware (attributed to FSB Centre 16) and others, suggesting that the cleanup-by-warrant model has become an established United States Government cyber-operation tool.10

The 19 July 2021 coordinated attribution is the broadest Western-and-allied-state attribution of state-level cyber activity on the public record. The participation of NATO, the EU, and the entire Five Eyes membership plus Japan in a single co-ordinated attribution statement — without the earlier-stage incremental escalation that has characterised most prior Western state attributions — has been characterised in subsequent academic analysis as marking a substantive shift in the Western institutional approach to public attribution of state-level cyber activity.11

This dossier is the mass-exploitation analogue to the supply-chain compromise documented in SolarWinds (SUNBURST) (2020) and to the personnel-data exfiltration documented in the 2015 OPM Data Breach. It connects to the offensive-cyber-tools disclosure of Vault 7 (2017) in the cyber-operations literature and to Stuxnet as the canonical Western-state offensive-cyber operation. The agency-level entries most directly engaged are the Central Intelligence Agency and the National Security Agency by reason of the analytic and warning function; the country-level context is on the pages for the United States and China.

Sources & Further Reading

  1. Microsoft Corporation, Microsoft Exchange Server product documentation; industry-survey reporting on Exchange Server deployment, 2020–2021.
  2. Microsoft Security Response Center, "HAFNIUM targeting Exchange Servers with 0-day exploits," 2 March 2021; Orange Tsai (DEVCORE), public statements on the ProxyLogon disclosure timeline, 2021; National Vulnerability Database entries for the four ProxyLogon CVEs: CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, CVE-2021-27065.
  3. Microsoft Threat Intelligence Center (MSTIC), HAFNIUM activity reporting, March 2021 onward; Volexity, "Operation Exchange Marauder: Active Exploitation of Multiple Zero-Day Microsoft Exchange Vulnerabilities," 2 March 2021.
  4. Microsoft Corporation, public statements on the scale of the HAFNIUM mass-exploitation campaign, March 2021; CrowdStrike, FireEye / Mandiant, ESET, and Kaspersky parallel reporting on post-disclosure mass exploitation.
  5. Microsoft Security Response Center, out-of-band patch release, 2 March 2021; United States Cybersecurity and Infrastructure Security Agency, Emergency Directive 21-02, 3 March 2021.
  6. United States Department of Justice, "Justice Department Announces Court-Authorized Effort to Disrupt Exploitation of Microsoft Exchange Server Vulnerabilities," press release of 13 April 2021; warrant in In re: Search of Microsoft Exchange Servers Infected with Web Shells, US District Court for the Southern District of Texas, granted 9 April 2021.
  7. United States Government statement, "The United States, Joined by Allies and Partners, Attributes Malicious Cyber Activity and Irresponsible State Behavior to the People's Republic of China," 19 July 2021; coordinated statements by the United Kingdom Government, the European Union, NATO, Japan, Australia, New Zealand, and Canada, same date; United States Department of Justice, indictment in United States v. Ding Xiaoyang et al., 19 July 2021.
  8. Ministry of Foreign Affairs of the People's Republic of China, statement of 20 July 2021; subsequent Chinese Government statements on the attribution.
  9. Ben Buchanan, The Hacker and the State: Cyber Attacks and the New Normal of Geopolitics (Harvard University Press, 2020); academic and private-sector analysis of state-level mass-exploitation tradecraft, 2021 onward.
  10. Brett Max Kaufman and others, ACLU and EFF commentary on the FBI Exchange cleanup warrant, April 2021 onward; United States Department of Justice statements on subsequent cleanup-by-warrant operations including the May 2023 Snake malware takedown.
  11. Atlantic Council Cyber Statecraft Initiative analysis of the 19 July 2021 attribution; UK National Cyber Security Centre statements, July 2021 onward; academic analysis in Lawfare, Just Security, and the trade press.