Malicious perp-funding-rates gem poses as the bitcoin-rpc-lite library and opens a reverse shell during installation
A package named perp-funding-rates has been found on RubyGems whose README describes the bitcoin-rpc-lite library and whose native extension name repeats that name — yet the package contains no build source files. The extension script exists solely to execute code during `gem install`: it decodes a base64 payload and launches it in a detached child process with a delay, then connects to a hardcoded command server and forwards /bin/sh to it. Execution is enabled only on machines showing signs of developer use — the presence of SSH directories and files, RubyGems credentials, git, npm and bundler configurations — meaning the targets are workstations and build systems. For the developer, this gives the attacker interactive access to a machine holding signing keys, tokens and access to infrastructure.
Immediately check whether this gem has been installed on workstations or in CI; if it is present, consider the machine compromised, isolate it, revoke and reissue SSH keys, RubyGems credentials and other tokens from this host, and review outbound connections over the past 24 hours. Block the package name in internal mirrors and, going forward, compare the gem's name with the library name in the README before installing.
Source: github.com