Malicious RubyGems Packages Deploy Reverse Shells and Cryptocurrency-Theft Toolkit

· Original article ↗

Summary

Researchers identified 42 malicious RubyGems packages that use reverse shells or a toolkit to hijack cryptocurrency transactions and steal wallet data. The article details the malware’s delivery, persistence, and operation.

Key points

  • The packages use typosquatting, crypto-brand names, and generic utility names to target crypto and web3 developers.
  • One variant delays execution, evades analysis environments, and opens a reverse shell; another downloads a cryptocurrency-theft toolkit.
  • The toolkit installs a trusted root certificate and local proxy to intercept exchange traffic and replace withdrawal addresses while displaying the original address.
  • A grabber monitors the clipboard and searches browsers, wallet files, and user directories for wallet data, seed phrases, and private keys.
  • The malware persists through shell configuration and desktop autostart entries, and sends stolen material to a remote collector.
  • The article recommends checking for the bundled root CA, unexpected proxy settings, autostart entries, and a listener on 127.0.0.1:8899; affected users should move funds and change exposed credentials from a clean device.

Article Details

Attack Vectors
  • Malicious RubyGems packages use typosquatting, brandjacking, and generic utility names to target crypto and web3 developers.
  • A delayed payload in ext/req_throttle_mini/extconf.rb evades CI, sandbox, and analysis environments, then either opens a reverse shell or downloads and installs a second-stage toolkit.
  • The toolkit installs a trusted root certificate and local proxy to intercept targeted exchange traffic, inject JavaScript, and replace withdrawal addresses while concealing the change in the victim's browser.
  • The toolkit monitors and replaces cryptocurrency addresses in the clipboard, and searches local files and browser-wallet storage for wallet secrets to exfiltrate.
Defensive Notes
  • Check endpoints for the bundled root CA, modified proxy settings, unexpected autostart entries, and a listener on 127.0.0.1:8899.
  • Treat wallet or exchange secrets present on an affected host as compromised. From a clean device, move funds to a newly created wallet and change exchange passwords, API keys, and 2FA.

Indicators of compromise

TypeIndicatorContext
IPV445[.]138[.]12[.]177Malware C2 host used for reverse-shell connections, toolkit delivery, and data collection.
SHA256075b6ac656aa414e2d21b9d1bc8b0fd030902202222e9d06a326fd80d7827ae6SHA-256 of the root certificate installed by the malicious toolkit for TLS interception.
SHA25633276fedf0632be39b4e8a646c520bfa081bb7e67dce52042da46bbbda16d440SHA-256 of the malicious wgkit.tar.gz second-stage toolkit archive.
SHA256387a778a6376b6c060516ce5c1191a61e075acfe3fb073e6e5cd78eeb96a95b3SHA-256 of the malicious _grab.py wallet-data collection component.
SHA256549d35217f1e884634993ba6f13dd8e82091dd9f995a9ed0cb575958e63f073dSHA-256 of the malicious inject_proxy.py traffic-interception component.
SHA25657a56ab47fa7f33147d4924b07e77d773515b4a06ca9ac090874209a9950f30bSHA-256 of the malicious browser content script that replaces withdrawal addresses.
SHA256b857fdf59db6948ea01643d935742904e9275572e63cd23331a9405483c6379cSHA-256 of the malicious wg_install.sh installer.
URLhxxp[:]//45[.]138[.]12[.]177:8080/wRemote collector fallback URL used by the injected browser script.
URLhxxp[:]//45[.]138[.]12[.]177:8080/wi/grabDefault C2 endpoint used by the grabber to exfiltrate collected wallet data.

MITRE ATT&CK

Malware

Products

Industries

Related Articles