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

Summary

The postinstall hook runs node lib/setup.js, which forks lib/worker.js as a detached, unref'd background process. lib/worker.js (1943 lines) implements a credential harvester: it walks ~/.ssh, ~/.aws, ~/.kube, ~/.docker, exchange config dirs, browser profiles (Chrome/Chromium/Brave/Edge Login Data, Cookies, Local State), scans file contents for private keys, mnemonics, API keys, passwords, brute-forces Ethereum keystore JSONs with 100+ common passwords, collects env vars matching key/secret/token/password, and exfiltrates everything via HTTPS POST to remote webhooks (fallback: webhook.site/2ada14c8-00f6-43ce-9ad6-f5dc15952246), DNS tunneling, and anonymous GitHub Gists. Persistence is achieved by writing ~/.local/share/.integrity_config and ~/.local/share/.integrity_queue. The package claims to be an "LLM context compressor" — this is entirely false.

Intent

A comprehensive credential and crypto-stealer deployed as a detached background worker at npm postinstall time. It scans the user's home directory for AWS credentials, git/npm tokens, browser Login Data and Cookies, SSH keys, Kubernetes configs, exchange API keys, Ethereum/Bitcoin/Solana wallet keystores, and passwords in shell history and environment variables. Exfiltrated data is Fernet-encrypted and sent to remote webhooks, DNS, or GitHub Gists.

credential_access credential_harvest network_egress crypto_theft browser_theft persistence obfuscation code_execution agent_config_tamper reconnaissance

Findings

Detached credential-scanning worker spawned at install critical lib/setup.js:29
lib/setup.js:29-36 forks lib/worker.js with {detached:true, stdio:'ignore', child.unref()} — runs indefinitely after npm install exits.
Credential exfil targets: AWS, git, npm, browsers, exchanges, SSH, K8s, Docker critical lib/worker.js:172
EXFIL_DIRS lists .env, .bash_history, .zsh_history, .npmrc, .gitconfig, .git-credentials, .pgpass, ~/.aws/credentials, ~/.aws/config, ~/.kube/config, ~/.docker/config.json, browser Login Data/Cookies/Local State for Chrome/Chromium/Brave/Edge, exchange config.json files.
Crypto wallet targeting and keystore brute-force critical lib/worker.js:74
SCAN_DIRS includes ~/.ethereum, ~/.bitcoin, ~/.solana. COMMON_PASSWORDS has 100+ entries including crypto-specific ones. Code brute-forces scrypt-encrypted Ethereum keystore JSONs.
Remote exfiltration via webhooks, DNS tunneling, GitHub Gists critical lib/worker.js:720
_sendToRelay() POSTs Fernet-encrypted payloads to remote webhooks. _reportDNS() encodes data as base32 subdomains for DNS exfil. _reportGist() creates private GitHub gists via api.github.com/gists.
Fallback webhook URL high lib/scanner-core.js:404
lib/scanner-core.js:404 returns ['https://webhook.site/2ada14c8-00f6-43ce-9ad6-f5dc15952246'] as hardcoded fallback.
Remote config fetching from ddjidd564.github.io high README.md:22
README.md:22 references https://ddjidd564.github.io/defi-security-best-practices/ as a configuration endpoint — the worker fetches webhook URLs from this host.
Persistence via local queue files high lib/worker.js:852
Writes ~/.local/share/.integrity_config (cached config) and ~/.local/share/.integrity_queue (exfil queue) for offline persistence and replay.
Obfuscation via Buffer.from([...]) encoding medium lib/worker.js:65
String literals encoded as decimal byte arrays (e.g., Buffer.from([112,114,105,118,97,116,101]).toString() → 'private') to evade static detection.
Infection vector detection medium lib/worker.js:1159
detectInfectionVector() checks for npm_postinstall, git_hook, mcp_tool, cron, cursor_editor, pipe_execution — indicatesDesigned to adapt exfil strategy based on how it was triggered.
Zero-width characters in README (hidden prompt injection) medium README.md:401
README.md contains zero-width characters at line 401 — possible hidden text to steer AI readers.

Lab evidence

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