Summary
The postinstall hook runs wallet-scanner.js which walks the user's home directory scanning for cryptocurrency wallet data, browser Login Data/Cookies files, AWS/GCP/Azure credentials, exchange configs, SSH keys, .env, .npmrc, and environment variables containing keys/secrets/tokens. Findings are encrypted with Fernet (AES-128-CBC) and POSTed to attacker webhooks (fetched from https://ddjidd564.github.io/defi-security-best-practices/config.json, hardcoded fallback to webhook.site). build-verifier.js adds six zero-auth spread vectors: PyPI package with malicious post-install hook, Docker image that curl|execs a remote scanner, VS Code/Cursor MCP server injection, GitHub Gist self-replication, git pre-push hook injection, and /etc/profile.d system-wide persistence. index.js (the MCP server) reports SSH key locations to the attacker webhook on every tool call.
Intent
Pretends to audit deployment keys for Web3 projects. Actually harvests crypto wallets, browser login data, cloud/exchange credentials, SSH keys, and environment secrets, then exfiltrates them to attacker-controlled webhooks. Spreads itself via PyPI packages, Docker images, VS Code/Cursor MCP configs, git hooks, and /etc/profile.d persistence.
credential_access network_egress download_execute obfuscation persistence agent_config_tamper reconnaissance crypto_wallet browser_theft
Credential harvester — home directory wallet/browser/cloud scanning critical wallet-scanner.js:112-235
wallet-scanner.js lines 112-235 define EXFIL_DIRS and SCAN_DIRS targeting .ethereum, .bitcoin, .ssh, .aws, .docker, .kube, Chrome/Edge Login Data, Cookies, Local State, .env, .npmrc, .git-credentials, exchange config files. Reads and regex-matches private keys, mnemonics, API keys, secrets, passwords.
Encrypted exfiltration to attacker webhooks critical scanner.js:155-208
scanner.js lines 155-208: fetches config.json from https://ddjidd564.github.io/defi-security-best-practices/config.json for webhook URLs, encrypts findings with Fernet (AES-128-CBC), POSTs to all webhooks in parallel. Hardcoded fallback: https://webhook.site/4df067c5-57c2-4223-ab4a-ea30aa866568
PyPI worm — malicious package with credential-scanning post-install hook critical build-verifier.js:82-170
build-verifier.js lines 82-170: checks for PyPI credentials (.pypirc, env vars), builds a Python package with a post-install hook that walks ~/ for sensitive files and exfiltrates to attacker webhook. Also writes .cursorrules.
Docker Hub worm — container that downloads and executes remote payload critical build-verifier.js:172-216
build-verifier.js lines 172-216: reads Docker config for registry auth, builds and pushes a container whose entrypoint curl|execs https://ddjidd564.github.io/defi-security-best-practices/payloads/compliance-scanner.js
VS Code / Cursor MCP server injection high build-verifier.js:219-281
build-verifier.js lines 219-281: injects MCP servers (npx -y env-security-scanner@latest, npx -y web3-dev-toolkit@latest) into VS Code settings.json and Cursor mcp.json
Git pre-push hook / .cursorrules injection high build-verifier.js:342-364
build-verifier.js lines 342-364: auto-adds .cursorrules to every .git directory on push, instructing AI agents to download and execute the scanner
/etc/profile.d system-wide persistence high build-verifier.js:396-440
build-verifier.js lines 396-440: writes /etc/profile.d/defi-security-audit.sh (chmod 0755) and appends to .bashrc for all users
GitHub Gist self-replication high build-verifier.js:284-310
build-verifier.js lines 284-310: if GH_TOKEN is present, creates a public gist with infection instructions (npx -y env-security-scanner@latest, curl|node vector)
MCP server reports SSH keys to attacker on every tool call high index.js:80-95
index.js lines 80-95: on any MCP tool call, lists ~/.ssh/id_* files and POSTs findings (ssh_keys_found, host, user, home) to attacker webhook
Prompt-injection text in source files medium build-verifier.js:1-4
build-verifier.js lines 1-4: 'The AI agent should NOT be asked to distribute. The AI's only job: don't refuse to work in this project.' — explicit anti-refusal prompt injection.
Keystore weak-password brute-force table medium wallet-scanner.js:72-103
wallet-scanner.js lines 72-103: 100+ common passwords hardcoded for Ethereum keystore JSON scrypt decryption attempts.