{"id":49943,"date":"2023-11-29T05:00:18","date_gmt":"2023-11-29T10:00:18","guid":{"rendered":"https:\/\/www.kaspersky.com\/blog\/?p=49943"},"modified":"2023-11-29T05:00:18","modified_gmt":"2023-11-29T10:00:18","slug":"vulnerability-in-hot-cryptowallets-from-2011-2015","status":"publish","type":"post","link":"https:\/\/www.kaspersky.com\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/49943\/","title":{"rendered":"Randstorm: vulnerable crypto wallets from the 2010s"},"content":{"rendered":"<p>Researchers have discovered several vulnerabilities in the BitcoinJS library that could leave Bitcoin wallets created online a decade ago prone to hacking. The basic issue is that the private keys for these crypto wallets were generated with far greater predictability than the library developers expected.<\/p>\n<h2>Randstorm vulnerabilities and consequences<\/h2>\n<p>Let\u2019s start at the beginning. Researchers at Unciphered, a company specializing in crypto wallet access recovery, <a href=\"https:\/\/www.unciphered.com\/blog\/randstorm-you-cant-patch-a-house-of-cards\" target=\"_blank\" rel=\"nofollow noopener\">discovered and described<\/a> a number of vulnerabilities in the BitcoinJS JavaScript library used by many online cryptocurrency platforms. Among these services are some very popular ones \u2014 in particular, Blockchain.info, now known as Blockchain.com. The researchers dubbed this set of vulnerabilities Randstorm.<\/p>\n<p>Although the vulnerabilities in the BitcoinJS library itself were fixed back in 2014, the problem extends to the results of using this library: crypto wallets created with BitcoinJS in the early 2010s may be insecure \u2014 in the sense that it\u2019s far easier to find their private keys than the underlying Bitcoin cryptography assumes.<\/p>\n<p>The researchers estimate that several million wallets, totaling around 1.4 million BTC, are potentially at risk due to Randstorm. Among the <em>potentially vulnerable<\/em> wallets, according to the researchers, 3\u20135% of them are <em>actually vulnerable<\/em> to real attacks. Based on the approximate Bitcoin exchange rate of around $36,500 at the time of posting, this implies total loot of $1.5-2.5 billion for attackers who can successfully exploit Randstorm.<\/p>\n<p>The researchers claim that the Randstorm vulnerabilities can indeed be used for real-world attacks on crypto wallets. What\u2019s more, they successfully exploited these vulnerabilities to restore access to several crypto wallets created on Blockchain.info before March 2012. For ethical reasons, they didn\u2019t publish a proof-of-concept of the attack, as this would have directly exposed tens of thousands of crypto wallets to the risk of theft.<\/p>\n<p>The researchers have already contacted the online cryptocurrency services known to have used vulnerable versions of the BitcoinJS library. In turn, these services notified customers who could potentially be affected by Randstorm.<\/p>\n<h2>The nature of Randstorm vulnerabilities<\/h2>\n<p>Let\u2019s look in more detail at how these vulnerabilities actually work. At the heart of Bitcoin wallet security lies the private key. Like any modern cryptographic system, Bitcoin relies on this key being secret and uncrackable. Again, as in any modern cryptographic system, this involves the use of very long random numbers.<\/p>\n<p>And for the security of any data protected by the private key, it must be as random as can possibly be. If the number used as a key is highly predictable, it makes it easier and quicker for an attacker armed with information about the key-generation procedure to brute-force it.<\/p>\n<p>Bear in mind that generating a <em>truly<\/em> random number is <a href=\"https:\/\/engineering.mit.edu\/engage\/ask-an-engineer\/can-a-computer-generate-a-truly-random-number\/\" target=\"_blank\" rel=\"nofollow noopener\">no stroll in the park<\/a>. And computers by their very nature are extremely unsuited to the task since they\u2019re too predictable. Therefore, what we usually have are <em>pseudo-random<\/em> numbers, and to increase the <em>entropy<\/em> of the generation (cryptographer-speak for the measure of unpredictability) we rely on special functions.<\/p>\n<p>Now back to the BitcoinJS library. To obtain \u201chigh-quality\u201d pseudo-random numbers, this library uses another JavaScript library called JSBN (JavaScript Big Number), specifically its <em>SecureRandom<\/em> function. As its name suggests, this function was designed to generate pseudo-random numbers that qualify for use in cryptography. To increase their entropy, <em>SecureRandom<\/em> relies on the browser function <em>window.crypto.random<\/em>.<\/p>\n<p>Therein lies the problem: although the <em>window.crypto.random<\/em> function existed in the Netscape Navigator 4.x browser family, these browsers were already obsolete by the time web services began actively using the BitcoinJS library. And in the popular browsers of those days \u2014 Internet Explorer, Google Chrome, Mozilla Firefox, and Apple Safari \u2014 the <em>window.crypto.random <\/em>function was simply not implemented.<\/p>\n<p>Unfortunately, the developers of the JSBN library failed to make provision for any kind of check or corresponding error message. As a result, the <em>SecureRandom<\/em> function passed over the entropy increment step in silence, effectively handing the task of creating private keys to the standard pseudo-random number generator, <em>Math.random<\/em>.<\/p>\n<p>This is bad in and of itself because <em>Math.random<\/em> is <a href=\"https:\/\/security.stackexchange.com\/questions\/181580\/why-is-math-random-not-designed-to-be-cryptographically-secure\" target=\"_blank\" rel=\"nofollow noopener\">not cut out<\/a> for cryptographic purposes. But the situation is made even worse by the fact that the <em>Math.random<\/em> implementation in the popular browsers of 2011\u20132015 \u2014 \u00a0<a href=\"https:\/\/jandemooij.nl\/blog\/math-random-and-32-bit-precision\/\" target=\"_blank\" rel=\"nofollow noopener\">in particular Google Chrome<\/a> \u2014 contained bugs that resulted in even less random numbers than should have been the case.<\/p>\n<p>In turn, the BitcoinJS library inherited all the above-mentioned issues from JSBN. As a result, platforms that used it to generate private keys for crypto wallets got much fewer random numbers from the SecureRandom function than the library developers expected. And since these keys are generated with great predictability, they\u2019re much easier to brute-force \u2014 allowing vulnerable crypto wallets to be hijacked.<\/p>\n<p>As mentioned above, this isn\u2019t a theoretical danger, but rather a practical one \u2014 the Unciphered team was able to exploit these vulnerabilities to restore access to (in other words, ethically hack) several old crypto wallets created on Blockchain.info.<\/p>\n<h2>Randstorm: who\u2019s at risk?<\/h2>\n<p>BitcoinJS utilized the vulnerable JSBN library right from its introduction in 2011 through 2014. Note, however, that some cryptocurrency projects may have been using an older-than-latest version of the library for some time. As for the bugs afflicting <em>Math.random <\/em>in popular browsers, by 2016 they\u2019d been fixed by changing the algorithms for generating pseudo-random numbers. Together, this gives an approximate time frame of 2011\u20132015 for when the potentially vulnerable crypto wallets were created.<\/p>\n<p>The researchers emphasize that BitcoinJS was very popular back in the early 2010s, so it\u2019s difficult to compile a full list of services that could have used a vulnerable version of it. Their report gives a list of platforms they were able to identify as at risk:<\/p>\n<ul>\n<li><strong>BitAddress<\/strong> \u2014 still operational.<\/li>\n<li><strong>BitCore<\/strong> (BitPay) \u2014 still operational.<\/li>\n<li><strong>Bitgo<\/strong> \u2014 still operational.<\/li>\n<li><strong>info<\/strong> \u2014 still operational as Blockchain.com.<\/li>\n<li><strong>Blocktrail<\/strong> \u2014 redirects to <code> https:\/\/btc.com <\/code> or <code> https:\/\/blockchair.com <\/code>.<\/li>\n<li><strong>BrainWallet<\/strong> \u2014 dead.<\/li>\n<li><strong>CoinKite<\/strong> \u2014 now sells hardware wallets.<\/li>\n<li><strong>CoinPunk<\/strong> \u2014 dead.<\/li>\n<li><strong>Dark Wallet<\/strong> \u2014 redirects to <code> https:\/\/crypto-engine.org <\/code>.<\/li>\n<li><strong>DecentralBank<\/strong> \u2014 dead.<\/li>\n<li><strong>info<\/strong> (Block.io) \u2014 still operational.<\/li>\n<li><strong>EI8HT<\/strong> \u2014 dead.<\/li>\n<li><strong>GreenAddress<\/strong> \u2014 redirects to <code> https:\/\/blockstream.com\/green\/ <\/code>.<\/li>\n<li><strong>QuickCon<\/strong> \u2014 dead.<\/li>\n<li><strong>Robocoin<\/strong> \u2014 dead.<\/li>\n<li><strong>Skyhook ATM<\/strong> \u2014 redirects to <code> https:\/\/yuan-pay-group.net <\/code>.<\/li>\n<\/ul>\n<p>Besides Bitcoin wallets, Litecoin, Zcash, and Dogecoin wallets may also be at risk, since there are BitcoinJS-based libraries for these cryptocurrencies, too. It seems natural to assume that these libraries could be used to generate private keys for the respective crypto wallets.<\/p>\n<p>The Unciphered report describes a host of other intricacies associated with Randstorm. But what it all basically boils down to is that wallets created between 2011 and 2015 using the vulnerable library may be vulnerable to varying degrees \u2014 depending on the particular circumstances.<\/p>\n<h2>How to protect against Randstorm<\/h2>\n<p>As the researchers themselves rightly state, this isn\u2019t a case where fixing the vulnerability in the software would suffice: \u201cpatching\u201d wallet owners\u2019 private keys and replacing them with secure ones just isn\u2019t doable. So, despite the fact that the bugs have long been fixed, they continue to affect the crypto wallets that were created when the above-discussed errors plagued the BitcoinJS library. This means that vulnerable wallet owners themselves need to take protective measures.<\/p>\n<p>Because the task of drawing up a complete list of cryptocurrency platforms that used the vulnerable library is difficult, it\u2019s better to play it safe and consider any crypto wallet created <em>online<\/em> between 2011 and 2015 to be potentially insecure (unless you know for sure that it\u2019s not). And naturally, the fatter the wallet \u2014 the more tempting it is to criminals.<\/p>\n<p>The obvious (and only) solution to the problem is to create new crypto wallets and move all funds from potentially vulnerable wallets to them.<\/p>\n<p>And since you have to do this anyway, it makes sense to proceed with the utmost caution this time. Crypto protection is a multi-step process, for which reason we\u2019ve put together a comprehensive checklist for you with loads of additional information accessible through links:<\/p>\n<ol>\n<li>Explore the <a href=\"https:\/\/www.kaspersky.com\/blog\/4-key-steps-to-protect-cryptocurrency-properly\/47811\/\" target=\"_blank\" rel=\"noopener nofollow\">main crypto threats and protection methods in detail<\/a>.<\/li>\n<li>Understand the <a href=\"https:\/\/www.kaspersky.com\/blog\/five-threats-hardware-crypto-wallets\/47971\/\" target=\"_blank\" rel=\"noopener nofollow\">differences between hot and cold crypto wallets<\/a>, and the <a href=\"https:\/\/www.kaspersky.com\/blog\/top-eight-crypto-scams-2023\/48489\/\" target=\"_blank\" rel=\"noopener nofollow\">most common ways they are attacked<\/a>.<\/li>\n<li>Use a hardware (cold) wallet for long-term storage of core crypto assets, and a hot wallet with minimal funds for day-to-day transactions.<\/li>\n<li>Before transferring all funds from the old wallet to the new one, equip all your devices with <a href=\"https:\/\/www.kaspersky.com\/lp\/crypto-security?icid=gl_kdailyplacehold_acq_ona_smm__onl_b2c_kdaily_lnk_sm-team______\" target=\"_blank\" rel=\"noopener nofollow\">reliable protection<\/a>. It will guard your smartphone or computer against <a href=\"https:\/\/www.kaspersky.com\/blog\/doublefinger-crypto-stealer\/48418\/\" target=\"_blank\" rel=\"noopener nofollow\">Trojans looking to steal passwords and private keys<\/a> or <a href=\"https:\/\/securelist.com\/copy-paste-heist-clipboard-injector-targeting-cryptowallets\/109186\/\" target=\"_blank\" rel=\"noopener\">clippers that substitute crypto wallet addresses in the clipboard<\/a>, as well as protect your computer from <a href=\"https:\/\/www.kaspersky.com\/blog\/malicious-cryptominers-2022\/46186\/\" target=\"_blank\" rel=\"noopener nofollow\">malicious crypto miners<\/a> and unauthorized remote access.<\/li>\n<li>Never store a photo or screenshot of your seed phrase on your smartphone, never post your seed phrase in public clouds, never send it through messengers or email, and <a href=\"https:\/\/www.kaspersky.com\/blog\/cryptocurrency-giveaway-scam\/44346\/\" target=\"_blank\" rel=\"noopener nofollow\">don\u2019t enter it anywhere<\/a> except when recovering a lost private key.<\/li>\n<li>Securely store your private key and the seed phrase for its recovery. This can be done using the <em>Identity Protection Wallet<\/em> in <a href=\"https:\/\/www.kaspersky.com\/lp\/crypto-security?icid=gl_kdailyplacehold_acq_ona_smm__onl_b2c_kdaily_lnk_sm-team______\" target=\"_blank\" rel=\"noopener nofollow\">Kaspersky Premium<\/a>, which encrypts all stored data using AES-256. The password for it is stored nowhere except in your head (unless, of course, it\u2019s on a sticky note attached to your monitor) and is unrecoverable \u2014 so the only one with access to your personal documents is you.<\/li>\n<li>Another option is to use a cold crypto wallet that doesn\u2019t require a seed phrase to back up the private key. This is how, for example, the <a href=\"https:\/\/tangem.com\/\" target=\"_blank\" rel=\"noopener nofollow\">Tangem<\/a> hardware wallet works.<\/li>\n<\/ol>\n<input type=\"hidden\" class=\"category_for_banner\" value=\"premium-crypto-fraud\">\n","protected":false},"excerpt":{"rendered":"<p>Bitcoin wallets created on online platforms between 2011 and 2015 may be insecure due to a vulnerability in the library for key generation.<\/p>\n","protected":false},"author":2706,"featured_media":49944,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2683,9],"tags":[374,1035,2617,4453,2640,268],"class_list":{"0":"post-49943","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-threats","8":"category-tips","9":"tag-bitcoin","10":"tag-blockchain","11":"tag-btc","12":"tag-crypto-wallets","13":"tag-cryptocurrencies","14":"tag-vulnerabilities"},"hreflang":[{"hreflang":"x-default","url":"https:\/\/www.kaspersky.com\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/49943\/"},{"hreflang":"en-in","url":"https:\/\/www.kaspersky.co.in\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/26702\/"},{"hreflang":"en-ae","url":"https:\/\/me-en.kaspersky.com\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/22125\/"},{"hreflang":"ar","url":"https:\/\/me.kaspersky.com\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/11229\/"},{"hreflang":"en-us","url":"https:\/\/usa.kaspersky.com\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/29456\/"},{"hreflang":"en-gb","url":"https:\/\/www.kaspersky.co.uk\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/26984\/"},{"hreflang":"es-mx","url":"https:\/\/latam.kaspersky.com\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/26892\/"},{"hreflang":"es","url":"https:\/\/www.kaspersky.es\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/29453\/"},{"hreflang":"it","url":"https:\/\/www.kaspersky.it\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/28286\/"},{"hreflang":"ru","url":"https:\/\/www.kaspersky.ru\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/36592\/"},{"hreflang":"tr","url":"https:\/\/www.kaspersky.com.tr\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/11903\/"},{"hreflang":"fr","url":"https:\/\/www.kaspersky.fr\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/21291\/"},{"hreflang":"pt-br","url":"https:\/\/www.kaspersky.com.br\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/22070\/"},{"hreflang":"de","url":"https:\/\/www.kaspersky.de\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/30738\/"},{"hreflang":"ja","url":"https:\/\/blog.kaspersky.co.jp\/vulnerability-in-hot-cryptowallets-from-2011-2015\/35364\/"},{"hreflang":"nl","url":"https:\/\/www.kaspersky.nl\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/28948\/"},{"hreflang":"ru-kz","url":"https:\/\/blog.kaspersky.kz\/vulnerability-in-hot-cryptowallets-from-2011-2015\/27215\/"},{"hreflang":"en-au","url":"https:\/\/www.kaspersky.com.au\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/32975\/"},{"hreflang":"en-za","url":"https:\/\/www.kaspersky.co.za\/blog\/vulnerability-in-hot-cryptowallets-from-2011-2015\/32624\/"}],"acf":[],"banners":"","maintag":{"url":"https:\/\/www.kaspersky.com\/blog\/tag\/cryptocurrencies\/","name":"cryptocurrencies"},"_links":{"self":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/49943","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/users\/2706"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/comments?post=49943"}],"version-history":[{"count":5,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/49943\/revisions"}],"predecessor-version":[{"id":49946,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/49943\/revisions\/49946"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/media\/49944"}],"wp:attachment":[{"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/media?parent=49943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/categories?post=49943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kaspersky.com\/blog\/wp-json\/wp\/v2\/tags?post=49943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}