Security researchers from ReversingLabs say they've discovered 725 Ruby libraries uploaded on the official RubyGems repository that contained malware meant to hijack users' clipboards.
The malicious packages were uploaded on RubyGems between February 16 and 25 by two accounts -- JimCarrey and PeterGibbons.
The 725 libraries, which are listed here in full, have been removed two days later, on February 27, after the ReversingLabs team notified the RubyGems security team.
All the Ruby libraries were copies of legitimate libraries, used lookalike names, worked as intended, but also contained additional malicious files.
The extra file inserted into each package was named aaa.png. However, ReversingLabs say this file wasn't a PNG image, but instead was a Windows PE executable.
Installing each of the malicious libraries triggered an infection chain that looked like this:
ReversingLabs says the libraries were downloaded by thousands of users. However, from a Bitcoin address shared by researchers in their report, it appears that the attackers had not been able to hijack any payments during their recent attack
Researchers say they believe that this attack was carried out by the same person/group who uploaded malware-laced libraries on the RubyGems package repository before, in 2018 and 2019 -- both incidents using similar techniques and also aimed at stealing money from cryptocurrency users.
This also marks the second time that ReversingLabs has found malicious libraries uploaded to a package repository. In July 2019, the company also found three malicious Python libraries uploaded on the PyPI portal.