EternalBlue is an exploit for CVE-2017-0144, a memory corruption flaw in the Server Message Block version 1 (SMBv1) driver of Microsoft Windows that lets an unauthenticated attacker run code with kernel privileges by sending crafted packets to TCP port 445. Among the named cases studied under vulnerabilities in cybersecurity, it is the reference example of how a single unpatched network service can turn an exploit into a self-propagating worm.
The exploit was developed by a United States intelligence agency, leaked by a group calling itself the Shadow Brokers in April 2017, and weaponized within weeks. Microsoft had already shipped the fix as security bulletin MS17-010 in March 2017, so the damage that followed was largely a story of delayed patching rather than a true zero-day.
How the EternalBlue exploit corrupts kernel memory
EternalBlue chains three separate bugs in the SMBv1 server driver srv.sys to achieve a controlled overwrite in the non-paged kernel pool. The central flaw sits in the routine that converts OS/2 extended attribute lists (FEA lists) into the native Windows NT format, where a size field is recalculated with a 16-bit versus 32-bit arithmetic error.
Because of that error, the driver allocates a buffer that is too small and then copies the full attacker-supplied list into it, producing a classic buffer overflow. A second bug lets the attacker send an oversized attribute list through a sequence of Trans2 secondary requests, and a third makes it possible to reserve kernel memory of a chosen size. Together they support heap grooming: the attacker fills the pool with predictable SMBv2 buffers so that the overflow lands on a structure whose pointer can be hijacked.
The table below summarizes the main stages an EternalBlue attack follows on the wire.
| Stage | What the attacker sends | Effect on the target |
|---|---|---|
| Connection | SMBv1 negotiation on port 445 | Anonymous session is established |
| Grooming | Many SMBv2 packets of fixed size | Kernel pool layout becomes predictable |
| Overflow | Malformed FEA list via Trans2 requests | Adjacent pool structure is overwritten |
| Execution | Shellcode reached through a hijacked pointer | Code runs in ring 0 as SYSTEM |
| Persistence | Payload such as a kernel backdoor | Attacker can load further modules |
In the original leaked toolkit, the payload was usually DoublePulsar, a memory-resident kernel implant that waits for further commands over SMB. Because the code runs before any authentication, no user interaction and no credentials are required, which classifies EternalBlue as a wormable remote code execution exploit.
The MS17-010 vulnerability family
EternalBlue is the best-known member of a cluster of six SMBv1 vulnerabilities fixed together in MS17-010. Several sibling exploits from the same leak target different bugs in that cluster, and defenders often treat them as one risk because a single update closes all of them.
| Exploit name | Primary weakness used | Typical targets |
|---|---|---|
| EternalBlue | FEA list size miscalculation | Windows 7 and Server 2008 R2 |
| EternalRomance | Type confusion in transaction handling | Windows XP through Server 2012 |
| EternalSynergy | Transaction handling with info leak | Windows 8 and Server 2012 |
| EternalChampion | Race condition in transactions | Windows 7 and earlier |
The CVE record assigns EternalBlue a high CVSS base score, but the score understates its practical impact. The flaw is in the CISA KEV catalog, has public Metasploit modules, and continues to receive a very high EPSS probability, which illustrates why exploit availability matters as much as the base score when prioritizing fixes.
Outbreaks that made EternalBlue famous
EternalBlue became a household name because criminal and state actors embedded it in self-spreading malware within weeks of the leak. Each campaign used the exploit to jump from one Windows host to the next across flat internal networks.
| Campaign | Date | Role of EternalBlue | Consequence |
|---|---|---|---|
| WannaCry | May 2017 | Worm propagation to random and local addresses | Hundreds of thousands of hosts encrypted |
| NotPetya | June 2017 | Lateral movement alongside credential theft | Destructive wiper disguised as ransomware |
| Adylkuzz | Spring 2017 | Silent spread of a mining payload | Cryptojacking on unpatched servers |
| Later botnets | 2018 onward | Reused module for internal spreading | Persistent infections in legacy networks |
WannaCry stopped spreading mainly because a researcher registered a domain that served as an accidental kill switch, not because of patching. NotPetya was more damaging: it combined EternalBlue with credential harvesting, so even patched machines fell once a single administrator account was compromised. Microsoft took the rare step of releasing emergency patches for Windows XP and Server 2003, systems that were already out of support.
Detecting and mitigating EternalBlue exposure
The definitive defense is to install MS17-010 or any later cumulative update and then disable SMBv1 entirely, since modern Windows versions do not need it for normal file sharing. Network controls reduce the blast radius when legacy systems cannot be patched quickly.
| Measure | What it prevents | Limitation |
|---|---|---|
| Apply MS17-010 | Exploitation of all six SMBv1 bugs | Requires reboot and change window |
| Disable SMBv1 | Any attack on the legacy protocol | Breaks very old devices and printers |
| Block port 445 at the perimeter | Internet-borne scanning and infection | No protection inside the network |
| Segment internal networks | Rapid lateral worm spread | Needs careful rule design |
| IDS signatures | Undetected exploitation attempts | Alerts only, does not block alone |
Detection relies on network signatures for malformed Trans2 and FEA traffic, on scanners that test for the MS17-010 patch state, and on endpoint telemetry that flags unexpected kernel threads. Vulnerability management teams usually find residual exposure in forgotten hosts: industrial workstations, medical devices and embedded Windows systems that sit outside the normal patch cycle.
Common misconceptions about EternalBlue
- EternalBlue was not a zero-day at the time of WannaCry; the patch had been public for about two months, making it an N-day vulnerability in practice.
- Blocking port 445 on the internet edge is not sufficient, because most real infections spread laterally inside corporate networks.
- Windows 10 was also vulnerable before patching, although the public exploit was most reliable on Windows 7 and Server 2008 R2.
- The exploit is not obsolete: scanners still find unpatched SMBv1 hosts years later, and security teams still see attempts in their logs.
In simple terms
EternalBlue is a master key for old Windows file sharing. Windows computers talk to each other through a service that shares files and printers. An older version of that service had a mistake in how it counted the size of certain messages, so a stranger could send a specially shaped message and take full control of the computer without a password.
The key was originally built by a government agency, then stolen and published online. Criminals copied it into programs that spread on their own from computer to computer. The fix already existed, so the lesson is simple: install updates promptly and switch off old features nobody uses.
A practical example
A regional hospital runs about 2,000 Windows workstations, plus several imaging stations on Windows 7 that the equipment vendor has not certified for updates. During a quarterly scan, the security team finds that 40 hosts still lack MS17-010 and still accept SMBv1 connections on port 445.
The team patches 32 office machines within a week and disables SMBv1 on them through group policy. The eight imaging stations cannot be updated, so engineers move them into an isolated network segment where only the archive server may reach them, and they add an intrusion detection rule for malformed Trans2 traffic.
Three months later, a contractor laptop infected with an old worm connects to the guest network and begins scanning for port 445. The detection rule fires, the segmentation blocks every attempt, and no clinical system is affected. The incident report recommends replacing the imaging stations, since isolation is a compensating control, not a fix.