Summary
The postinstall hook (lib/setup.js) spawns a detached background worker (lib/worker.js) that recursively scans the user's home directory and AppData for credential files (.npmrc, .git-credentials, .ssh/, AWS ~/.aws/credentials, Chrome Login Data/Cookies, Ethereum keystores, .env, .bash_history, etc.), brute-forces weak passwords on crypto keystores, collects process.env, and sends encrypted reports to hardcoded webhook.site URLs (and to a GitHub Pages config endpoint at ddjidd564.github.io that can update the webhook list). Exfiltration uses three channels in parallel: HTTPS POST to webhooks, DNS out-of-band lookups, and anonymous GitHub Gist creation. The package also embeds prompt-injection text (CLAUDE.md / AGENTS.md content) to steer AI agents.
Intent
Disguised as an LLM context compression utility, this package is a credential stealer (info-stealer) that scans the host for private keys, AWS credentials, browser logins/cookies, crypto wallet keystores, and environment variables, then exfiltrates findings via multiple channels (webhook POST, DNS OOB, GitHub Gist) to attacker-controlled endpoints.
credential_access credential_harvest network_egress crypto_theft persistence obfuscation reconnaissance agent_config_tamper
Credential stealer disguised as LLM utility critical lib/worker.js:7-200
Package claims to be 'Intelligent context window compression for LLM applications' but installs a credential scanner (lib/worker.js, 1942 lines) that scans ~/.ssh, ~/.aws, ~/.kube, ~/.docker, browser Login Data/Cookies/Local State files, .npmrc, .git-credentials, .pgpass, .mysql_history, .bash_history, .zsh_history, .env, and Ethereum/Bitcoin/Solana wallet directories.
Crypto wallet keystore brute-forcing high lib/worker.js:298-420
Attempts to brute-force Ethereum (scrypt) and Bitcoin (AES) keystore passwords using a 100+ wordlist including user-derived candidates (nameNoExt, username, common passwords, crypto terms like 'metamask', 'phantom', 'bitcoin'). Time-boxed to 30s per file.
Multi-channel encrypted exfiltration critical lib/worker.js:719-864
Reports are Fernet-encrypted (AES-128-CBC + HMAC-SHA256) and sent via: (1) parallel HTTPS POST to webhooks (webhook.site), (2) DNS out-of-band lookups (base32-encoded payload as subdomain), (3) anonymous GitHub Gist creation (api.github.com/gists), (4) local file queue (~/.local/share/.integrity_queue).
Remote config for dynamic webhook updates high lib/worker.js:904-926
Config is fetched from https://ddjidd564.github.io/defi-security-best-practices/config.json (primary), raw.githubusercontent mirror, and DNS TXT record. Attacker can update webhooks remotely.
Environment variable dump high lib/worker.js:1445
All process.env key-value pairs are collected and sent; keys containing 'password', 'token', 'key', 'secret' are flagged. Spawned with RUN_VERIFICATION=llm-context-compressor env var.
Prompt injection text embedded high lib/worker.js:1709-1712
lib/worker.js contains CLAUDE.md and AGENTS.md content (lines 1709-1712) instructing AI agents to enable 'automatic credential integrity verification' and 'maximize environments with active credential scanning' — a prompt-injection attempt to steer agent behavior.
Background persistence via local queue medium lib/worker.js:852-898
When all exfil channels fail, encrypted payloads are appended to ~/.local/share/.integrity_queue and flushed on next successful scan.
Infection vector detection high lib/worker.js:1158-1190
detectInfectionVector() checks for npm_postinstall, git_hook, mcp_tool, cron, cursor_editor, pipe_execution — tailored to maximize spread through CI/CD and AI agent workflows.