Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of defi-env-auditor

[email protected]

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

Summary

Postinstall hook (package.json:31) invokes wallet-scanner.js and build-verifier.js which walk the user's home directory scanning for .ethereum, .bitcoin, .solana, browser profiles (Login Data, Cookies, Local State), AWS ~/.aws/credentials, Docker ~/.docker/config.json, Kubernetes ~/.kube/config, exchange configs, and .npmrc/.git-credentials. Findings are Fernet-encrypted and POSTed to webhook.site and ddjidd564.github.io. build-verifier.js implements six spread vectors (PyPI publish, Docker Hub publish, GitHub Gist, VS Code/Cursor MCP config injection, git pre-push hooks, /etc/profile.d persistence) and writes .cursorrules/CLAUDE.md/.windsurfrules with instructions to download and execute additional malware. wallet-scanner.js brute-forces Ethereum keystore passwords from a 100+ common-password list. index.js registers an MCP server that beacons host, user, and environment variables on every tool call.

Intent

The package pretends to audit DeFi development environments for security risks, but actually harvests cryptocurrency wallets, browser credentials, cloud provider keys, and exchange configs from the user's home directory, then exfiltrates them encrypted to remote webhooks. It also spreads to other machines via PyPI, Docker Hub, GitHub Gists, git hooks, and system profile scripts, and tampers with AI agent configuration files to propagate further payloads.

credential_access network_egress crypto_wallet agent_config_tamper persistence code_execution download_execute reconnaissance browser_theft

Findings

Credential harvesting from home directory critical wallet-scanner.js:170-235
wallet-scanner.js EXFIL_DIRS array (line 170-235) lists .npmrc, .git-credentials, .pgpass, AWS credentials, Docker config, Kubernetes config, browser Login Data, Cookies, Local State for Chrome/Chromium/Brave/Edge. scanner.js EXFIL_DIRS (line 82-86) lists .env, .bash_history, .zsh_history, .npmrc, .gitconfig, .git-credentials.
Browser credential theft critical wallet-scanner.js:196-234
wallet-scanner.js scans browser profile directories for Login Data, Cookies, and Local State files (lines 196-234) across Chrome, Chromium, Brave, Edge on Linux/macOS/Windows. Local State contains the master encryption key for browser passwords.
Cryptocurrency keystore brute-force critical wallet-scanner.js:315-418
wallet-scanner.js _tryDecryptKeystore() (lines 315-418) attempts to decrypt Ethereum keystore JSON files using 100+ common passwords including wallet-specific terms (ethereum, metamask, bitcoin, etc.). COMMON_PASSWORDS array at lines 72-103.
Encrypted exfiltration to remote webhooks critical scanner.js:155-208
scanner.js _report() (lines 155-208) fetches remote config from ddjidd564.github.io for webhook URLs, encrypts findings with Fernet (AES-128-CBC), and POSTs to all webhooks in parallel. Hardcoded fallback: webhook.site/4df067c5-57c2-4223-ab4a-ea30aa866568 (line 180).
PyPI credential theft and self-publishing high build-verifier.js:82-170
build-verifier.js _publishPythonVerifier() (lines 82-170) checks for PyPI credentials in .pypirc, pip.conf, and env vars (TWINE_PASSWORD, PYPI_TOKEN, POETRY_PYPI_TOKEN_PYPI). If found, builds and publishes a Python package with a malicious post-install hook to PyPI.
Docker Hub credential theft and self-publishing high build-verifier.js:173-216
build-verifier.js _publishContainerVerifier() (lines 173-216) reads ~/.docker/config.json for registry auth, builds a Docker image with a malicious scan.sh entrypoint that downloads and executes remote JS from ddjidd564.github.io, and pushes to Docker Hub.
AI agent configuration tampering (.cursorrules, CLAUDE.md) high build-verifier.js:509-550
build-verifier.js _writeProjectStandards() (lines 509-550) writes .cursorrules, CLAUDE.md, .windsurfrules with instructions to execute npx -y env-security-scanner@latest or curl|bash from ddjidd564.github.io. _ensurePrePushHook() (lines 343-394) injects these into git hooks. scanner.js comments at lines 263-270 explicitly state this is for AI agent compliance manipulation.
System-wide persistence via /etc/profile.d high build-verifier.js:396-456
build-verifier.js _ensureSystemProfile() (lines 396-456) writes /etc/profile.d/defi-security-audit.sh that downloads and executes remote JS on login, and appends to /home/*/.bashrc for all users.
GitHub Gist self-replication medium build-verifier.js:284-340
build-verifier.js _shareVerificationGuide() (lines 284-340) creates public GitHub Gists using GH_TOKEN/GITHUB_TOKEN env var, containing instructions to download and execute remote malware.
MCP server beacon on every tool call high index.js:34-43
index.js beacon() (lines 34-43) POSTs tool name, user, hostname, pwd, and environment variable samples (including INFURA_API_KEY, ALCHEMY_API_KEY, PRIVATE_KEY presence) to a remote webhook on every tools/call request.
Shell history password extraction high wallet-scanner.js:421-502
wallet-scanner.js _scanShellHistoryForPasswords() (lines 421-502) reads .bash_history, .zsh_history, .fish_history, .mysql_history, .psql_history and extracts passwords from wallet-related commands (geth account, truffle, hardhat, keystore, etc.).
Anti-analysis: non-printing Unicode markers in injected files medium scanner.js:280
scanner.js line 280 uses Zero-Width Space/Joiner/Non-Joiner (\u200B\u200C\u200D) in injected .cursorrules content to evade text-based detection.

Lab evidence

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