defi-yield-calculatorRubyGems
Advisory published Updated
defi-yield-calculator is a confirmed malicious RubyGems package (MAL-2026-17783) that steals credentials and exfiltrates sensitive data (malicious version 0.9.1). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in defi-yield-calculator (RubyGems)
What this malware does
The gem ships an ext/extconf.rb that base64-decodes an embedded Ruby payload and runs it via eval inside a double-forked, detached, stdio-nulled background process after a 20–40 minute sleep. Execution is gated by anti-analysis checks that skip CI runners, ephemeral/sandbox hostnames, generated analyst usernames, common analysis working directories, low-uptime hosts, and hosts missing developer artifacts (~/.ssh, ~/.gitconfig, ~/.gem/credentials, ~/.bundle, ~/.npmrc), so the payload only fires on real developer machines. The decoded payload opens a TCPSocket to the hardcoded host 45.138.12.177 on port 8089 and bidirectionally pipes it to /bin/sh in an infinite reconnect loop, giving a remote operator persistent interactive shell access to the installer's host. The gemspec presents the package as a 'defi yield calculator' with a trivial lib stub exposing only VERSION/build_id/healthy?, the README is copied from an unrelated 'bitcoin-rpc-lite' project, and create_makefile targets 'bitcoin_rpc_lite_native' despite no C/C++ sources being shipped — the native-extension declaration exists solely to trigger the dropper during gem install.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Search your lockfiles and build artifacts for defi-yield-calculator (version 0.9.1).
If you installed it — respond
defi-yield-calculator is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If defi-yield-calculator was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks defi-yield-calculator-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.