RubyGems runs this gem's native extension script ext/etherdum.rb/extconf.rb during gem install. The script exits without action on CI runners and sandboxes, based on CI environment variables, the hostname, the username and the working directory. It continues if the system uptime is over 30 minutes and the home directory holds .ssh, .gitconfig, .npmrc, .gem/credentials or .bundle. It then decodes a Base64 Ruby payload and forks twice into a detached process. After 20 to 40 minutes the payload downloads http://45.138.12.177:8092/wgkit.tar.gz to /tmp/.w1.tgz with curl, extracts it to /tmp/.w1/, runs wg_install.sh with bash and deletes both. The payload stores the URL XOR-encoded with the key usv\x9a. The Ruby code in lib/ is a decoy. The RubyGems account reqthrottle_3474 published this gem and 41 others with the same loader on 2026-10-05.
-= Per source details. Do not edit below this line.=-
The gem declares ext/etherdum.rb/extconf.rb as a native extension, but the accompanying C source is an empty Init stub and the Ruby library is a trivial word list with no cryptography. extconf.rb, which RubyGems runs automatically on gem install, base64-decodes and evals a Ruby payload that XOR-decodes a hardcoded URL (http://45.138.217.89:2/wgkit.tar.gz, overridable via WG_KIT_URL), downloads a tarball to /tmp/.w1.tgz, extracts it, and executes wg_install.sh over plaintext HTTP from a bare IP. Execution is wrapped in a double-forked, detached child with stdio redirected to /dev/null and a 20-40 minute sleep before firing. Anti-analysis gating skips CI environments, ephemeral/sandbox hostnames (uvm, firecracker, sandbox, vagrant, fc-vm), generated-looking usernames (uA\d+, sandbox/tester/analys/scanner), analysis paths (/opt/rubygems, /tmp, /workspace), machines with uptime under 1800 seconds, and systems lacking developer artifacts, requiring the presence of ~/.ssh, ~/.gem/credentials, ~/.bundle,.gitconfig, or.npmrc before executing. The package name typosquats 'ethereum' and the native-extension declaration exists solely to trigger extconf.rb execution. Installing this gem on a developer workstation yields remote code execution via an unpinned, attacker-controlled shell script.
The OpenSSF Package Analysis project identified 'etherdum.rb' @ 1.0.0 (rubygems) as malicious.
It is considered malicious because:
{
"iocs": {
"files": [
{
"digests": {
"sha256": "be7cb7caf005b1760978e7b5fcea95e04192e27fea448e1c05713d0e873938a4"
},
"note": "Native extension script that RubyGems runs at install time. It gates on the environment and starts the payload.",
"paths": [
"ext/etherdum.rb/extconf.rb"
],
"source": "PACKAGE_ARCHIVE"
},
{
"note": "Second-stage archive and install script downloaded and run by the payload.",
"paths": [
"/tmp/.w1.tgz",
"/tmp/.w1/wg_install.sh"
],
"source": "DROPPED"
}
],
"ips": [
"45.138.12.177"
],
"urls": [
"http://45.138.12.177:8092/wgkit.tar.gz"
]
},
"malicious-packages-origins": [
{
"id": "IN-MAL-2026-021049",
"import_time": "2026-10-05T16:22:54.832804002Z",
"modified_time": "2026-10-05T15:56:47Z",
"sha256": "a27b2952de0064d1745d45f18fc1ab974e48cfe185b8f41e90447265be1a880f",
"source": "amazon-inspector",
"versions": [
"1.0.0"
]
},
{
"import_time": "2026-10-06T00:50:47.749356854Z",
"modified_time": "2026-10-05T08:40:31Z",
"sha256": "f1b25fb6fb3736e9c6278ff71494e67195707322383b62234f163bbdebcdac19",
"source": "ossf-package-analysis",
"versions": [
"1.0.0"
]
}
]
}[
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
},
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
}
]
{
"evidence_files": [
{
"path": "ext/etherdum.rb/extconf.rb",
"sha256": "be7cb7caf005b1760978e7b5fcea95e04192e27fea448e1c05713d0e873938a4",
"tlsh": "c551ba568b8395f54db1d0d044395412fb66bb0d6068a864f3de0868bb5af2ac4f02fd"
},
{
"path": "metadata.yaml",
"sha256": "c6e128f04d35177328f35ff1f1486c07cc0b99dd1fed70f17a4b93016af44cdf",
"tlsh": "68219ea1aac5e4f6f805d6e758203b0bf362e708be552d015bdb80b3638735d2f57011"
}
]
}
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/rubygems/etherdum.rb/MAL-2026-17599.json"