November 5, 2026
Updated: November 5, 2026
The May 2017 ransomware worm that spread through unpatched SMBv1 to 150+ countries, was stopped by a kill switch, cost the NHS an estimated £92 million and was attributed to North Korea.
Mohammed Khalil

The WannaCry ransomware attack was a worm outbreak that spread across more than 150 countries on May 12, 2017, encrypting Windows computers that had not installed Microsoft's MS17-010 security update. It moved on its own through the SMBv1 file-sharing protocol using EternalBlue, an exploit leaked a month earlier, and was halted within hours by a "kill switch" domain. It disrupted a third of England's hospital trusts. The US, UK and allies attributed it to North Korea in December 2017. This profile covers the timeline, how it spread, the impact, attribution and the defenses that still matter.
| Question | Short answer |
|---|---|
| What was it? | A ransomware cryptoworm, also called WannaCrypt, WanaCrypt0r or WCry (MITRE ATT&CK S0366) |
| When? | Friday, May 12, 2017, with the main wave over the same day |
| How did it spread? | Automatically, through the SMBv1 flaw fixed by MS17-010, using the leaked EternalBlue exploit |
| How was it stopped? | A researcher registered a domain the malware checked before running, which acted as a kill switch |
| How big was it? | Over 150 countries; US and UK officials cited hundreds of thousands to 300,000 computers |
| Worst-documented impact | England's NHS: at least 81 of 236 trusts affected and an estimated £92 million cost |
| Who was behind it? | The US, UK, Australia, Canada, New Zealand and Japan attributed it to North Korea; the UK said Lazarus Group was "highly likely" responsible |
| Is it still a risk? | The 2017 campaign is over, but unpatched SMBv1 still appears on internal networks |
The one line to remember: WannaCry did not need a phishing click or a stolen password. One unpatched, reachable Windows host was enough.
WannaCry was a self-spreading ransomware program that encrypted files on Windows systems and demanded payment in bitcoin. Unlike most ransomware, which arrives by email or through stolen remote-access credentials, it carried a worm component that scanned for other computers and infected them through a vulnerability in Microsoft's Server Message Block version 1 (SMBv1) protocol.
The ransom note asked for about $300 in bitcoin, according to CISA alert TA17-132A, and CISA noted the software could run in as many as 27 languages. In practice, paying was a poor bet. At the US attribution briefing in December 2017, the White House said that paying the demands did not unlock victims' computers.
MITRE tracks the malware as WannaCry (S0366) and maps its behavior to techniques that defenders still see in modern attacks: exploitation of remote services (T1210) to spread, data encrypted for impact (T1486), and deletion of Volume Shadow Copies to block easy recovery (T1490). MITRE also lists the Lazarus Group as the group associated with the software.
What made WannaCry historic was not technical sophistication. It was the combination of a leaked, highly reliable network exploit with ransomware, released into a world where many organizations had not applied a patch that had been available for two months.
WannaCry's story starts before the outbreak and ends long after it. The dates below come from Microsoft, CISA, NVD and the governments involved.
| Date | Event | Source |
|---|---|---|
| March 14, 2017 | Microsoft publishes MS17-010, a Critical update for the SMBv1 server | Microsoft bulletin |
| April 14, 2017 | The Shadow Brokers group publicly releases EternalBlue and other exploits | Public reporting |
| May 12, 2017 | WannaCry starts spreading; early reports around 4:00 a.m. EDT | CISA TA17-132A |
| May 12, 2017 | A researcher registers the kill-switch domain, halting new detonations | UK NAO; Microsoft |
| May 13, 2017 | Microsoft releases emergency patches for Windows XP, Windows 8 and Windows Server 2003 | CISA TA17-132A |
| October 27, 2017 | UK National Audit Office publishes its NHS investigation | UK NAO |
| December 19, 2017 | US and UK publicly attribute WannaCry to North Korea | White House; UK FCO |
| September 6, 2018 | US unseals charges against Park Jin Hyok; Treasury sanctions him and Chosun Expo | US Treasury |
| July 30, 2020 | EU imposes its first cyber sanctions, citing WannaCry | Council of the EU |
| February 10, 2022 | CISA adds CVE-2017-0144 to the Known Exploited Vulnerabilities catalog | NVD |

Two gaps in that table explain most of the damage. The patch was public 59 days before the outbreak, and the exploit was public 28 days before it. Organizations with a working patch management process for critical updates were largely protected. Those that patched slowly, or ran systems Microsoft no longer supported, were not.
WannaCry's worm used three building blocks. The explanation below is conceptual: it covers what each part did, not how to reproduce it.
SMBv1 and MS17-010. SMB is the protocol Windows uses for file and printer sharing, normally over TCP port 445. Version 1 dates from an earlier era of networking. Microsoft's MS17-010 bulletin, published March 14, 2017, fixed several flaws that let a remote attacker run code by sending specially crafted messages to an SMBv1 server. It was rated Critical for every supported Windows release. Microsoft had already told administrators to stop using SMB1 in September 2016.
EternalBlue. EternalBlue was an exploit for one of those flaws. It was part of a set of tools the Shadow Brokers group released publicly on April 14, 2017. Microsoft President Brad Smith wrote on May 14, 2017 that the exploits used in the attack were drawn from those stolen from the US National Security Agency. Because it needs no credentials and no user action, any unpatched host that can reach another host's port 445 can be compromised.
DoublePulsar. DoublePulsar was a kernel-level backdoor released in the same leak. Microsoft's analysis of WannaCrypt found that WannaCry ran kernel code that appeared to be copied from DoublePulsar, adjusted to drop and run the ransomware on 32-bit and 64-bit systems.
MS17-010 covers six CVEs, CVE-2017-0143 through CVE-2017-0148. Most references, including the CISA Known Exploited Vulnerabilities entry, associate EternalBlue with CVE-2017-0144, which NVD describes as an SMBv1 remote code execution flaw affecting Windows Vista through Windows Server 2016. Microsoft's May 2017 WannaCrypt analysis cited CVE-2017-0145, a sibling flaw in the same bulletin. For defenders the distinction does not change the action: both are fixed by MS17-010, and both were added to the KEV catalog on February 10, 2022.
Once running on a computer, WannaCry did four things in order, according to Microsoft and CISA. It scanned both the local network and randomly generated internet IPv4 addresses for systems listening on port 445. It used EternalBlue against hosts missing MS17-010. It used the DoublePulsar-derived code to run its dropper on each new victim. Then, before encrypting anything, it tried to contact a hard-coded web domain. If the domain did not answer, it encrypted files, deleted Volume Shadow Copies, displayed the ransom note and started the next round of scanning.

Microsoft noted that its exploit code worked against unpatched Windows 7, Windows Server 2008 and earlier systems, and that Windows 10 was not affected by this attack. The initial entry point was never confirmed. Early reporting suspected phishing, and CISA's first alert listed it as a possibility, but the worm design meant one exposed SMB service was enough. Inside a flat network, the same mechanism turned one infection into many, the pattern our guide to lateral movement describes.
Every copy of WannaCry checked whether an unregistered, random-looking domain answered before doing any damage. On May 12, a security researcher, widely reported to be Marcus Hutchins, noticed the domain in the code and registered it. From then on, new infections found the domain alive and stopped without encrypting or spreading. The UK National Audit Office later concluded that the attack "could have caused more disruption" if the kill switch had not been activated, and that NHS regions hit early that morning, before activation, saw more infections.
Three details matter for defenders:
Why the authors built a kill switch is not known. One common theory is that it was meant to detect analysis sandboxes, which often answer every domain lookup. Whatever the intent, it shows how much a single observer reading the code can change the course of an outbreak.
England's National Health Service is the best-documented victim, thanks to the UK National Audit Office's investigation of WannaCry and the NHS, published October 27, 2017, and a later Department of Health and Social Care cost estimate.
| Measure | Figure | Source |
|---|---|---|
| Hospital trusts affected | At least 81 of 236 trusts in England (infected or disrupted) | NAO, October 2017 |
| Primary care and other organizations infected | 603, including 595 GP practices | NAO, October 2017 |
| Appointments cancelled | 6,912 identified; over 19,000 estimated in total | NAO, October 2017 |
| Emergency care | Five accident and emergency departments diverted some patients | NAO, October 2017 |
| Ransom paid | None by any NHS organization, per the department, NHS England and the National Crime Agency | NAO, October 2017 |
| Estimated cost | About £92 million: £19 million lost output and £73 million in IT costs | DHSC, September 2018 |
The NAO found that every infected organization shared the same weakness: unpatched or unsupported Windows systems. It also found that managing internet-facing firewalls would have protected organizations whether or not they had patched. NHS Digital had issued critical alerts in March and April 2017 telling organizations to patch, but before May 12 the department had no formal way to check whether local bodies had acted. NHS Digital said it believed no patient data was compromised or stolen.
The cost figure comes from the department's September 2018 progress update, which calls it an approximate estimate because no data was systematically collected during the response. The same document describes new investment in local infrastructure and a national Windows 10 licensing agreement that followed the attack. For broader context on how the sector has fared since, see our healthcare cybersecurity statistics.
Counts of affected computers vary because they come from different sources at different times:
No government has published an authoritative global cost. A private estimate of up to US$4 billion is widely repeated, including on Wikipedia, but its method is not public, so treat it as an order-of-magnitude figure rather than a measurement. The NHS figure above is the most rigorous cost estimate available for any single victim. For current ransomware cost and frequency data, see our ransomware statistics.
Attribution came seven months after the attack, from several governments acting together. The wording each used matters.
| Date | Who | What they said or did |
|---|---|---|
| December 19, 2017 | United States (White House) | Publicly attributed WannaCry to North Korea, "with evidence" and "with partners"; said the UK, Australia, Canada, New Zealand and Japan had seen the analysis and joined in denouncing North Korea |
| December 19, 2017 | United Kingdom (Foreign Office) | Said the National Cyber Security Centre assessed it was "highly likely" that North Korean actors known as the Lazarus Group were behind WannaCry |
| September 6, 2018 | United States (Justice Department and Treasury) | Charges against North Korean programmer Park Jin Hyok unsealed; Treasury sanctioned him and the company Chosun Expo, linking him to WannaCry, the 2016 Bangladesh Bank theft and other attacks |
| July 30, 2020 | European Union (Council) | First EU cyber sanctions, against six individuals and three entities linked to WannaCry, NotPetya, Operation Cloud Hopper and an attempted attack on the OPCW |
The White House briefing and the UK Foreign Office statement were coordinated on the same day. The Treasury designation stated that the Justice Department unsealed criminal charges against the same individual. The Council of the EU noted that its sanctions "should be distinguished from attribution of responsibility to a third state."
Two cautions help readers use this record well. First, "highly likely" is an intelligence assessment, not a court finding, and a criminal complaint is an allegation. Some researchers have questioned parts of the attribution. Second, WannaCry looks unlike most later North Korean operations, which focus on theft, especially of cryptocurrency, as our article on how North Korean hackers stole billions in crypto explains. Our Lazarus Group profile covers the wider actor and the same attribution caveats.
Nearly a decade later, WannaCry's lessons are mostly about basics that are hard to do everywhere at once.
Microsoft stopped installing SMBv1 by default starting with Windows 10 and Windows Server version 1709, and Windows 11 does not include it by default. Yet SMBv1 and missing MS17-010 patches are still a recurring finding in internal network assessments. The reasons are structural:
That is why an internal penetration test still checks for SMBv1 and missing MS17-010 patches in 2026: the question is not whether the flaw is old, but whether any host in your environment still has it.
WannaCry itself is easy for modern endpoint tools to recognize. The behaviors behind it, wormable SMB exploitation, mass scanning and recovery sabotage, still show up in newer threats, so detections should target behavior, not one malware family.
| Signal | What it can indicate | Where to look |
|---|---|---|
| One host connecting to many others on TCP 445 in a short time | Worm-style scanning or lateral movement | Firewall, NetFlow, network detection |
| Outbound TCP 445 to internet addresses | Internet scanning from an infected host; SMB should rarely leave the network | Perimeter firewall logs |
| SMBv1 negotiation on the network | A host still using SMBv1, vulnerable or not | Network detection, server configuration audits |
| Deletion of Volume Shadow Copies or changes to boot recovery settings | Ransomware preparing to block recovery (ATT&CK T1490) | EDR, Windows process and command-line logging |
| Mass file renames or new encrypted file extensions | Encryption in progress (ATT&CK T1486) | EDR, file server auditing |
| Lookups of the known WannaCry kill-switch domains | A WannaCry sample running somewhere | DNS logs |
Indicators of compromise and detection rules from 2017 are available in CISA alert TA17-132A. If DNS logs show the kill-switch domains, investigate the host rather than blocking the lookup.
To find SMBv1 before an attacker does, Microsoft documents built-in PowerShell checks. The commands below only read configuration:
# Is the SMBv1 optional feature installed? (Windows client and server, run as administrator)
Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
# Is the SMBv1 server enabled? (no elevation needed)
Get-SmbServerConfiguration | Format-List EnableSMB1ProtocolRun them through your endpoint management tool across the estate, and pair them with a network-side view so you also catch printers, storage and appliances that PowerShell cannot reach. Microsoft's SMB detection and disable guide covers removal on each Windows version.
The controls that would have stopped WannaCry are well known. The hard part is applying them to every host, including the ones nobody remembers.

| Control | What it does | What it does not stop | How to verify |
|---|---|---|---|
| Install MS17-010 and later cumulative updates | Removes the EternalBlue entry point | The next unpatched SMB or legacy-protocol flaw | Patch compliance reports plus an authenticated vulnerability scan |
| Disable or remove SMBv1 | Removes the vulnerable protocol entirely | Devices that cannot run SMBv2 or v3 | Configuration audit and network-side SMB version checks |
| Block inbound TCP 445 at the perimeter | Stops internet-to-internal worm spread | Spread that starts inside the network | External scan of your address ranges |
| Segment internal SMB | Limits which zones can reach each other on 445 | Spread inside one flat segment | Firewall rule review and internal testing |
| Isolate unsupported and vendor-locked systems | Contains medical, OT and lab devices that cannot be patched | Devices missing from the asset inventory | Asset inventory reconciliation |
| Offline or immutable backups with restore tests | Recovery without paying a ransom | Downtime and data changed since the last backup | Timed restore exercises |
| Behavioral detection for scanning and recovery sabotage | Early warning and containment | Attacks that avoid the monitored behaviors | Purple-team or attack simulation exercises |
Two points from the NAO findings are worth repeating for any large organization. Patching alone was not the only control that worked: well-managed internet-facing firewalls also protected NHS bodies. And central guidance is not the same as central assurance. If you cannot measure whether a critical patch reached every site, you do not know whether you are protected. Our guide to vulnerability management covers how to turn scanning into tracked remediation.
Checking for WannaCry-style exposure does not require running WannaCry or any exploit against production systems. A safe validation program usually covers:
The last step is where an internal test or network penetration test adds most value: it checks the assumptions in your patch reports and firewall rules against what an attacker on the inside can actually reach.
WannaCry was a global ransomware outbreak that began on May 12, 2017. A self-spreading worm infected Windows computers through an SMBv1 flaw that Microsoft had patched in MS17-010 two months earlier, encrypted their files and demanded about $300 in bitcoin. It reached over 150 countries before a kill switch halted it.
The United States publicly attributed WannaCry to North Korea on December 19, 2017, joined by the UK, Australia, Canada, New Zealand and Japan. The UK said it was "highly likely" that the Lazarus Group was responsible. In September 2018, US prosecutors charged North Korean programmer Park Jin Hyok, and Treasury sanctioned him.
A researcher registered a domain that WannaCry checked before running. Once the domain answered, new infections stopped without encrypting files or spreading. Computers already encrypted were not restored, and machines behind proxies could still detonate because the check was not proxy-aware.
EternalBlue was an exploit for an SMBv1 remote code execution flaw fixed by MS17-010, publicly leaked by the Shadow Brokers on April 14, 2017. DoublePulsar was a kernel backdoor from the same leak. WannaCry used EternalBlue to break in and code adapted from DoublePulsar to run its payload.
The UK Department of Health and Social Care estimated the cost at about £92 million: £19 million in lost output and £73 million in IT costs. The National Audit Office found at least 81 of 236 hospital trusts affected and estimated more than 19,000 appointments cancelled. No NHS organization paid the ransom.
Not reliably. The White House said in December 2017 that paying the demands did not unlock victims' computers. The NHS did not pay. Recovery for most victims came from backups and rebuilding systems.
The original 2017 campaign is over, and patched or SMBv1-free systems are not vulnerable to it. The underlying risk remains wherever MS17-010 is missing or SMBv1 is still enabled, which internal assessments continue to find on legacy servers, storage devices and vendor-managed equipment.
WannaCry succeeded because of gaps that are easy to describe and hard to close everywhere: a missed critical patch, an old protocol left on, a flat internal network and backups that had not been tested. The useful questions for 2026 are concrete. Does every host that speaks SMB, including printers, storage and clinical or industrial devices, have SMBv1 off? Can a workstation in one segment reach port 445 on servers in another? Would you know within minutes if one host began scanning the rest?
DeepStrike's penetration testing services include infrastructure penetration testing and red team engagements, with every assessment conducted manually. To scope an internal network test that checks for legacy protocols, missing patches and lateral movement paths, contact DeepStrike.
Mohammed Khalil is a Cybersecurity Architect at DeepStrike, specializing in advanced penetration testing and offensive security operations. With certifications including CISSP, OSCP, and OSWE, he has led numerous red team engagements, focusing on cloud security, application vulnerabilities, and adversary emulation. His work involves dissecting complex attack chains and developing resilient defense strategies for clients in the finance, healthcare, and technology sectors.

Stay secure with DeepStrike penetration testing services. Reach out for a quote or customized technical proposal today
Contact Us