logo

Database

Use of software with malware In etheremu.rb

Description

The gem's extconf.rb, executed automatically during gem install, contains a base64-encoded Ruby payload that is decoded and eval'd inside a detached forked process. The payload XOR-decodes a hardcoded bare-IP URL (http://45.138.12.177:8092/wgkit.tar.gz), downloads a tarball to /tmp/.w1.tgz over plain HTTP with no pinning or verification, extracts it, and executes the enclosed wg_install.sh via bash. The accompanying native extension C source is an empty stub whose Init function is a no-op, so the extension exists solely as a vehicle to trigger the dropper at install time. The dropper is wrapped in extensive anti-analysis gating: it exits early if CI environment variables are set, if the hostname matches sandbox/firecracker/vagrant patterns, if the username looks auto-generated or contains strings like 'sandbox', 'tester', 'analys', or 'scanner', if the current working directory is under /tmp, /var/tmp, /opt/rubygems, or /workspace, if machine uptime is under 1800 seconds, or if no developer dot-files are present. It further sleeps 20-40 minutes before firing. Execution is gated on the presence of ~/.ssh, ~/.gitconfig, ~/.npmrc, ~/.gem/credentials, or ~/.bundle in the installer's home directory, selecting victims whose machines hold SSH keys and rubygems/npm/git publisher credentials for downstream harvesting by the fetched wg_install.sh stage.

The OpenSSF Package Analysis project identified 'etheremu.rb' @ 1.0.0 (rubygems) as malicious.

It is considered malicious because:

    The package executes one or more commands associated with malicious behavior.

Mitigation

Update Impact

Minimal update. May introduce new vulnerabilities or breaking changes.

Ecosystem
Component
Affected version