EternalBlue: How a Leaked NSA Exploit Fueled WannaCry and NotPetya

In 2017, a cyber weapon reportedly built by the U.S. National Security Agency escaped into the wild. Within weeks, a tool called EternalBlue powered two of the most damaging cyberattacks in history, WannaCry and NotPetya. The story is a cautionary tale about secret vulnerabilities, but its most practical lesson is a familiar one: the patch was available before the attacks began.

What Is EternalBlue?
EternalBlue is an exploit for a flaw in version 1 of Microsoft’s Server Message Block protocol (SMBv1), which Windows uses for file and printer sharing. The flaw, tracked as CVE-2017-0144, let an attacker run code on an unpatched Windows machine remotely, without any user interaction, simply by sending specially crafted network traffic. Because no click was required, malware using it could spread automatically from one computer to the next.
The tool is widely attributed to the Equation Group, a hacking team that security researchers and later reporting linked to the NSA.
How It Leaked
- August 2016: A previously unknown group calling itself the Shadow Brokers appeared online, claiming to have stolen hacking tools from the Equation Group and offering them for auction.
- March 14, 2017: Microsoft released security update MS17-010, fixing the SMBv1 vulnerability for supported versions of Windows.
- April 14, 2017: The Shadow Brokers publicly released a large set of tools, including EternalBlue, making it freely available to anyone.
How the Shadow Brokers obtained the tools has never been publicly confirmed, and the group’s identity remains unknown. Some officials and researchers have suggested links to Russia, but no government has formally attributed the leak. Separate reporting described other incidents in which classified NSA material was taken from insiders and contractors, but none has been definitively tied to this release.
WannaCry: May 2017
On May 12, 2017, WannaCry ransomware began spreading worldwide, using EternalBlue to jump automatically between vulnerable computers. It infected more than 200,000 systems in roughly 150 countries, encrypting files and demanding payment in cryptocurrency. Hospitals in the UK’s National Health Service had to cancel appointments and divert ambulances. The outbreak slowed dramatically when a security researcher discovered and activated a built-in “kill switch.” In December 2017, the U.S. and U.K. governments publicly attributed WannaCry to North Korea.
NotPetya: June 2017
Six weeks later, NotPetya arrived through a compromised update to accounting software widely used in Ukraine, a classic supply chain attack. It then used EternalBlue and stolen credentials to spread across corporate networks around the world. Although it looked like ransomware, NotPetya was designed to destroy data, and paying could not recover files. Global shipping, pharmaceutical and logistics companies were among the hardest hit, and the White House estimated total damages at about $10 billion. In February 2018, the U.S. and U.K. attributed the attack to the Russian military.
The Patch Was Already Available
The most striking fact about both outbreaks is that Microsoft had released a fix two months before WannaCry. The organizations that suffered most were running unpatched systems, or older versions of Windows that no longer received updates. Microsoft took the unusual step of releasing emergency patches for unsupported systems such as Windows XP. Years later, security teams still find EternalBlue-vulnerable machines on corporate networks.

Lessons for Every Organization
- Patch promptly, especially critical flaws. Prioritize updates for vulnerabilities that can be exploited remotely. See our post on software updates.
- Retire unsupported systems. Operating systems that no longer receive security updates should be upgraded, replaced or isolated.
- Disable SMBv1. The outdated protocol is no longer needed in modern environments and is disabled by default in current versions of Windows.
- Never expose file sharing to the internet. Block SMB (TCP port 445) at the network perimeter.
- Segment your network. Limiting which systems can talk to each other keeps a single infection from spreading everywhere.
- Keep offline backups. Neither WannaCry nor NotPetya could touch backups that were disconnected. Learn more in our guide to backing up your data.
- Know what you have. An accurate inventory of devices and software is the only way to be sure nothing was missed.
The Bottom Line
EternalBlue raised hard questions about governments stockpiling vulnerabilities instead of disclosing them. For most organizations, though, the takeaway is practical: the damage came from systems that hadn’t been patched or upgraded. Basic hygiene, applied consistently, would have stopped both attacks. If you’d like help assessing your exposure to known vulnerabilities, contact us.
0 Comments