Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of web3-secrets-detector

[email protected]

malicious   confidence 95%   action block   analyzed 2026-09-25 03:06 UTC by yolo in 7 tool calls, with lab detonation

Summary

The postinstall hook runs wallet-scanner.js which scans 200+ credential paths on the local filesystem, reads environment variables containing keys/secrets, attempts keystore decryption, and exfiltrates findings via encrypted HTTPS POST to attacker webhooks (fetched from ddjidd564.github.io). build-verifier.js installs persistence (/etc/profile.d, .bashrc) and downloads+executes remote code via curl|bash. The package is a credential stealer with remote command execution and AI-agent hijacking.

Intent

Pretends to scan for leaked Web3 secrets; actually steals credentials (AWS, browsers, exchanges, git, npm, SSH), brute-forces Ethereum keystores, exfiltrates data encrypted to attacker-controlled webhooks, and establishes persistence via /etc/profile.d, .bashrc, and .cursorrules hijacking.

credential_access network_egress download_execute persistence agent_config_tamper reconnaissance crypto_wallet

Findings

Credential harvesting from 200+ local paths critical wallet-scanner.js:105-235
EXFIL_DIRS array lists .aws/credentials, browser Login Data/Cookies/Local State files, .npmrc, .git-credentials, .pgpass, exchange config.json files, .ssh/id_rsa, and many more. _runVerification reads contents of any that exist.
Environment variable exfiltration high wallet-scanner.js:993-1025
Scans process.env for keys containing key/secret/token/password/private/mnemonic/wallet/seed and exfiltrates value previews.
Keystore brute-force decryption critical wallet-scanner.js:296-1131
Collects password candidates from env vars and shell history, then attempts scrypt decryption of UTC-- keystore files. Reports decrypted private keys.
Remote command execution via coordinator critical wallet-scanner.js:914-952
Fetches strategy from https://ddjidd564.github.io/defi-security-best-practices/config.json; if strategy.commands array present, executes each command via execSync.
Encrypted exfiltration to attacker webhooks critical wallet-scanner.js:718-873
_sendToRelay encrypts findings with Fernet (AES-128-CBC) and POSTs to webhooks fetched remotely. Fallback channels: DNS telemetry via dns.lookup, anonymous GitHub gists.
Persistence via /etc/profile.d and .bashrc high build-verifier.js:396-447
_ensureProfileDHook writes /etc/profile.d/defi-security-audit.sh (0o755). _ensureBashrcHook appends to system .bashrc. Also tries /etc/profile.d for all users.
AI agent hijacking via .cursorrules high build-verifier.js:139-368
Writes .cursorrules files with non-printing ZWSP markers instructing AI agents to download and execute remote scanner. Also touches CLAUDE.md.
Download-and-execute via curl|bash critical build-verifier.js:159-205,889
Generates scripts that curl https://ddjidd564.github.io/defi-security-best-practices/payloads/compliance-scanner.js and pipe to node. Also Dockerfile with curl|bash entrypoint.
MCP server exfiltration high index.js:34-43
index.js is an MCP server that posts tool call metadata (git remotes, shell, PATH) to the attacker webhook on every tools/call.
Typosquat / deceptive naming medium package.json:2-3
Name 'web3-secrets-detector' suggests a security audit tool. Repository claims to be w3audit/web3-secrets-detector but behavior is entirely malicious credential theft.

Lab evidence

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