In brief
- Hackers targeted installation packages for the Ruby programming language.
- RubyGems libraries were infected with malware; developers could accidentally install Bitcoin stealers.
- Luckily, the attack was too obscure to ever work.
A cybersecurity firm discovered that over 700 libraries of the popular programming language, Ruby, contained malicious Bitcoin-stealing software.
ReversingLabs, based in Cambridge, Massachusetts, disclosed its findings in a blog post on Thursday. Back in February, it wrote, hackers placed malicious files inside a package manager called RubyGemsâwhich is usually used to upload and share improvements on existing pieces of software.
The hackers were trying to trick developers into downloading malware by using a method called âtyposquattingâ, which consists of uploading malicious packages with similar names to regular ones. By just changing a few characters of a file name, the hope was that a developer would mistakenly download an infected packageâunwittingly providing the hacker with access to their system.Â
Once inside, the malware executed a malicious script that starts an infinite loop to capture a userâs clipboard dataâwith the goal of redirecting all potential cryptocurrency transactions to their wallet address.Â
But despite hackersâ best efforts, ReversingLabs found that they werenât successful in a Bitcoin-stealing hack because the attack was too obscure.Â
âThe perfect candidate to succumb to this type of âspray-and-prayâ supply chain attack is a Ruby developer whose environment of choice is a Windows system thatâs also periodically being used to make Bitcoin transactions. A rare breed indeed,â it wrote.
Now itâs too late for hackers: the security firm contacted RubyGems two days after they discovered the attack, whereupon the infected files were shortly removed.Â
Hotspot for crime
RubyGems has 158 thousand packages with nearly 49 billion total downloadsâand appears to be a popular target for hackers who want to steal cryptocurrencies. Last year, researchers found cryptojacking software, which uses a host's computer to mine crypto, in 11 Ruby libraries.Â
Though security firms often pick up on such attacks, hackers will always try and find new ways to get to your Bitcoin. As if 2020 couldnât get any worse.

