Ransomware family
WannaCry Ransomware Decryption & Data Recovery
- Inactive
- High
- Some versions decryptable
WannaCry is the ransomware worm that spread worldwide in May 2017 by exploiting the EternalBlue SMB vulnerability (MS17-010), appending .WNCRY. The original campaign is long over, but unpatched legacy networks still get hit by residual samples that continue to spread automatically.
- First seen
- 2017-05-12
- File extensions
- .WNCRY .WCRY .WNCRYT
- Ransom notes
- @Please_Read_Me@.txt
- Affected platforms
- Windows
Family profile
- File extensions
- .WNCRY
- .WCRY
- .WNCRYT
- Ransom notes
- @Please_Read_Me@.txt
- @WanaDecryptor@.exe(弹窗界面)
- Contact patterns
- No mailbox — everything runs through the built-in Wana Decrypt0r window
- A small fixed set of Bitcoin addresses shown in the ransom window
- Aliases / versions
- WannaCrypt、WannaCryptor、Wana Decrypt0r 2.0、WCry、永恒之蓝勒索蠕虫
- First seen
- 2017-05-12
- Status
- Inactive
- Threat level
- High
- Affected platforms
- Windows
- Tags
- Prevalent in China
- Exploits vulnerabilities
- Legacy family
WannaCry has no general free decryptor. Historically, tools such as WanaKiwi / WanaKey existed; they searched the memory of a still-running infected host for prime numbers left over from RSA private key generation and rebuilt the key from them.
The conditions are severe:
- The host must never have been rebooted or powered off since encryption (the primes are lost on restart).
- The relevant memory pages must not yet have been overwritten by other processes.
- It mainly addressed specific implementations on legacy systems such as Windows XP and Windows 7.
For the overwhelming majority of cases that reach a responder after the fact — the server was long since restarted, or powered down for isolation — this path is no longer available, and No More Ransom lists no general WannaCry decryptor. Practical response therefore centres on backup restoration, unencrypted copies and low-level fragment recovery.
Overview
WannaCry broke out on 12 May 2017 and remains the widest-reaching ransomware incident on record. It combined encryption with worm-style self-propagation, using the EternalBlue exploit leaked by the Shadow Brokers in April 2017 against the MS17-010 flaw in the Windows SMB protocol to scan and infect unpatched hosts automatically. Microsoft had shipped a patch in March 2017, but many organisations had not installed it.
China context: the impact in China was particularly visible. University campus networks, government service counters, self-service petrol terminals, hospitals and many corporate networks were paralysed within days, and the incident drove lasting attention to patch management, blocking port 445 and network segmentation.
Can it still hit you today? The original campaign ended long ago, but the answer remains yes: China still runs many industrial control hosts, medical device terminals and specialised systems on Windows 7, Server 2008 or even XP that cannot be patched for compatibility reasons. As long as an infection source remains and port 445 is reachable internally, samples keep spreading on their own.
How to identify it
Extensions: .WNCRY for completed files, with .WNCRYT temporary files during the process; early samples also used .WCRY.
Note and interface: @Please_Read_Me@.txt is written into each encrypted directory, and @WanaDecryptor@.exe is dropped alongside it, displaying the red "Wana Decrypt0r 2.0" window with a countdown and multilingual text including Simplified Chinese. The wallpaper is replaced, and a fixed Bitcoin address is given with no contact email — a striking difference from virtually every modern family.
Propagation signature (the easiest thing to confirm): many hosts encrypted almost simultaneously with no shared-credential relationship between them; abnormal volumes of traffic on port 445; victims mostly legacy Windows 7, Server 2008 or XP systems missing MS17-010; and no hands-on intrusion artefacts — no RDP brute-force logs, no attacker-created accounts, no lateral-movement tooling, unlike Phobos or Makop.
Infection vectors
WannaCry propagation relies entirely on the MS17-010 (EternalBlue) SMB vulnerability, requiring neither user interaction nor hands-on operation: the sample checks whether the hard-coded kill-switch domain is reachable and skips encryption if so; scans port 445 on the local subnet and random public addresses; sends the EternalBlue payload to unpatched hosts and implants itself via DoublePulsar; then repeats on each new host for worm-style spread.
Today's scenarios have changed but the logic has not: a sample still running on a legacy host resumes scanning as soon as connectivity returns; medical imaging workstations and industrial HMI hosts cannot be upgraded because of vendor certification; contractor equipment carries the sample in; and flat networks with port 445 reachable between office, production and device segments let one infection spread everywhere.
Encryption behavior
WannaCry uses hybrid RSA and AES encryption: an AES key encrypts each file's contents and is itself encrypted with an RSA public key generated on the victim host, whose private key is in turn encrypted with the attacker's master RSA public key. Without that master private key, normal recovery is impossible.
The reason WanaKiwi-class tools worked is an implementation flaw: on some Windows versions the two large primes used to generate the RSA key pair were not promptly cleared from memory. If the host has never been rebooted since encryption and the relevant pages are intact, those primes can sometimes be located and the private key rebuilt. Power off or restart and that path disappears immediately.
Other behaviour: it drops and runs @WanaDecryptor@.exe to display the note. Some files are moved or replaced rather than securely overwritten in place, which leaves room for fragment recovery. As a 2017 implementation it does not use the intermittent-encryption optimisation of modern families, so whether large files retain usable blocks must be tested file by file.
Assess before you act
Recoverability assessment
Conclusion first: there is no general free decryptor for WannaCry, and the WanaKiwi-class memory key-recovery approach has conditions so strict that it no longer applies to most after-the-fact cases.
1. Memory key recovery (only under very specific conditions) If the infected host has never been rebooted or powered off since encryption and is still running, WanaKiwi or WanaKey can be attempted to search memory for the RSA primes and rebuild the private key. Any restart, shutdown or overwriting of those pages closes this path. So if the host is still on, the first reaction should be to disconnect the network and take a memory image, not to power it off — unlike the usual advice for other families.
2. Backups and snapshots Which machines were infected depends on which had MS17-010 with port 445 reachable, so patched backup servers, or ones on a different segment, are often completely intact. Check the backup server, offline media, NAS snapshots, cloud version history and hypervisor snapshots.
3. Unencrypted copies and uninfected hosts Because propagation depends on a vulnerability rather than credentials, patched hosts, Linux servers and network-isolated devices are usually unaffected and can serve as a baseline. Report exports, email attachments and read-only replicas should also be swept.
4. Fragment recovery and testing of large files For some files WannaCry replaces rather than securely overwrites the original, so unoverwritten sectors may still be recoverable, provided writes stop immediately. For databases and virtual disks, sample and test the encryption coverage before judging repair prospects.
We do not pay ransoms and do not negotiate for clients. WannaCry's payment channel stopped functioning long ago, so paying cannot produce a decryption.
Our response plan
Hit by WannaCry ransomware? What to do
Step 1: Containment and evidence preservation (do not power off yet)
WannaCry response has one priority that inverts the usual advice: if an infected host is still running, disconnect it from the network but do not rush to power it off, because memory may still hold the primes needed to rebuild the key. The correct order is: physically unplug or disable the NIC, take a memory image, then decide about shutdown.
At the network layer, immediately block ports 445 and 139 internally and isolate affected segments so the worm cannot reach other unpatched hosts. Segment-isolate unpatchable specialised devices (medical, industrial, inspection terminals) first.
Evidence to preserve: memory images, system and security logs from encrypted hosts, port 445 connection records, firewall and switch traffic logs, the original @Please_Read_Me@.txt notes, the @WanaDecryptor@.exe sample, encrypted samples with matching unencrypted originals, and an inventory of MS17-010 patch status across the estate.
Step 2: Family identification and infection scoping
Identifying WannaCry is comparatively easy: the .WNCRY extension, @Please_Read_Me@.txt, the red countdown window, a Bitcoin address with no contact email, and multiple legacy hosts encrypted in the same short window. What needs confirming is whether this is the original WannaCry sample or another family using EternalBlue to spread.
The more important work is scoping the infection and finding the source: scan the estate for MS17-010 status, count which hosts are encrypted, identify hosts not yet encrypted but already carrying the DoublePulsar backdoor, map internal port 445 reachability, and trace where patient zero came from (an external device? wireless? VPN?).
Memory key-recovery feasibility is assessed at the same time: which hosts are still powered on and never rebooted, and how valuable the data on them is.
Step 3: Recoverability assessment and recovery planning
Bucket the assessment by path:
- Hosts where memory key recovery is feasible: usually few, but potentially high value, and handled first.
- Backup available: the odds of intact backups are comparatively good in WannaCry cases, since patched backup servers are often uninfected; verify recovery point and integrity.
- Uninfected hosts as baseline: data on patched hosts, Linux servers and isolated devices.
- Fragment recovery required: for hosts with no backup where the memory path is unavailable, assess low-level recovery feasibility.
- Large-file testing: sample databases and virtual disks to scope structural damage.
- Confirmed unrecoverable: listed explicitly.
Because WannaCry cases often involve unpatchable specialised equipment (medical imaging, industrial HMI), the plan should also cover isolated-operation and replacement recommendations for those devices, not just data recovery.
Step 4: Recovery execution
All work is done on read-only images and copies, in this order:
- Memory key recovery: for eligible hosts, search the memory image for RSA primes, attempt to rebuild the private key, then decrypt on copies and validate the output.
- Backup restoration: restore core business systems first, validating in an isolated environment that the backup is not infected.
- Fragment recovery: low-level scanning of hosts without backups to extract unoverwritten original file fragments, archived and verified by type.
- Large-file repair: structural repair and data extraction for databases and virtual disks according to the test results.
- Baseline fill-in: supplement missing data from uninfected hosts and side-channel copies.
Rebuilds must close the vulnerability at the same time: every reinstalled or restored host must have MS17-010 applied or port 445 blocked before it joins the network, or it will be reinfected immediately by a residual source on the same segment. Each delivery batch is integrity-checked and validated for business availability.
Step 5: Attribution, hardening and sign-off
The investigation answers two questions: where the sample on patient zero came from (an external device, wireless, VPN, or a long-standing residual infection), and why it spread to so many hosts (the missing-patch inventory plus internal port 445 reachability).
Verifiable hardening checklist:
- Apply MS17-010 across the estate and establish periodic patch-coverage verification.
- Block ports 445 and 139 at the perimeter and internally, opening only genuinely required paths on an allowlist.
- Segment the network so office, production, device and medical/industrial networks are isolated, with SMB prohibited between segments.
- Place unpatchable legacy equipment in a dedicated isolation zone with port and removable-media restrictions, and plan replacement or upgrades.
- Retire out-of-support operating systems; where that is genuinely impossible, bring them under allowlist control.
- Backups on offline/off-site plus immutable storage with regular real restore drills.
- Deploy EDR and network-side anomaly monitoring with alerts on port 445 scanning behaviour.
The engagement closes with an incident report and a sign-off checklist for patching and port remediation.
Risk warning
What not to do
- Do not power off or reboot a still-running infected host as your first reaction. Memory key recovery depends on RSA primes that a restart destroys — disconnect the network and take a memory image first.
- Do not reconnect a recovered host to the network before MS17-010 is applied or port 445 is blocked; a residual infection source will reinfect it immediately.
- Do not believe claims that paying can decrypt WannaCry. Its payment and decryption channels stopped functioning long ago and payment cannot return data.
- Do not reinstall the OS or reformat affected volumes. Low-level fragment recovery has comparatively high value in WannaCry cases, and formatting destroys that option.
- Do not use an infected host to browse network shares or the backup server while investigating — that extends the worm's reach for it.
- Do not delete @Please_Read_Me@.txt, the @WanaDecryptor@.exe sample or encrypted files; they are required to establish the sample version and assess recovery feasibility.
Emergency response
Data already encrypted? Stop and let an engineer look first
We do not pay ransoms and we do not negotiate with attackers. Engineers run a free assessment first, then propose a recovery plan and a firm quote.
Related scenarios
Domain Controller Compromise and Estate-Wide Encryption
A compromised domain controller hands the attacker a legitimate administrator identity, allowing an encryptor to be pushed to every host at once through Group Policy or remote execution. This page covers how such incidents present, the correct order for Active Directory recovery, and how to decide between cleanup and full rebuild.
File Servers and NAS Encrypted by Ransomware
When shared folders on a file server or NAS are encrypted, drawings, contracts, archives, quotations and design sources all become unusable at once — and mapped drives spread the impact to every endpoint. This page covers how to gauge spread, what shadow copies and snapshots realistically offer, and how to sequence recovery by business value.
Backups Deleted or Destroyed
Modern ransomware follows a fixed sequence: destroy the backups, then encrypt the data — deleting shadow copies, encrypting repositories, disabling jobs, and exploiting backup software flaws to steal credentials. This page covers what can still be inventoried once backups fail, why replication propagates encrypted files off-site, and what offline and immutable copies are really worth.
Related industries
Manufacturing Ransomware Response and Recovery
Ransomware in manufacturing hits information systems and production cadence at the same time: with ERP down there are no orders, with MES down there is no schedule, and an encrypted drawing library takes the process documentation for an entire product line with it. This page covers the asset profile, recovery priorities and targeted defences.
Healthcare Ransomware Response and Recovery
When a hospital is hit, registration, consultation, orders, billing, laboratory and imaging fail at the same moment and care falls back to paper. This page covers the healthcare threat picture, a recovery priority built around clinical continuity, and the handling of patient data and compliance obligations.
Government and Public Sector Ransomware Response
Public sector ransomware incidents run on three lines at once: service interruption, data security and mandatory reporting. When document circulation, archives and integrated service platforms stop, both public services and internal operations are affected. This page covers the handling sequence, reporting duties and hardening priorities.
Similar families
- No public decryptor
TellYouThePass
TellYouThePass is the archetypal vulnerability-driven ransomware family in China, mass-deployed against internet-facing ERP, OA, finance and middleware systems. It appends .locked and hits both Windows and Linux servers. No public decryptor exists.
- Some versions decryptable
GlobeImposter
GlobeImposter has been active since 2017 and is highly prevalent in China through its Chinese-zodiac variants (such as .Dragon4444) and Olympian-gods variants (such as .Ares666). It spreads by brute-forcing RDP/SMB and moving laterally, and caused widespread hospital infections in China in 2018. Mainstream variants have no decryptor.
- Some versions decryptable
Crysis / Dharma
Crysis (CrySiS) and its successor Dharma have been active since 2016, breaking in through brute-forced RDP and spawning many variants including .cezar, .arena, .bip, .combo and .java. Early versions have free decryptors; the .cezar family from 2017 onward does not.
FAQ
WannaCry Frequently asked questions
Can .WNCRY files encrypted by WannaCry still be decrypted?
There is no general free decryptor. Historically WanaKiwi and WanaKey searched a still-running infected host's memory for the primes left over from RSA key generation and rebuilt the key, but the conditions are severe: the host must never have been rebooted or powered off since encryption, the relevant memory pages must be intact, and the approach mainly addressed specific implementations on legacy Windows XP and 7 systems.
For nearly all cases that reach a responder after the fact — the server long since restarted, or powered down to isolate it — that path is gone. Response therefore shifts to backup and snapshot restoration (intact backups are comparatively likely here, since propagation depends on a vulnerability rather than credentials), data baselines on uninfected hosts, low-level fragment recovery, and empirical repair assessment on large files.
Wasn't WannaCry over in 2017? Why were we hit now?
The original campaign did end long ago and the kill-switch domain is still maintained, but WannaCry's spread requires no attacker involvement — it is a worm. As long as a sample is running, port 445 is reachable internally and target hosts lack MS17-010, it keeps propagating on its own.
Three scenarios still produce infections in China today: a residual infection source on a legacy host that resumes scanning when connectivity returns; specialised equipment that vendors will not certify on newer builds (medical imaging workstations, industrial HMI hosts, inspection terminals, legacy all-in-ones) running Windows 7, Server 2008 or XP indefinitely; and contractor or supplier equipment carrying the sample onto the network.
There are only three durable fixes: patch, block ports 445 and 139 everywhere, and isolate unpatchable devices on their own segment.
Should we power off immediately after a WannaCry infection?
This is where WannaCry response differs from other families. If the host is still running, the correct first step is to disconnect the network, not to power it off, because WanaKiwi-class tools depend on RSA primes left in memory and a shutdown or restart removes that path entirely.
The recommended order: physically unplug or disable the NIC to stop the worm spreading, contact a responder and take a memory image, then decide about shutdown. If the host has already been powered off or restarted, the memory path is gone; proceed normally, shift focus to backup inventory and fragment recovery, and perform no writes on original disks.
In parallel, block internal ports 445 and 139 at the network layer immediately — that is more urgent than any single host, because it determines how many more machines get infected.
Our medical and industrial hosts cannot be patched — how do we defend against WannaCry?
This is the real constraint in many Chinese environments: medical imaging workstations, industrial HMI hosts and inspection terminals are often locked down by the equipment vendor, and upgrading or patching voids support or breaks the device. The workable approach is to substitute network and host controls for patching:
- Dedicated segment isolation: place such devices on their own VLAN with strict firewall rules and prohibit ports 445 and 139 across segments.
- Minimal connectivity: open only the business ports and destinations the device actually needs and deny everything else.
- Control removable media and access: disable unnecessary USB ports and vet contractor and supplier equipment before connection.
- Host hardening: disable SMBv1 where it is not genuinely required (many devices do not depend on it) and enable application allowlisting.
- Data-side fallback: replicate the data these devices produce to protected storage on a schedule with offline backups, decoupling data value from the device itself.
- Push an upgrade plan with the vendor, making patch compatibility part of procurement and support renewal terms.
Even where the device cannot be hardened, WannaCry cannot reach it if port 445 is unreachable.
Dozens of machines were encrypted at once — is it WannaCry or hands-on deployment?
Look at a few decisive differences. WannaCry's signature: the .WNCRY extension, an @Please_Read_Me@.txt note, the red countdown window, a Bitcoin address with no email, victims concentrated on legacy systems missing MS17-010, heavy anomalous traffic on port 445, and no hands-on intrusion artefacts at all — no RDP brute-force logs, no attacker-created accounts, no Mimikatz or lateral-movement tooling.
Hands-on families (Phobos, Makop, BeijingCrypt, LockBit) show the opposite: brute-force records against RDP or database ports in the security log, newly created administrator accounts, traces of internal scanning and lateral-movement tools, notes offering an email address or Tor portal, and encrypted hosts usually linked by shared credentials.
The distinction drives the response: WannaCry calls for blocking ports and patching first plus assessing memory key recovery, while hands-on deployment calls for removing backdoor accounts and persistence first and determining whether data was exfiltrated. Hand the notes, a few encrypted samples and the security logs to a response team and the call usually takes hours.
Sources
- Mandiant / Google Cloud: WannaCry Malware Profile
- Microsoft Security Intelligence: Ransom:Win32/WannaCrypt
- NJCCIC: WannaCry ransomware variant profile
- Avast: What Is EternalBlue and Why Is the MS17-010 Exploit Still Relevant?
- BleepingComputer: How to remove the WannaCry & Wana Decryptor Ransomware
External links are provided for reference only. The content is published by third parties and does not represent our position.
Updated