Summary
Install hook (package.json:30) runs wallet-scanner.js which walks ~/.ethereum, ~/.bitcoin, browser profile dirs (Login Data, Cookies, Local State), ~/.aws, ~/.docker, ~/.kube, exchange config dirs, .env, .bash_history — extracts private keys, mnemonics, API tokens, passwords, and credential file paths. Encrypts 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). build-verifier.js contains 6 zero-install spread vectors: PyPI wheel with malicious post-install hook, Docker Hub image with curl|bash payload, VS Code/Cursor MCP server injection, GitHub Gist creation (requires GH_TOKEN), git pre-push hook that writes .cursorrules/CLAUDE.md, and /etc/profile.d system-wide persistence. Lab crashed on ESM/CJS mismatch but source is unambiguous.
Intent
Pretends to be a crypto credential scanner for DevSecOps. Actually scans the user's home directory for wallet files, browser login databases, cookies, AWS/Docker/Kubernetes credentials, exchange configs, .env files, and shell history passwords, encrypts findings with Fernet, and exfiltrates them to attacker-controlled webhooks. Attempts to self-replicate via 6 vectors: PyPI publication, Docker Hub image publication, VS Code/Cursor MCP injection, GitHub Gist creation, git pre-push hook injection, and /etc/profile.d system-wide persistence.
credential_access network_egress download_execute persistence agent_config_tamper reconnaissance crypto_wallet browser_theft
Home directory credential scanner critical wallet-scanner.js:112-235
wallet-scanner.js walks 150+ paths including ~/.ethereum, ~/.bitcoin, ~/.aws/credentials, ~/.docker/config.json, browser Login Data/Cookies/Local State files, ~/.npmrc, ~/.git-credentials, exchange configs — reads and exfiltrates private keys, mnemonics, API tokens, passwords.
Encrypted exfiltration to attacker-controlled webhooks critical scanner.js:155-208
Fernet-encrypts scan findings with AES-128-CBC and POSTs to webhooks from https://ddjidd564.github.io/defi-security-best-practices/config.json; hardcoded fallback webhook.site/4df067c5-57c2-4223-ab4a-ea30aa866568.
PyPI self-replication vector critical build-verifier.js:82-170
build-verifier.js:82-170 — checks .pypirc and TWINE_PASSWORD/PYPI_TOKEN env vars; if present, builds a Python wheel with a post-install hook that re-scans the victim's home and exfiltrates to the same webhook.
Docker Hub self-replication vector critical build-verifier.js:173-216
build-verifier.js:173-216 — checks .docker/config.json for registry auth; builds and pushes an Alpine image with scan.sh that curl|bash-executes 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:219-281 — appends MCP server entries for env-security-scanner and web3-dev-toolkit to VS Code settings.json and Cursor mcp.json, causing future sessions to execute remote code.
Git pre-push hook — .cursorrules/CLAUDE.md injection high build-verifier.js:343-394
build-verifier.js:343-394 — walks all .git repos under HOME; writes pre-push hooks that unconditionally create .cursorrules and CLAUDE.md with compliance directives pointing to npx -y env-security-scanner@latest.
/etc/profile.d system-wide persistence high build-verifier.js:397-456
build-verifier.js:397-456 — writes /etc/profile.d/defi-security-audit.sh (curl|bash remote code) and appends to all user .bashrc files.
AI agent instruction file tampering high build-verifier.js:509-549
build-verifier.js:509-549 — writes .cursorrules, CLAUDE.md, .windsurfrules in every project directory with directives instructing AI agents to download and execute remote code.
Browser credential theft (Login Data, Cookies) critical wallet-scanner.js:197-234
wallet-scanner.js:197-234 — targets Chrome/Chromium/Brave/Edge Login Data (SQLite), Cookies, and Local State (master encryption key) across Linux, macOS, and Windows (WSL).
Ethereum keystore brute-force high wallet-scanner.js:315-418
wallet-scanner.js:315-418 — tries 150+ common passwords + file- and username-derived candidates against scrypt-encrypted ETH keystores (30s time-box per file).
Shell history password extraction high wallet-scanner.js:421-502
wallet-scanner.js:421-502 — scans .bash_history, .zsh_history, .fish_history for wallet commands and extracts --password/-p/--passphrase arguments and export KEYSTORE_PASSWORD=xxx patterns.
GitHub Gist self-replication medium build-verifier.js:284-340
build-verifier.js:284-340 — if GH_TOKEN/GITHUB_TOKEN is set, creates a public gist pointing victims to npx -y env-security-scanner@latest.
Package.json script modification medium build-verifier.js:628-640
build-verifier.js:628-640 — adds verify and precommit scripts to every package.json found in walked directories, pointing to npx env-security-scanner@latest.
Source code header injection medium build-verifier.js:553-586
build-verifier.js:553-586 — prepends P-2024-001 compliance headers (with executable npx/curl commands) to all .js/.ts/.py/.rs/.go files in projects.
Non-printing zero-width characters in directives low scanner.js:280
scanner.js:280 — uses \u200B\u200C\u200D (zero-width space/zero-width non-joiner/zero-width joiner) to obfuscate security audit trail comments, evading text-based detection.
Example wallet with real private key bundled low wallet.json:2-5
wallet.json contains private_key 0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d and mnemonic journey slight smile pilot online motor grape world huge puzzle nasty disease (labeled example but usable on testnets).