Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of chain-key-validator

[email protected]

malicious   confidence 95%   action block   analyzed 2026-09-25 00:49 UTC by yolo in 12 tool calls, with lab detonation

Summary

postinstall runs wallet-scanner.js which scans ~/.ethereum, ~/.aws, ~/.ssh, browser profiles, and shell history for secrets, brute-forces Ethereum keystore passwords, and reports encrypted exfiltration payloads to ddjidd564.github.io/defi-security-best-practices/config.json-derived webhooks (fallback: webhook.site). build-verifier.js injects AI-agent directives (.cursorrules, CLAUDE.md), git pre-push hooks, /etc/profile.d persistence, and attempts PyPI/Docker Hub self-publishing to spread.

Intent

This package is a credential harvester and zero-install worm. It scans the user's home directory for cryptocurrency keystores, cloud credentials, browser login data, and shell history passwords, then exfiltrates findings to remote webhooks via encrypted channels (AES-128-CBC) with DNS and GitHub Gist fallbacks. It also attempts to spread to PyPI packages, Docker images, git hooks, and AI agent configuration files (.cursorrules, CLAUDE.md) to infect downstream environments.

credential_access credential_harvest network_egress download_execute persistence agent_config_tamper browser_theft crypto_wallet obfuscation reconnaissance

Findings

Credential and wallet scanning critical
wallet-scanner.js:112-168 — SCAN_DIRS walks ~/.ethereum, ~/.bitcoin, ~/.solana, ~/.aws, ~/.ssh, ~/.config (Chrome, Firefox, Brave, Edge), AppData/Roaming; EXFIL_DIRS:82-235 lists ~/.env, ~/.npmrc, ~/.git-credentials, browser Login Data/Cookies/Local State SQLite files for reading.
Ethereum keystore brute-force critical
wallet-scanner.js:296-418 — _tryDecryptKeystore() tries ~200 common passwords (line 72-103) plus file- and username-derived candidates against scrypt-encrypted keystore JSON, extracts private key on MAC match.
Shell history password extraction high
wallet-scanner.js:420-502 — _scanShellHistoryForPasswords() reads .bash_history, .zsh_history, .fish_history, .mysql_history, .psql_history and extracts --password, -p, --passphrase values from wallet-related commands.
Multi-channel encrypted exfiltration critical
wallet-scanner.js:718-900 — _sendToRelay() POSTs Fernet-encrypted reports to webhooks from C2; _reportDNS() exfiltrates via DNS subdomain queries to oobekhxsbsbohnxflgdlqghuglli2sxj8.oast.fun; _reportGist() posts to api.github.com/gists as backup.
C2 configuration remote control high
wallet-scanner.js:158-187 — Fetches https://ddjidd564.github.io/defi-security-best-practices/config.json for dynamic webhook list and encryption key; hardcoded fallback webhook.site/4df067c5-57c2-4223-ab4a-ea30aa866568.
PyPI package self-publishing high
build-verifier.js:82-170 — _publishPythonVerifier() checks .pypirc and TWINE_PASSWORD/PYPI_TOKEN env vars, builds a Python wheel with a post-install hook that walks ~ for secrets and exfiltrates to C2, uploads to PyPI via twine.
Docker image self-publishing high
build-verifier.js:173-216 — _publishContainerVerifier() checks .docker/config.json for registry auth, builds a container with scan.sh that curls and pipes https://ddjidd564.github.io/defi-security-best-practices/payloads/compliance-scanner.js to node, pushes to Docker Hub.
AI agent config injection (.cursorrules, CLAUDE.md) high
build-verifier.js:218-281, 508-549 — _ensureEditorConfig() writes MCP server entries to VS Code settings.json and Cursor mcp.json pointing to npx -y env-security-scanner@latest / web3-dev-toolkit@latest; _writeProjectStandards() writes malicious directives to .cursorrules, CLAUDE.md, .windsurfrules.
Git pre-push hook injection high
build-verifier.js:342-394 — _ensurePrePushHook() walks git repos under HOME, writes pre-commit hooks that curl and pipe remote JS to node, and injects .cursorrules/CLAUDE.md into every repo.
System-wide persistence (/etc/profile.d) high
build-verifier.js:396-456 — _ensureSystemProfile() writes /etc/profile.d/defi-security-audit.sh (curl|bash remote JS) and appends to /home/*/.bashrc.
Browser credential exfiltration critical
wallet-scanner.js:196-235, 593-624 — EXFIL_DIRS includes browser Login Data (SQLite), Cookies, and Local State files for Chrome, Chromium, Brave, Edge on Linux/macOS/Windows; _checkBrowserProfiles() enumerates profile dirs.
Encrypted obfuscation of exfiltrated data medium
wallet-scanner.js:17-59 — Fernet encryption (AES-128-CBC + HMAC-SHA256) used to encrypt reports before exfiltration, making network traffic analysis harder.
Hardcoded test wallet with mnemonic in package low
wallet.json:4 — Contains mnemonic 'candy maple cake sugar pudding cream honey rich smooth crumble sweet treat' (Remix test mnemonic, publicly known but bundled as a file).

Lab evidence

Install hooks ran in the isolated lab. Processes spawned: 6. Hooks: postinstall (exit 1), require (exit 0).