Security researcher says he's figured out how to decrypt WannaCry

Without paying the ransom.
 By 
Jack Morse
 on 
Security researcher says he's figured out how to decrypt WannaCry
WannaCry no more. Credit: B. TONGO/EPA/REX/SHUTTERSTOCK

The ransomware WannaCry has infected hundreds of thousands of computer systems around the globe, but a security researcher claims he's figured out how to beat it.

In some cases, that is.

Adrien Guinet says that he was able to decrypt a ransomwared computer running Windows XP in his lab by discovering the prime numbers that make up the WannaCry private key. The private key is what a ransomware victim would need to buy off his attackers in order to regain access to his own files, but Guinet says he was able to do this without paying any Bitcoin ransom.

Importantly, Guinet acknowledges this technique has only been demonstrated to work on a computer running Windows XP. Why does that matter? Despite initial reports, those systems were not affected by the major May 12 outbreak as the worm that spread the ransomware didn't hit those systems.

However, WannaCry itself does work on XP — suggesting that if the ransomware manages to spread to XP this new technique could be used to help future victims.

There are some other provisos as well.

"In order to work, your computer must not have been rebooted after being infected," Guinet wrote on Github. "Please also note that you need some luck for this to work," he added, "and so it might not work in every cases!"

Why luck? As Guinet explains, when WannaCry infects a computer it generates encryption keys that rely on prime numbers. Here comes the important part: The ransomware "does not erase the prime numbers from memory before freeing the associated memory."

"If you are lucky (that is the associated memory hasn't been reallocated and erased)," continues Guinet, "these prime numbers might still be in memory."

If you can recover those prime numbers, as Guinet says he did, you can decrypt your files.

Guinet released the software he used to decrypt the infected system to the public. He calls it "Wannakey."

As mentioned above, Wannakey has not been tested on a large scale and so it may not be a silver bullet. It does, however, suggest that data considered lost in future ransomware attacks may actually be recoverable. And that is some much needed good news.

Mashable Image
Jack Morse

Professionally paranoid. Covering privacy, security, and all things cryptocurrency and blockchain from San Francisco.

Mashable Potato

Recommended For You

Updating your security mindset: Keep your data private and your devices secure
By PCMag
Cyber Security

Former DOGE hire still has 'god level' Social Security data, whistleblower says
A woman with white hair holding a sign saying "we need social security"

Thanks a lot, AI: Hard drives are already sold out for the entire year, says Western Digital
Western Digital HDD

Clawdbot AI security risks you need to know before trying it
Two digitally animated hands.

Trending on Mashable
NYT Connections hints today: Clues, answers for April 3, 2026
Connections game on a smartphone

Wordle today: Answer, hints for April 3, 2026
Wordle game on a smartphone

What's new to streaming this week? (April 3, 2026)
A composite of images from film and TV streaming this week.

Google launches Gemma 4, a new open-source model: How to try it
Google Gemma

The biggest stories of the day delivered to your inbox.
These newsletters may contain advertising, deals, or affiliate links. By clicking Subscribe, you confirm you are 16+ and agree to our Terms of Use and Privacy Policy.
Thanks for signing up. See you at your inbox!