WannaCry ransomware decryption: decryptor, identification and data recovery

Last technical review: Partially decryptable

Emergency summary

WannaCry spread worldwide as a worm from 12 May 2017 via the SMBv1 vulnerability MS17-010 (EternalBlue). Its spread was stopped by registering a kill-switch domain embedded in the code. The US government attributed WannaCry to North Korea.[1][3]

Extension
.WNCRY, .wcry
Ransom Note
@Please_Read_Me@.txt
Platforms
Windows
Decryption
Partially decryptable

How to recognise WannaCry

  • Files receive the extension .WNCRY (other documented variants: .wcry). Whether the extension is appended or the file name replaced can differ by variant.
  • Affected folders typically contain the file @Please_Read_Me@.txt. Copy a ransom note as evidence instead of opening or deleting it on production systems.
  • Worm-like spreading via SMB (including TCP 445/139) – unpatched systems without MS17-010 are at risk; SMBv1 should be disabled.[1]
  • Kill switch: if the hard-coded domain is reachable, the dropper terminates.[1]
  • According to Sophos, almost 7,000 variants were observed in August 2019 alone; all of the more than 2,700 analysed kill-switch-bypassing samples had a corrupted ransomware component.[3]
  • Appends .WNCRY, drops @Please_Read_Me@.txt and deletes volume shadow copies after encryption.[4]
  • Decryption without paying only in special cases (wanakiwi, no reboot since infection).[2]

First response to WannaCry

  1. Isolate, do not wipe: disconnect affected systems from the network (LAN, Wi-Fi, VPN). Whether to power a system off depends on the scenario: volatile evidence in memory is lost on shutdown, but if encryption is still running an immediate shutdown can still be the right call.
  2. Do not alter encrypted originals: no renaming of .WNCRY files, no cleanup tools and no reinstall on the original drives.
  3. Document indicators: record the ransom note (@Please_Read_Me@.txt), file extension, time of first detection and affected systems.
  4. Protect backups: do not connect backup repositories to compromised systems and change backup credentials from a clean device.
  5. Preserve logs: export Windows event logs, EDR telemetry, firewall and VPN logs before they rotate.
  6. Answer two questions separately: who contains the attack (incident response)? Who assesses whether the data can be recovered (data recovery)?

Technical characteristics

Family / nameWannaCry
Known aliasesWannaCrypt, WCry, Wanna Decryptor
File extension(s).WNCRY, .wcry
Ransom note@Please_Read_Me@.txt
Target platformsWindows
Encryptionnot reliably documented
Decryptor availabilityPartially decryptable
Data exfiltration / double extortionnot documented
Ransomware-as-a-Serviceno
Activityinactive · first seen 2017[3]

Can WannaCry be decrypted?

Partially decryptable

Decrypting WannaCry is only partially possible, depending on variant, time period or available keys.[2]

  • wanakiwi (Benjamin Delpy (gentilkiwi), Matt Suiche u. a.): Only if the WannaCry process is still in memory (no reboot since infection) and the key's prime numbers have not yet been overwritten; per the project confirmed for Windows XP, Windows 2003 and Windows 7 (x86 each), x64 unclear.

Always test decryptors on copies first and only obtain them from reputable sources such as the No More Ransom project. Supposed decryptors from forums or videos are often malware themselves.

More: Ransomware decryption – options and limits.

Typical techniques (MITRE ATT&CK)

These techniques are documented for WannaCry. They help IT teams check logs and EDR data in a targeted way and show where controls take effect.

TacticTechnique
ExecutionT1047 Windows Management Instrumentation
PersistenceT1543.003 Create or Modify System Process: Windows Service
StealthT1564.001 Hide Artifacts: Hidden Files and Directories
Defense ImpairmentT1222.001 File and Directory Permissions Modification: Windows Permissions
DiscoveryT1083 File and Directory Discovery
DiscoveryT1018 Remote System Discovery
Lateral MovementT1210 Exploitation of Remote Services
Lateral MovementT1570 Lateral Tool Transfer
Command and ControlT1573.002 Encrypted Channel: Asymmetric Cryptography
Command and ControlT1090.003 Proxy: Multi-hop Proxy
ImpactT1489 Service Stop
ImpactT1490 Inhibit System Recovery
ImpactT1486 Data Encrypted for Impact

Source: MITRE ATT&CK: WannaCry (S0366)

Recovery options

Which method works depends on the damage. None of the following options is always possible – but they should be assessed before anyone considers paying a ransom.

MethodPrerequisiteLimitation
Restore from a clean backupThe backup is unchanged, offline or immutable and free of attacker persistence.Backups may be encrypted, deleted or already compromised.
Snapshot recoveryStorage or hypervisor snapshots were not deleted.Attackers often delete snapshots deliberately.
Shadow copies (VSS)Volume shadow copies still exist.Many families delete them before encrypting.
File system reconstructionUsable structures (MFT, inodes, journals) and unencrypted regions exist.Depends on the damage; no substitute for a key.
VM / VMDK / VHDX recoveryVirtual disks are only partially encrypted or datastores can be reconstructed.Depends on variant and encryption mode.
RAID / NAS recoveryDrives are physically readable, RAID parameters can be reconstructed.Rebuilds or initialisation before analysis can destroy data.
Raw recovery / carvingFile contents remain unencrypted in free or unoverwritten areas.File names and folder structure are often lost.
Database / application recoveryDatabase files or transaction logs are partly intact.Technically complex, outcome cannot be guaranteed in advance.

Which route fits your situation?

Frequently asked questions

Is there a decryptor for WannaCry?

Based on our data: Partially decryptable. Documented: wanakiwi (Benjamin Delpy (gentilkiwi), Matt Suiche u. a.). Only test decryptors on copies and only from reputable sources such as No More Ransom.

Which file extension does WannaCry use?

Documented extensions: .WNCRY, .wcry. The extension can differ by variant; compare the ransom note as well.

What is the WannaCry ransom note called?

Documented: @Please_Read_Me@.txt. Keep a copy of the note as evidence and do not contact the attackers before an approach has been agreed.

Should I shut down the affected server?

It depends on the scenario. Isolate first (disconnect from the network). Shutting down destroys volatile forensic evidence; if encryption is still running or spreading, an immediate shutdown can still be right. Ideally agree this with an incident response team.

Are my backups affected too?

Possibly. Attackers specifically look for backup servers, repositories and snapshots. Check backups in isolation before reconnecting them and validate restore points for persistence.

Can I copy the encrypted files?

Yes – copying encrypted files to a separate, clean medium is sensible so that later decryption or recovery attempts do not touch the originals. Do not do this from compromised systems.

Related guides

Sources and further reading

  1. [1]CISA TA17-132A: Indicators Associated With WannaCry Ransomware cisa.gov
  2. [2]GitHub: gentilkiwi/wanakiwi github.com
  3. [3]Computer Weekly: WannaCry variants accidentally protecting against WannaCry (Sophos-Studie) computerweekly.com
  4. [4]Microsoft Security Blog: WannaCrypt ransomware worm targets out-of-date systems microsoft.com
  5. [5]No More Ransom – decryption tools nomoreransom.org
  6. [6]ID Ransomware (MalwareHunterTeam) id-ransomware.malwarehunterteam.com

Base data from the Ransomware Reverse dataset, editorially extended and checked against the sources listed.