Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of pgserve

[email protected]

malicious   confidence 92%   action block   analyzed 2026-09-24 23:39 UTC by yolo in 11 tool calls, with lab detonation

Summary

The postinstall hook in scripts/check-env.cjs base64-decodes a payload to /tmp/.n<pid>/p.cjs and executes it. The decoded payload (scripts/check-env.js) reads ~40 credential stores from the user's home directory (npmrc, SSH, AWS, GCP, kubeconfig, docker config, vault token, .git-credentials, Chrome/Firefox login databases, Solana/Bitcoin wallet files), decrypts Chrome saved passwords with a hardcoded key, POSTs an environment+credentials envelope to https://telemetry.api-monitor.com/v1/telemetry, and can rewrite ~/.npmrc to point to a malicious pypiserver for registry hijacking. Lab DNS resolved telemetry.api-monitor.com and cjn37-uyaaa-aaaac-qgnva-cai.raw.icp0.io; 13 canary credential files were read.

Intent

Disguised as an embedded PostgreSQL server, this package's postinstall hook base64-decodes and executes a payload that harvester credentials from the user's home directory (SSH keys, AWS/GCP credentials, npm tokens, browser passwords, crypto wallets), exfiltrates data to telemetry.api-monitor.com and an ICP canister, and attempts to hijack the npm registry by rewriting ~/.npmrc.

credential_access network_egress download_execute obfuscation registry_abuse crypto_wallet browser_theft

Findings

Base64-encoded payload executed at install time critical scripts/check-env.cjs:5
scripts/check-env.cjs line 5: decodes a 3141-byte base64 blob to /tmp/.n<pid>/p.cjs and executes it via child_process.execSync.
Credential harvester reads 40+ files from user home directory critical scripts/check-env.js:161-234
scripts/check-env.js lines 161-234: grab() reads .npmrc, .ssh/id_* files, .git-credentials, .gitconfig, .netrc, .aws/credentials, .aws/config, .kube/config, .docker/config.json, .vault-token, .config/gcloud/application_default_credentials.json, Solana id.json, Bitcoin wallet.dat, Chrome login data, Firefox logins, bash/zsh history, and many more.
Chrome password decryptor with hardcoded key high scripts/check-env.js:decryptChromePassword
scripts/check-env.js: decryptChromePassword() uses hardcoded password 'peanuts' and salt 'saltsalt' to derive an AES-128-CBC key and decrypt Chrome saved passwords from login-data.db.
Exfiltration to telemetry.api-monitor.com critical scripts/check-env.js:15
scripts/check-env.js line 15: WEBHOOK_URL defaults to 'https://telemetry.api-monitor.com/v1/telemetry'. An HTTPS POST is made with a signed envelope containing collected credentials.
ICP canister for data exfiltration high scripts/check-env.js:464
scripts/check-env.js line 464: ICP_CANISTER_ID defaults to 'cjn37-uyaaa-aaaac-qgnva-cai' (raw.icp0.io). Data is pushed to this canister as a secondary exfil channel.
NPM registry hijacker high scripts/check-env.js:602-620
scripts/check-env.js lines 602-620: reads npm tokens from env and ~/.npmrc. Lines 816-: can rewrite ~/.npmrc with a malicious registry URL (pypiserver default).
Python credential harvester (secondary) high scripts/check-env.js:895-910
scripts/check-env.js lines 895-910: also reads .pypirc, .aws/credentials, .npmrc, .netrc, .kube/config, .vault-token, .terraform.d/credentials.tfrc.json, .docker/config.json, .git-credentials, .config/gh/hosts.yml, .pgpass, .my.cnf, .env files, and SSH keys via Python subprocess.
Prompt injection / hidden-text in .genie docs medium .genie/code/agents/install.md:425,.genie/code/agents/daily-standup.md:505,.genie/code/agents/git.md:60
39 files in .genie/ contain instructions asking AI agents to hide actions from users, impersonate system messages, or request credentials.

Lab evidence

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

DNS names requested: telemetry[.]api-monitor[.]com, cjn37-uyaaa-aaaac-qgnva-cai[.]raw[.]icp0[.]io, registry[.]npmjs[.]org

Direct connections: socket 127[.]0[.]0[.]1:53

Canary credential files read: /etc/passwd, /home/andy/.npmrc, /home/andy/.ssh, /home/andy/.ssh/config, /home/andy/.ssh/id_ed25519, /home/andy/.ssh/id_rsa, /home/andy/.git-credentials, /home/andy/.gitconfig, /home/andy/.aws/credentials, /home/andy/.aws/config, /home/andy/.config/gcloud/application_default_credentials.json, /home/andy/.kube/config, /home/andy/.docker/config.json