WannaCry Ransomware: Attack Lifecycle And Incident Response Guide



WannaCry ransomware is a self-propagating cyberweapon that exploited a critical Windows vulnerability to encrypt files across more than 230,000 systems in over 150 countries.
Unlike conventional ransomware, WannaCry spreads automatically across networks without phishing, malicious downloads, or any user interaction. The May 12, 2017, deployment remains the most impactful automated ransomware campaign on record.
To understand its scope, it helps to review what ransomware is and how encryption attacks operate.
WannaCry ransomware history and attribution
WannaCry did not emerge from a single threat actor operating in isolation. Its creation involved stolen intelligence-agency tools, a state-sponsored intrusion group, and a two-month window during which organizations failed to apply a patch.
The Shadow Brokers, a separate threat actor, had stolen the underlying exploit (EternalBlue) from the US National Security Agency (NSA) and publicly leaked it in April 2017. Lazarus Group weaponized it into WannaCry.
Understanding that chain clarifies both the attack's scale and its continued relevance.
The May 2017 outbreak
WannaCry first appeared on May 12, 2017, and propagated to systems across more than 150 countries within hours of deployment. Europol and Kaspersky Lab reported more than 230,000 infected systems within the first 24 hours. 48 NHS trusts were affected, approximately 20,000 appointments were canceled, and NHS costs ultimately exceeded $100 million. The National Health Service was among the earliest and hardest-hit institutions in the outbreak.
FedEx, Renault, Nissan, and Telefónica were among the multinational organizations disrupted globally. Cyber risk modeling firm Cyence estimated economic losses of up to $4 billion, though actual Bitcoin collected by the operators remained under $100,000. The kill switch disrupted payment workflows before most victims could complete transactions.
The ransom demand was $300 in Bitcoin, rising to $600 after 72 hours. This financial outcome later informed the attribution analysis, which linked it to a state-sponsored actor rather than a financially motivated criminal group.
Who is behind WannaCry?
The US, UK, Australia, Canada, New Zealand, Japan, and Denmark jointly attributed WannaCry to North Korea's Lazarus Group in December 2017.
In 2018, the US Department of Justice filed a criminal complaint against Park Jin Hyok, a member of the Lazarus Group. A federal indictment unsealed in February 2021 expanded the charges to include Jon Chang Hyok and Kim Il. All three were identified as members of RGB units responsible for WannaCry and other cyberattacks.
The kill switch and its limits
British cybersecurity researcher Marcus Hutchins halted the initial WannaCry outbreak on May 12, 2017, by registering a kill switch domain hard-coded into the malware's binary. WannaCry was programmed to query a specific domain (iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea[.]com) before initiating encryption. If the domain resolves to an active host, the malware terminates. Hutchins registered it for under $10, stopping the original variant from encrypting additional files.
Subsequent WannaCry variants removed the kill switch. These modified versions continue to circulate, particularly in environments running unpatched Windows systems with SMBv1 still enabled.
Is WannaCry still active?
Yes, WannaCry detections have not reached zero. The registered kill switch prevents the original variant from executing, but derivative strains with the kill switch removed remain in active circulation.
ESET reported that WannaCry accounted for 40.5% of all ransomware detections globally in Q1 2020, demonstrating that the threat remained significant more than three years after the initial outbreak. The group ranked fourth among the most-detected malware strains of 2021, making it the only legacy ransomware variant to appear on that year's top-ten list.
The consistent finding across vendors is that organizations continue to operate Windows systems without applying MS17-010, and WannaCry's automated scanning reliably finds them.
Industrial environments, legacy healthcare systems, and operational technology networks are disproportionately represented in ongoing WannaCry detections. These environments often cannot apply patches without operational downtime, creating a durable attack surface that WannaCry variants continue to exploit.
How WannaCry ransomware works
WannaCry operates through four sequential phases: initial access via exploitation of vulnerabilities, automated propagation, persistence establishment, and file encryption with ransom delivery. Each phase relies on the capabilities introduced by EternalBlue.
1. Initial access: exploiting CVE-2017-0144
WannaCry gains initial access by exploiting CVE-2017-0144, a critical vulnerability in the Windows Server Message Block v1 (SMBv1) protocol that Microsoft patched on March 14, 2017, as MS17-010.
The exploit allows remote code execution on unpatched Windows systems over TCP port 445 without authentication. Organizations that applied MS17-010 in the two months before the attack began were not exposed to the worm's entry mechanism.
2. Propagation via SMBv1
Once executing on a host, WannaCry immediately begins scanning for additional vulnerable systems. It probes both the local subnet and external IP ranges for open port 445.
When it identifies an unpatched host, it delivers the EternalBlue exploit, installs itself, and restarts the propagation cycle from the newly infected machine.
This worm behavior is what allowed WannaCry to propagate at a scale no phishing-dependent ransomware could match
3. Persistence and lateral movement
WannaCry establishes persistence by creating a Windows service named "mssecsvc2.0" (displayed as "Microsoft Security Center (2.0) Service"), which allows the malware to survive reboots and continue spreading across the network. This is a legitimate-looking service name designed to avoid detection during routine process inspection.
WannaCry also routes command-and-control (C2) traffic over Tor using a custom cryptographic protocol, making C2 identification more difficult without blocking Tor traffic or performing deep packet inspection.
4. Encryption and ransom demand
WannaCry searches for files matching 179 extensions, including Office documents, PDFs, images, archives, databases, and source code. It encrypts them using RSA-2048 for key exchange and AES-128 for file encryption.
Upon completing encryption, WannaCry displays a ransom note demanding payment in Bitcoin, threatening to permanently delete files after 7 days.

Indicators of compromise (IOCs)
The following IOCs apply to the original WannaCry variant and many of its derivatives. Organizations running endpoint detection or network monitoring tools should incorporate these into their detection rule sets.
For identifying which specific ransomware strain has infected a system, the Proven Data ransomware ID tool can assist with variant confirmation.
Network traffic to port 445
WannaCry scans broadly for open TCP port 445 (SMBv1). Anomalous lateral or outbound connections to port 445 from hosts with no legitimate SMB sharing function are a strong behavioral indicator. Also monitor TCP ports 9001 and 9003, which WannaCry uses for Tor-based C2 communication.
Presence of the "mssecsvc2.0" service
The presence of a service named "mssecsvc2.0" or displayed as "Microsoft Security Center (2.0) Service" is a confirmed WannaCry IOC. This is not a legitimate Microsoft component. Its presence warrants immediate investigation and containment.
Kill switch domain connection attempts
WannaCry queries the domain iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea[.]com before executing. DNS queries or outbound connections to this domain from internal hosts confirm a WannaCry infection attempt. Because the domain now resolves, the original variant will not proceed to encryption, but its presence on the network still indicates a vulnerable, unpatched system and requires investigation.
Encrypted file extensions
Files appended with the .WCRY or .WNCRY extension have been encrypted by WannaCry. If these extensions appear across multiple hosts simultaneously, containment should begin immediately and before any reboot of affected systems.
WannaCry MITRE ATT&CK techniques (S0366)
WannaCry has the following confirmed technique mappings. These can be used to build detection rules, tune SIEM alerts, and prioritize defensive controls.
| TTP ID | Technique | WannaCry implementation |
|---|---|---|
| T1210 | Exploitation of Remote Services | Exploits CVE-2017-0144 (EternalBlue) via SMBv1 for initial access and lateral propagation |
| T1543.003 | Create or Modify System Process: Windows Service | Creates "mssecsvc2.0" service for persistence across reboots |
| T1083 | File and Directory Discovery | Scans for 179 file types by extension before initiating encryption |
| T1486 | Data Encrypted for Impact | Encrypts victim files using RSA-2048 and AES-128; demands $300–$600 in Bitcoin |
| T1573.002 | Encrypted Channel: Asymmetric Cryptography | Routes C2 traffic over Tor using a custom cryptographic protocol |
| T1222.001 | File and Directory Permissions Modification: Windows Permissions | Modifies file permissions to facilitate the encryption process |
Lessons learned: what WannaCry exposed about security posture
WannaCry's global reach was not the product of a novel or difficult exploit. The EternalBlue vulnerability had been publicly disclosed and patched two months before the attack. The organizations most severely affected shared a common profile: systems that had not applied an available, vendor-supported patch.
This pattern repeats across incident investigations. Organizations pass compliance audits but leave known vulnerabilities unaddressed, particularly when patching requires operational downtime or coordination across legacy systems.
"Compliance is a point-in-time checkbox. We've worked cases where organizations passed HIPAA audits but had unpatched VPN appliances with known critical CVEs sitting exposed. The risk assessment stated that access was restricted, but no one verified its implementation. Compliance tells you what you should do; security is what you actually do daily." Amr Fathy, Senior DFIR Engineer with expertise in adversary TTPs and post-compromise forensic analysis
What to do if WannaCry affects your network
If WannaCry activity is detected, the immediate priority is network containment before any remediation steps.
Do not reboot infected hosts before forensic imaging is complete. Rebooting can destroy volatile memory artifacts, including the prime number data needed for decryption key reconstruction. Disable SMBv1 on all reachable systems and block TCP port 445 at network segment boundaries to stop further propagation. Isolate affected hosts by removing them from the network without shutting them down.
Engaging a qualified ransomware incident response team is the recommended next step after containment. Responders can establish a forensic timeline, determine the original access vector, assess whether data exfiltration preceded encryption, and verify backup integrity before any restoration begins. For organizations in active crisis, emergency ransomware response is available 24/7.
Is there a free decryptor for Wannacry ransomware?
Free decryption tools were released for the original WannaCry variant in the weeks following the 2017 outbreak.
Their effectiveness depends on two conditions: the infected system must not have been rebooted after encryption, and the prime-number data used for key generation must still be in memory.
Derivative WannaCry variants with modified encryption implementations may not be compatible with decryptors built for the original strain. A professional assessment of the specific variant and its recoverable key material is necessary before attempting self-decryption.
Preventing and mitigating WannaCry ransomware
Defending against WannaCry requires controls at two levels: measures that prevent infection, and measures that limit the damage if a host is compromised.
Apply MS17-010 and disable SMBv1
The most direct prevention against WannaCry is to apply MS17-010 (CVE-2017-0144) and disable SMBv1 on all Windows systems.
These two steps remove the attack vector entirely. A disciplined patch management process should treat critical CVEs as time-sensitive operational tasks rather than items deferred to scheduled maintenance cycles.
Segment your network and block port 445
Network segmentation reduces the number of systems EternalBlue can reach if it enters the environment. Firewall rules blocking TCP port 445 at segment boundaries significantly limit the worm's lateral reach. This is especially relevant in industrial control systems and legacy healthcare deployments where disabling SMBv1 immediately may not be operationally feasible.
Maintain offline or immutable backups
WannaCry targets network shares, and connected or mapped backup volumes can be encrypted alongside primary data. Offline or immutable backups with tested restoration procedures are the appropriate standard.
Organizations seeking to evaluate their exposure can use a ransomware readiness assessment to identify gaps across patching, segmentation, and backup posture.
Develop and test an incident response plan
Developing and testing an incident response plan before an attack remains one of the highest-return investments in reducing recovery time. Organizations with documented and exercised runbooks recovered measurably faster during the 2017 WannaCry outbreak than those improvising containment decisions under pressure.


Written by
Amr Fathy is a dedicated cybersecurity professional with over 7 years of extensive experience in digital forensics, incident response, reverse engineering, and threat intelligence. He currently serves as Senior DFIR Engineer at Proven Data LLC, conducting triage collection, incident response, and digital forensics activities.



