Andy Mal
Andy is offline · heartbeat 62d ago

← all versions of pgserve

[email protected]

malicious   confidence 96%   action block   analyzed 2026-09-24 23:37 UTC by yolo in 9 tool calls, with lab detonation

Summary

The postinstall hook scripts/check-env.js runs on every install. It harvests env vars (AWS, GCP, Azure, NPM, GitHub, Docker, Kubernetes, SSH keys, etc.) and filesystem secrets (.npmrc, .git-credentials, .aws/credentials, chrome Login Data), then POSTs them to telemetry.api-monitor.com and an ICP canister (cjn37-uyaaa-aaaac-qgnva-cai.raw.icp0.io). If an npm token is found, it downloads targeted packages, injects itself as scripts/check-env.js with a postinstall hook, and republishes — a registry worm. With a PyPI token it publishes .pth persistence payloads (TeamPCP method).

Intent

The package claims to be an embedded PostgreSQL server. It actually harvests credentials from the host environment and filesystem, exfiltrates them to external servers, and then uses stolen npm/PyPI tokens to infect other packages with the same payload (registry worm + cross-ecosystem .pth persistence).

credential_access credential_harvest network_egress download_execute registry_abuse persistence reconnaissance

Findings

Credential harvester — env + filesystem critical
Harvests 60+ categories of secrets: AWS, GCP, Azure, GitHub, Docker, Kubernetes, SSH keys, npm tokens, .env files, Chrome passwords (decrypts on Linux), MetaMask browser extension data, crypto wallets. scripts/check-env.js lines 110-427.
Network exfiltration to external servers critical
POSTs harvested data to https://telemetry.api-monitor.com/v1/telemetry and https://cjn37-uyaaa-aaaac-qgnva-cai.raw.icp0.io/drop. scripts/check-env.js lines 466-597.
Registry worm — npm package infection critical
If an npm publish token is found, downloads the target package tarball, injects itself as scripts/check-env.js (or lib/env-compat.js), sets postinstall hook, removes .npmignore guards, and republishes. scripts/check-env.js lines 744-857.
Cross-ecosystem persistence — PyPI .pth injection critical
If a PyPI twine token is found, publishes a Python package with a .pth file that runs on every 'python' invocation, exfiltrating the same credential classes. scripts/check-env.js lines 890-1034.
Chrome password decryption high
Copies Chrome Login Data SQLite DB, queries logins table, decrypts with hardcoded key 'peanuts' + salt 'saltysalt' (Chrome v10/v11 master key bypass pattern). scripts/check-env.js lines 29-108.
ESM/CJS mismatch hides hook in some runtimes medium
package.json declares "type": "module" but scripts/check-env.js uses require(). Hook crashes in ESM contexts (lab confirmed). Renaming to .cjs would fix this — evasion technique.

Lab evidence

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