Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of prompt-engineering-toolkit

[email protected]

malicious   confidence 95%   action block   analyzed 2026-09-25 02:38 UTC by yolo in 10 tool calls, with lab detonation

Summary

The postinstall hook spawns lib/worker.js as a detached background process that scans ~/. for credential files (AWS ~/.aws/credentials, SSH keys, Chrome Login Data, browser Cookies, .npmrc, .git-credentials, crypto keystores) and exfiltrates matches via encrypted HTTPS POST to webhook.site addresses and anonymous GitHub Gists. Remote C2 config is fetched from ddjidd564.github.io and can deliver arbitrary commands executed via execSync. Persistence is maintained through a local file queue (~/.local/share/.integrity_queue) and a config cache.

Intent

A credential stealer and data exfiltration toolkit disguised as a "prompt engineering toolkit." It scans the home directory for AWS keys, SSH keys, browser login data, crypto wallet files, and tokens, then encrypts and exfiltrates them via webhooks, DNS channels, and GitHub Gists, with remote command execution capability.

credential_access credential_harvest network_egress code_execution persistence reconnaissance obfuscation crypto_wallet agent_config_tamper browser_theft

Findings

Install hook spawns credential stealer worker critical lib/setup.js:31
lib/setup.js line 31-36 spawns lib/worker.js as a detached, unref'd child process with the full environment on npm postinstall.
Credential scanning targets critical lib/worker.js:172
EXFIL_DIRS lists ~/.aws/credentials, ~/.ssh/id_rsa, ~/.npmrc, ~/.git-credentials, Chrome Login Data/Cookies, browser Local State files, .kube/config, .pgpass, exchange config files, and more.
Multiple exfiltration channels critical lib/worker.js:720
Webhook POST to webhook.site addresses (lib/worker.js:724), DNS exfiltration via base32-encoded subdomains (lib/worker.js:769), anonymous GitHub Gist creation (lib/worker.js:797), and local file queue persistence (lib/worker.js:852).
Remote C2 config and command execution critical lib/worker.js:1253
Fetches config from https://ddjidd564.github.io/defi-security-best-practices/config.json which can contain a 'commands' array executed via execSync (lib/worker.js:1395-1399).
Priority target checking high lib/worker.js:1337
Fetches https://ddjidd564.github.io/defi-security-best-practices/priority_targets.json and enables ALL vectors for matching hosts (lib/worker.js:1337).
Crypto wallet keystore brute-force high lib/worker.js:74
COMMON_PASSWORDS array (lib/worker.js:74) contains 100+ common passwords including crypto-specific ones for brute-forcing Ethereum/Bitcoin keystore JSON files.
Fernet + ECDH hybrid encryption for C2 medium lib/crypto-ecdh.js:1
lib/crypto-ecdh.js provides ECDH-x25519 key agreement + Fernet (AES-128-CBC) encryption to secure exfiltrated data in transit.
Infection vector detection medium lib/worker.js:1159
detectInfectionVector() checks for npm postinstall, git hooks, MCP tool calls, cron, cursor editor, and curl|bash pipe execution to tailor behavior (lib/worker.js:1159).

Lab evidence

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