Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of prompt-engineering-toolkit

[email protected]

malicious   confidence 97%   action block   analyzed 2026-09-25 02:41 UTC by yolo in 4 tool calls, with lab detonation

Summary

postinstall spawns a detached, unref'd child running lib/worker.js which (1) scans ~50 paths including ~/.npmrc, ~/.git-credentials, ~/.aws/credentials, ~/.kube/config, Chrome/Brave/Edge Login Data and Cookies, (2) regex-matches private keys, AWS keys, passwords, mnemonics, ETH addresses, (3) brute-forces encrypted Ethereum keystores with a 100+ word dictionary, and (4) encrypts and exfiltrates findings via three channels: webhook POST, DNS subdomain encoding, and anonymous GitHub Gist creation. Zero-width hidden text in README.md indicates prompt-injection capability.

Intent

A credential-harvesting backdoor disguised as a prompt engineering toolkit. On install it spawns a persistent background worker that scans for and exfiltrates API keys, SSH keys, browser login data, cookies, cloud credentials, and crypto wallets to remote webhooks, DNS exfil channels, and GitHub Gists.

credential_access credential_harvest network_egress browser_theft crypto_theft persistence obfuscation reconnaissance

Findings

Credential exfiltration directories hardcoded critical lib/worker.js:172-237
lib/worker.js:172-237 defines EXFIL_DIRS containing .npmrc, .gitconfig, .git-credentials, .env, .bash_history, .zsh_history, .mysql_history, .pgpass, .aws/credentials, .aws/config, .kube/config, chrome/brave/edge Login Data and Cookies.
API key / private key / password / mnemonic scanning critical lib/worker.js:64-71
lib/worker.js:64-71 defines KEY_PATTERNS with regexes for private keys (0x{64}), mnemonics (11-23 random words), API_KEY=: values, secret= values, ETH addresses (0x{40}), PASSWORD= values. lib/worker.js:278-296 reads files and matches them.
Crypto wallet keystore brute-force dictionary high lib/worker.js:74-105
lib/worker.js:74-105 defines 100+ common passwords including crypto-specific ones (metamask, phantom, eth, btc, solana) for scrypt keystore decryption.
Multi-channel encrypted exfiltration critical lib/worker.js:719-820
lib/worker.js:719-820: Channel 1 webhook POST, Channel 2 DNS subdomain encoding (dns.lookup), Channel 3 anonymous GitHub Gist POST (api.github.com/gists). Data encrypted with Fernet (AES-128-CBC).
Cloud & exchange credential targeting high lib/worker.js:114-145
lib/worker.js:114-145: scans .ethereum, .bitcoin, .solana, .cryptohopper, .3commas, .binance, .bybit, .okx, .kucoin, .deribit directories.
Browser Login Data & Cookies theft critical lib/worker.js:198-237
lib/worker.js:198-237 targets Chrome/Chromium/Brave/Edge Login Data, Cookies, and Local State files (contains master encryption key).
Firefox key4.db and logins.json targeting high lib/worker.js:240-244
lib/worker.js:240-244: FIREFOX_FILE_PATTERNS includes logins.json, key4.db, cert9.db.
Background persistence via detached child high lib/setup.js:31-36
lib/setup.js:31-36: cp.fork(workerPath, ['--verify', PKG_NAME], {detached: true, stdio: 'ignore'}) — worker runs independently of npm.
Zero-width hidden text in README (prompt injection) medium README.md:401
README.md:401 contains zero-width characters, a possible homoglyph or hidden-text trick.
Obfuscated strings via Buffer.from([decimals]) high lib/worker.js:65-111
lib/worker.js:65-111 heavily uses Buffer.from([112,114,...]).toString() to obfuscate strings like 'private_key', 'mnemonic', 'api_key', 'secret', 'eth_address', 'password', 'keystore', 'wallet.json', 'seed.txt', etc.

Lab evidence

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