Cybersecurity researchers have identified a new typosquatting campaign targeting RubyGems users, deploying a Windows-based information stealer dubbed ‘StubMaker.’ This campaign involves 16 malicious packages designed to harvest browser credentials, cryptocurrency wallets, seed phrases, and Telegram data from compromised systems.
Typosquatting is a deceptive practice where attackers create packages with names similar to popular libraries, hoping developers will inadvertently install them. In this instance, the malicious gems include names like ‘ubnuler,’ ‘ri18nr,’ and ‘brumdler,’ mimicking legitimate Ruby dependencies. These packages were uploaded by users ‘mod8rz41mje’ (alias Riley Miller) and ‘rbq95bwt6q’ (alias Alex Davis). As of now, these packages have been removed from RubyGems.
Notably, the attackers exploited a known RubyGems behavior that allows anyone to claim a namespace once all versions of a gem have been yanked. This enabled them to republish malicious versions under the same package names, increasing the campaign’s effectiveness. Additionally, the ‘Author’ field in these gems was manipulated to display different names, attempting to obscure the common origin of the packages.
The attack chain utilizes an ‘extconf.rb’ hook, which is automatically executed during gem installation. This hook fetches a 22 MB Rust-based loader from a GitHub release, which then launches a Go-based stealer payload named ‘wincfg.’ The stealer incorporates a DLL payload (‘abe_payload.dll’) that extracts credentials from Chromium-based web browsers, including Google Chrome, Microsoft Edge, and Brave. It also collects extension data, browsing history, payment card numbers, cryptocurrency wallets, seed phrases, Telegram Desktop data, system information, and the victim’s public IP address.
Once the data is harvested, it is uploaded to Gofile as a password-protected ZIP archive. The attackers then retrieve the stolen information using a unique URL. This method of data exfiltration highlights the evolving tactics of threat actors in leveraging trusted platforms for malicious purposes.
This incident underscores the persistent threat of typosquatting attacks within open-source ecosystems. Developers are urged to exercise caution when installing packages, verify the authenticity of libraries, and regularly audit their dependencies to mitigate the risk of supply chain attacks.