WalletGenerator Weak Key Generator

From Quadriga Initiative Cryptocurrency Hacks, Scams, and Frauds Repository
Jump to navigation Jump to search

Notice: This page is a new case study and some aspects have not been fully researched. Some sections may be incomplete or reflect inaccuracies present in initial sources. Please check the References at the bottom for further information and perform your own additional assessment. Please feel free to contribute by adding any missing information or sources you come across. If you are new here, please read General Tutorial on Wikis or Anatomy of a Case Study for help getting started.

Wallet Generator Logo/Website

WalletGenerator.net was a website which assisted in the generation of bitcoin wallets. The tool gained a lot of trust by being open source, however for several months between August 2018 and May 2019, the keys generated would be within a limited set, meaning multiple users could easily be assigned the same key. There are no specific reports identified yet of users having lost funds in this case.[1][2][3][4]

About WalletGenerator.net

WalletGenerator.net describes itself as a "Universal Open Source Client-Side Wallet Generator"[5]. WalletGenerator.net offers support for Bitcoin and numerous other cryptocurrencies[5]. Users can generate new addresses, print paper wallets securely, and share their public addresses to receive funds[5]. The platform emphasizes the importance of keeping private keys secret to safeguard one's coins, providing instructions on how to use and secure paper wallets[5]. With a comprehensive security checklist and frequently asked questions section, WalletGenerator.net aims to ensure user confidence and safety in managing their cryptocurrency assets[5]. The platform encourages donations to support ongoing development and security enhancements, highlighting its commitment to maintaining a secure and reliable service for users worldwide[5].

The Reality

When you use an online wallet generator, you are trusting the security of your funds to the operator of that website. If the generated wallets lack entropy, the same wallet can be generated by someone else, who will also have access to spend or transfer all funds stored in that wallet.

WalletGenerator.net is run by "two random guy (sic) having fun with a side project"[5]. No identity information is publicly provided about the individuals who are behind the website.

It was reported that on August 17th, 2018, the JavaScript code on the website which is responsible for generating wallet addresses was replaced with code which generated the same set of roughly 120 wallets. This change was not disclosed to users, and not reflected in the source code published on Github. The vulnerability was not discovered until May 24th, 2019, almost a full year later.


"Online cryptocurrency paper wallet creator WalletGenerator.net previously ran on code that caused private key/public key pairs to be issued to multiple users. The vulnerability was described in an official blog post by security research Harry Denley of MyCrypto on May 24, 2019.

According to the post, the bad code was in effect by August 2018, and was only recently patched out as of May 23. The live code on the website is reportedly supposed to be open source and audited on GitHub, but there were differences detected between the two. After researching the live code, Denley concluded that the keys were deterministically generated on the live version of the website, not randomly.

In one of MyCrypto’s tests between May 18–23, they attempted to use the website’s bulk generator to make 1,000 keys. The GitHub version returned 1,000 unique keys, but the live code returned 120 keys. Running the bulk generator always reportedly returned 120 unique keys instead of 1,000 even when other factors were tweaked, including browser refreshes, VPN changes, or user changes."

What Happened

The WalletGenerator website was running code which generated predictable wallets. This was

Key Event Timeline - WalletGenerator Weak Key Generator
Date Event Description
January 23rd, 2018 4:21 AM MST Last Github Commit The last commit to the walletgeneratornet/WalletGenerator.net GitHub repository[6][7].
August 17th, 2018 Vulnerability Introduced The reported date when the vulnerability was introduced into the WalletGenerator.net website[8][9].
May 22nd, 2019 Harry Denley Testing Harry Denley was reportedly testing the WalletGenerator.net website and found insecure code which appeared to generate the same wallet address for multiple users on the evening of May 22nd[8].
May 23rd, 2019 Insecure Code Patched The vulnerability was reportedly fixed on the walletgenerator.net website[10]. This was reported to have happened in mid-day, prior to the site owner responding to Harry Denley's email[8]. The site owner suggested that perhaps Harry Denley had been on a phishing website by mistake[8].
May 24th, 2019 Harry Denley Blog Post Security researcher Harry Denley shares a blog post about the vulnerability[8][10].
May 27th, 2019 11:00:00 AM MDT CoinDesk News Article CoinDesk shares an article about the vulnerability summarizing Harry's research and recommending against using the site[9]. Security researcher Harry Denley from MyCrypto.com discovered a serious vulnerability in the paper wallet site WalletGenerator.net. He found that the site's code deviated from its original open-source version after August 17, 2018, raising concerns that it might be generating the same keys for multiple users. Denley's tests revealed inconsistent results, with the site producing only 120 unique keys per session compared to the expected 1,000. Although the odd behavior wasn't present as of May 24, 2019, Denley advises users who generated keypairs after August. The article is also shared on Twitter[11] and Yahoo Finance[12] (with Yahoo Finance finding an image of Binance CEO Changpeng Zhao appropriate to go alongside the article).
May 28th, 2019 12:01:44 AM MDT DigitalBliz Summary A summary of the CoinDesk article is shared on DigitalBliz[13].
November 29th, 2019 3:09:00 PM MST MichaelMure Readme Updated Github user Michael Mure updates the ReadMe on MichaelMure/WalletGenerator.net to indicate that the wallet generation code is not safe to use, and links to the Harry Denley's blog post[14].
January 2nd, 2022 10:24:25 AM MST Reddit Post Warning A Reddit user warns others after attempting to generate a serious of paper wallets for their relatives using WalletGenerator.net and receiving the same key multiple times. He also reports generating a wallet a few months earlier which was not breached[15].
March 29th, 2022 9:06:00 PM MDT Questions About What Code Is Okay Github user hansbkk asks about whether Michael Mure's code is okay or not, and receives no answer[16].
March 22nd, 2023 3:45:00 AM MDT Questions From PhoenixIV GitHub user PhoenixIV has some questions being shared on MichaelMure's WalletGenerator.net Github[17].

Technical Details

TBD fill in more details about the specific exploit.

“ELI5: When generating a key, you take a super-random number, turn it into the private key, and turn that into the public key / address. However, if the ‘super-random' number is always ‘5,’ the private key that is generated will always be the same. This is why it’s so important that the super-random number is actually random…not ‘5.’”


"Online cryptocurrency paper wallet creator WalletGenerator.net previously ran on code that caused private key/public key pairs to be issued to multiple users. The vulnerability was described in an official blog post by security research Harry Denley of MyCrypto on May 24.

According to the post, the bad code was in effect by August 2018, and was only recently patched out as of May 23. The live code on the website is reportedly supposed to be open source and audited on GitHub, but there were differences detected between the two. After researching the live code, Denley concluded that the keys were deterministically generated on the live version of the website, not randomly.

In one of MyCrypto’s tests between May 18–23, they attempted to use the website’s bulk generator to make 1,000 keys. The GitHub version returned 1,000 unique keys, but the live code returned 120 keys. Running the bulk generator always reportedly returned 120 unique keys instead of 1,000 even when other factors were tweaked, including browser refreshes, VPN changes, or user changes."

Total Amount Lost

The total amount lost is unknown. TBD - need to find any blockchain research on this.

Immediate Reactions

Security researcher Harry Denley investigated the key generation on the WalletGenerator.net website.

Harry Denley Research

TBD include details on Harry Denley's research.

[18][19]

Paper Wallet Guide Excludes Website

Yavuz Selim provides a guide on generating paper wallets and specifically avoided walletgenerator.net after the vulnerability was discovered[20].

When creating my guide for paper wallets, I specifically didn't use walletgenerator.net after discovering the vulnerabilty.

Ultimate Outcome

"WalletGenerator patched the determinism problem after MyCrypto reached out during the middle of its investigation. WalletGenerator purportedly responded afterward saying that the allegations could not be verified, and even asked the correspondent if MyCrypto was a “phishing website.”"

Select_Contribution9 Warning On Reddit

Reddit user Select_Contribution9 took to Reddit to warn others after almost falling for the fraud and generating insecure wallets for all of their relatives[15].

For Christmas I was going to make paper wallets for almost 20 of my relatives so I got on walletgenerator.net, saved the page down to my hd, disconnected from the internet, and started generating keys for each of them. I didn't want to just print the wallet format that they offer so I was putting them in notepad to print in my own holiday format later with the QR code images.

And then I noticed that two of the public keys were exactly the same!

I figured I made a mistake so I cleared the notepad file and started all over.

But two of the new public keys were the same again!

There's no way that was possible if it was using the mouse movement to generate the random seed like it was supposed to do. No way! And I was like "Hey! if it can generate the same key for me twice, why couldn't it do it for someone else and then they would have the same key as me?" (the private key determines the public key so if you have the same public key you also must have the same private key)

I figured the site's code was broken or buggy. But then I got back on the internet and searched for "wallet generator same key twice" or something like that and ended up finding [multiple links about the issue].

So essentially these sites aren't accidentally generating the same key twice because of broken or buggy code like I originally suspected. They are generating keys out of a preset pool that they sent you when you initially loaded the page. Then, even if you later disconnect and "generate" them offline as they recommend, they still know the private keys for all of the preset pool of keys they gave you when you loaded the site. So they still *know your private keys!* (it makes no difference if they know you're the one who has them. All they need to know in order to steal a wallet's coins is that this private key goes with that public key (wallet address))

He also reports generating a wallet a few months earlier which was not breached.

I have a paper wallet I made a few months back that had a small amount of Dogecoin on it. And I checked and it's still there. But why would they take a couple hundred Dogecoin when they could lay low and wait for someone to put a significant amount on a wallet and then take that instead?

Total Amount Recovered

There do not appear to have been any funds recovered in this case.

Ongoing Developments

The WalletGenerator.net website continues to pose a potential risk to any users who may attempt to generate their wallet there in the future. TBD - is the malicious code still present?

Individual Prevention Policies

The primary problem came about from trusting the code generation off the WalletGenerator.net website, which was controlled by a third party with the ability (and strong incentive) to modify that code at any time.

Any time untrusted software is being run is an opportunity for abuse. It is recommended to always interact with cryptocurrency in a fully controlled environment, which is an environment where you have understanding of every piece of software running there. Using a hardware wallet, spare computer with all software wiped, and/or virtual machine with only the needed software greatly reduces your attack surface. Take the time to verify downloaded files come from the correct and expected source and match available hashes if provided. Any time you encounter a new file, always check if it can contain executable code prior to using it.

For the full list of how to protect your funds as an individual, check our Prevention Policies for Individuals guide.

Platform Prevention Policies

Never take for granted the limited knowledge of users of your service and their tendency to skip past provided information. It is recommended to design a simple tutorial and quiz for new users which explains the basics of seed phrases, strong password generation, secure two-factor authentication, common fraud schemes, how ponzi schemes work, as well as other risks which are unique to the cryptocurrency space. This tutorial and quiz should ensure their understanding and be a standard part of the sign-up or download process which is difficult or impossible to skip.

For the full list of how to protect your funds as a financial service, check our Prevention Policies for Platforms guide.

Regulatory Prevention Policies

Create a standard tutorial and quiz for all new cryptocurrency participants, which is required to be completed once per participant. This tutorial and quiz should cover the basics of proper seed phrase protection, strong password generation, secure two-factor authentication, common fraud schemes, how to detect and guard against phishing attacks, how ponzi schemes work, as well as other risks which are unique to the cryptocurrency space.

For the full list of regulatory policies that can prevent loss, check our Prevention Policies for Regulators guide.

References

  1. https://www.theblock.co/linked/24772/potentially-malicious-vulnerability-found-on-walletgenerator-net
  2. https://decrypt.co/7173/popular-paper-wallet-app-falls-prey-to-mysterious-vulnerability
  3. https://cointelegraph.com/news/computer-researcher-finds-wallet-vulnerability-that-gave-same-key-to-multiple-users
  4. https://arstechnica.com/information-technology/2019/05/website-for-storing-digital-currencies-hosted-code-with-a-sneaky-backdoor/
  5. 5.0 5.1 5.2 5.3 5.4 5.5 5.6 WalletGenerator.net - Universal Paper wallet generator for Bitcoin and other cryptocurrencies (Mar 24, 2023)
  6. GitHub - walletgeneratornet/WalletGenerator.net: Universal JavaScript Client-Side Wallet Generator (Mar 24, 2023)
  7. walletgeneratornet/WalletGenerator.net Commit History - GitHub (Apr 5, 2023)
  8. 8.0 8.1 8.2 8.3 8.4 Disclosure Key Generation Vulnerability Found on Walletgenerator Net Potentially Malicious - Medium MyCrypto (Mar 24, 2023)
  9. 9.0 9.1 Researcher Discovers Serious Vulnerability in Paper Crypto Wallet Site - CoinDesk (Jun 2, 2023)
  10. 10.0 10.1 Computer Researcher Finds Wallet Vulnerability That Gave Same Key to Multiple Users - CoinTelegraph (Sep 2, 2022)
  11. CoinDesk - "A security researcher has posted a detailed – and damning – analysis of paper wallet site WalletGenerator[dot]net" - Twitter (Accessed Apr 10, 2024)
  12. Researcher Discovers Serious Vulnerability in Paper Crypto Wallet Site - Yahoo Finance (Accessed Apr 10, 2024)
  13. Researcher Discovers Serious Vulnerability in Paper Crypto Wallet Site - Digital Bliz (Accessed Apr 10, 2024)
  14. Michael Mure's WalletGenerator.net Code - GitHub (Apr 5, 2023)
  15. 15.0 15.1 Warning: Major paper wallet generator sites are scams and can drain your wallet / steal your coins anytime they want - Reddit (Jun 2, 2023)
  16. hansbkk - "I understand what is on the "demo" website is suspect." - GitHub (Apr 5, 2023)
  17. PhoenixIV - "As a public learning experience: Why did you decide to hand over the project and why to the person who introduced the scam?" - GitHub (Apr 5, 2023)
  18. Harry Denley Homepage V1 (Accessed Apr 10, 2024)
  19. Harry Denley Homepage (Accessed Apr 10, 2024)
  20. Yavuz Selim - "When creating my guide for paper wallets, I specifically didn't use walletgenerator.net after discovering the vulnerabilty." - Reddit (Jun 2, 2023)