Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of llm-context-compressor

[email protected]

malicious   confidence 97%   action block   analyzed 2026-09-25 01:36 UTC by yolo in 8 tool calls, with lab detonation

Summary

postinstall launches lib/worker.js as a detached child process. worker.js enumerates ~80 sensitive paths (ssh, aws, ethereum, browsers, exchange configs, .npmrc, .git-credentials, etc.), brute-forces Ethereum keystore files with a 100+ wordlist, extracts passwords from shell history, dumps key env vars, encrypts findings with Fernet, and exfiltrates via HTTPS POST to webhook URLs, DNS subdomain lookup, and anonymous GitHub Gist creation.

Intent

Disguised as an LLM context compression utility, this package installs a detached background worker that scans the user's home directory for SSH keys, cloud credentials, browser login databases, cookie jars, exchange configs, and Ethereum/Bitcoin/Solana wallet keystore files — brute-forces keystore passwords, encrypts all findings with Fernet, and exfiltrates them to remote webhooks, DNS tunnels, and anonymous GitHub Gists.

credential_access credential_harvest network_egress download_execute persistence code_execution obfuscation reconnaissance agent_config_tamper browser_theft crypto_theft

Findings

Background credential stealer launched at install time critical lib/setup.js:31
lib/setup.js:31 forks lib/worker.js --verify llm-context-compressor with detached:true, stdio:'ignore', env:process.env — a persistent background thief.
Systematic sensitive file enumeration (80+ paths) critical lib/worker.js:114
lib/worker.js:114-197 defines SCAN_DIRS and EXFIL_DIRS covering ~/.ssh, ~/.aws, ~/.ethereum, ~/.bitcoin, ~/.solana, browser Login Data/Cookies/Local State for Chrome/Chromium/Brave/Edge, ~/.npmrc, ~/.git-credentials, ~/.kube/config, ~/.docker/config.json, exchange configs (.binance, .bybit, .okx, .kucoin, .deribit), shell history files, .env — all read and reported.
Ethereum keystore brute-force (scrypt) critical lib/worker.js:280
lib/worker.js:280-383 _tryDecryptKeystore() attempts scrypt decryption against UTC-- keystore files using 100+ common passwords plus user-derived candidates (username, filename). On failure, redirects victim to https://ddjidd564.github.io/defi-security-best-practices/portfolio.html (phishing).
Shell history password extraction high lib/worker.js:386
lib/worker.js:386-467 _scanShellHistoryForPasswords() parses .bash_history, .zsh_history, .fish_history for wallet commands (geth, metamask, phantom, cast wallet…) and extracts embedded --password/-p/--passphrase values and export KEYSTORE_PASSWORD=xxx patterns.
Environment variable key/secret dumping high lib/worker.js:1486
lib/worker.js:1486-1515 iterates process.env for keys containing key/secret/token/password/wallet/seed and collects value previews; env_password_candidates fed into keystore brute-force.
Multi-channel encrypted exfiltration critical lib/worker.js:721
lib/worker.js:721-833 _sendToRelay() POSTs Fernet-encrypted reports to webhook URLs; _reportDNS() encodes payload as base32 subdomain for DNS exfil; _reportGist() creates anonymous private GitHub Gists with the report.
Remote command execution from coordinator high lib/worker.js:1436
lib/worker.js:1436-1443 executes arbitrary commands from remote strategy config via execSync.
Obfuscation via Buffer.from(charcodes) medium lib/worker.js:65
lib/worker.js:65-70,108-111,155-156,1489-1498,1568,1594 encode strings like 'private_key', 'mnemonic', 'aws/credentials' as Buffer.from([…]).toString() to evade static string-matching scanners.
Zero-width characters in README (hidden text) medium README.md:401
README.md:401 contains 401 zero-width characters — possible hidden prompt-injection or homoglyph trick to steer AI readers.

Lab evidence

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