WalletGenerator Weak Key Generator

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

Notice: This page is a freshly imported case study from the original repository. The original content was in a different format, and may not have relevant information for all sections. Please help restructure the content by moving information from the 'About' and 'General Prevention' sections to other sections, and add any missing information or sources you can find. If you are new here, please read General Tutorial on Wikis or Anatomy of a Case Study for help getting started.

Wallet Generator 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.

About WalletGenerator.net

WalletGenerator.net describes itself as a "Universal Open Source Client-Side Wallet Generator"[1].

"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."


This is a global/international case not involving a specific country.

Source Code Location: [2]

The background of the exchange platform, service, or individuals involved, as it would have been seen or understood at the time of the events.

Include:

  • Known history of when and how the service was started.
  • What problems does the company or service claim to solve?
  • What marketing materials were used by the firm or business?
  • Audits performed, and excerpts that may have been included.
  • Business registration documents shown (fake or legitimate).
  • How were people recruited to participate?
  • Public warnings and announcements prior to the event.

Don't Include:

  • Any wording which directly states or implies that the business is/was illegitimate, or that a vulnerability existed.
  • Anything that wasn't reasonably knowable at the time of the event.

There could be more than one section here. If the same platform is involved with multiple incidents, then it can be linked to a main article page.

The Reality

This sections is included if a case involved deception or information that was unknown at the time. Examples include:

  • When the service was actually started (if different than the "official story").
  • Who actually ran a service and their own personal history.
  • How the service was structured behind the scenes. (For example, there was no "trading bot".)
  • Details of what audits reported and how vulnerabilities were missed during auditing.

What Happened

The specific events of the loss and how it came about. What actually happened to cause the loss and some of the events leading up to it.

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[3][4].
August 17th, 2018 Vulnerability Introduced The reported date when the vulnerability was introduced into the WalletGenerator.net website[5][6].
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[5].
May 23rd, 2019 Insecure Code Patched The vulnerability was reportedly fixed on the walletgenerator.net website[7]. This was reported to have happened in mid-day, prior to the site owner responding to Harry Denley's email. The site owner suggested that perhaps Harry Denley had been on a phishing website by mistake[5].
May 24th, 2019 Harry Denley Blog Post Security researcher Harry Denley shares a blog post about the vulnerability[5][7].
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[6]. TBD we should try to find the original version of this article.
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[8].
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[9].
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[10].
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[11].

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.’”

Total Amount Lost

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

How much was lost and how was it calculated? If there are conflicting reports, which are accurate and where does the discrepancy lie?

Immediate Reactions

How did the various parties involved (firm, platform, management, and/or affected individual(s)) deal with the events? Were services shut down? Were announcements made? Were groups formed?

Harry Denley Research

TBD include details on Harry Denley's research.

Paper Wallet Guide Excludes Website

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

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

Ultimate Outcome

What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?

"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[9].

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