logo svg
logo

November 5, 2026

Updated: November 5, 2026

WannaCry Ransomware Attack: Timeline, Impact and Lessons

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

Mohammed Khalil

Featured Image

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.

The quick answer

QuestionShort 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 impactEngland'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.

What Was WannaCry?

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.

The WannaCry Timeline

WannaCry's story starts before the outbreak and ends long after it. The dates below come from Microsoft, CISA, NVD and the governments involved.

DateEventSource
March 14, 2017Microsoft publishes MS17-010, a Critical update for the SMBv1 serverMicrosoft bulletin
April 14, 2017The Shadow Brokers group publicly releases EternalBlue and other exploitsPublic reporting
May 12, 2017WannaCry starts spreading; early reports around 4:00 a.m. EDTCISA TA17-132A
May 12, 2017A researcher registers the kill-switch domain, halting new detonationsUK NAO; Microsoft
May 13, 2017Microsoft releases emergency patches for Windows XP, Windows 8 and Windows Server 2003CISA TA17-132A
October 27, 2017UK National Audit Office publishes its NHS investigationUK NAO
December 19, 2017US and UK publicly attribute WannaCry to North KoreaWhite House; UK FCO
September 6, 2018US unseals charges against Park Jin Hyok; Treasury sanctions him and Chosun ExpoUS Treasury
July 30, 2020EU imposes its first cyber sanctions, citing WannaCryCouncil of the EU
February 10, 2022CISA adds CVE-2017-0144 to the Known Exploited Vulnerabilities catalogNVD
WannaCry timeline from the March 2017 MS17-010 patch through the May 2017 outbreak to the 2022 CISA KEV listing

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.

How WannaCry Spread: EternalBlue, MS17-010 and DoublePulsar

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.

Which CVE is EternalBlue?

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.

The infection flow

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.

WannaCry worm flow: scan for SMB, exploit SMBv1, load payload, check kill switch, then stop or encrypt and spread

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.

The Kill Switch: How WannaCry Was Stopped

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.

Impact: The NHS and the Wider World

The NHS

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.

MeasureFigureSource
Hospital trusts affectedAt least 81 of 236 trusts in England (infected or disrupted)NAO, October 2017
Primary care and other organizations infected603, including 595 GP practicesNAO, October 2017
Appointments cancelled6,912 identified; over 19,000 estimated in totalNAO, October 2017
Emergency careFive accident and emergency departments diverted some patientsNAO, October 2017
Ransom paidNone by any NHS organization, per the department, NHS England and the National Crime AgencyNAO, October 2017
Estimated costAbout £92 million: £19 million lost output and £73 million in IT costsDHSC, 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.

Global estimates

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.

Who Was Behind WannaCry?

Attribution came seven months after the attack, from several governments acting together. The wording each used matters.

DateWhoWhat they said or did
December 19, 2017United 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, 2017United 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, 2018United 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, 2020European 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.

Lessons From WannaCry, and Why SMBv1 Still Shows Up

Nearly a decade later, WannaCry's lessons are mostly about basics that are hard to do everywhere at once.

  1. Patch critical, wormable flaws on a deadline, not a cycle. MS17-010 was out two months early. A wormable, unauthenticated network flaw deserves an emergency path, the same thinking behind our zero-day exploit guide.
  2. Unsupported systems are a known liability. The NHS had been told in 2014 to plan its move away from Windows XP. Systems that cannot be patched need isolation, not hope.
  3. Flat networks turn one infection into an outbreak. Internal SMB was the highway. Segmentation decides whether a worm reaches ten machines or ten thousand.
  4. Backups decide whether you pay. WannaCry deleted shadow copies on purpose. Offline or immutable backups with tested restores are what made recovery possible.
  5. Response plans need practice. The NAO found the health department had a plan but had not tested it locally. A rehearsed incident response plan shortens the first confused hours.

Why unpatched SMBv1 still appears in internal tests

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.

How to Detect WannaCry-Style Activity

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.

SignalWhat it can indicateWhere to look
One host connecting to many others on TCP 445 in a short timeWorm-style scanning or lateral movementFirewall, NetFlow, network detection
Outbound TCP 445 to internet addressesInternet scanning from an infected host; SMB should rarely leave the networkPerimeter firewall logs
SMBv1 negotiation on the networkA host still using SMBv1, vulnerable or notNetwork detection, server configuration audits
Deletion of Volume Shadow Copies or changes to boot recovery settingsRansomware preparing to block recovery (ATT&CK T1490)EDR, Windows process and command-line logging
Mass file renames or new encrypted file extensionsEncryption in progress (ATT&CK T1486)EDR, file server auditing
Lookups of the known WannaCry kill-switch domainsA WannaCry sample running somewhereDNS 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:

text
# 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 EnableSMB1Protocol

Run 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.

How to Prevent WannaCry-Style Attacks

The controls that would have stopped WannaCry are well known. The hard part is applying them to every host, including the ones nobody remembers.

Six defenses against WannaCry-style worms: patch, remove SMBv1, segment, isolate legacy, offline backups, detect and test
ControlWhat it doesWhat it does not stopHow to verify
Install MS17-010 and later cumulative updatesRemoves the EternalBlue entry pointThe next unpatched SMB or legacy-protocol flawPatch compliance reports plus an authenticated vulnerability scan
Disable or remove SMBv1Removes the vulnerable protocol entirelyDevices that cannot run SMBv2 or v3Configuration audit and network-side SMB version checks
Block inbound TCP 445 at the perimeterStops internet-to-internal worm spreadSpread that starts inside the networkExternal scan of your address ranges
Segment internal SMBLimits which zones can reach each other on 445Spread inside one flat segmentFirewall rule review and internal testing
Isolate unsupported and vendor-locked systemsContains medical, OT and lab devices that cannot be patchedDevices missing from the asset inventoryAsset inventory reconciliation
Offline or immutable backups with restore testsRecovery without paying a ransomDowntime and data changed since the last backupTimed restore exercises
Behavioral detection for scanning and recovery sabotageEarly warning and containmentAttacks that avoid the monitored behaviorsPurple-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.

How to Validate Your Defenses Safely

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.

FAQ

What was the WannaCry ransomware attack?

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.

Who was behind WannaCry?

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.

How was WannaCry stopped?

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.

What were EternalBlue and DoublePulsar?

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.

How much did WannaCry cost the NHS?

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.

Did paying the WannaCry ransom unlock files?

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.

Is WannaCry still a threat in 2026?

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.

Next Step: Check Your Network for the WannaCry Gap

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.

About The Author

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.

Sources and References

background
Let's hack you before real hackers do

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

Contact Us