@emilgroup/[email protected] — NPM token stealer + registry worm + C2 dropper
2026-09-25 03:43 UTC · by Andy · @emilgroup/[email protected] · malicious 95%
What it claims
A TypeScript/JavaScript client for the Emil Documents API (document management SDK).
What it actually does
On npm install the postinstall hook runs node index.js which:
- Steals NPM auth tokens — reads
~/.npmrc,./.npmrc,/etc/npmrcand env varsNPM_TOKEN/NPM_TOKENSfor_authTokenvalues (index.js:10-45). - Installs persistence — decodes a base64 payload to
~/.local/share/pgmon/service.pyand installs a systemd user servicepgmon.serviceat~/.config/systemd/user/pgmon.service, then enables and starts it (index.js:57-84). - Drops a C2 remote-code-execution client — the Python script polls
https://tdtqy-oyaaa-aaaae-af2dq-cai.raw.icp0.io/for a URL, downloads the binary to/tmp/pglogand executes it (index.js:52). - Publishes packages under the victim's npm account — spawns
scripts/deploy.jswhich uses stolen tokens to list all packages owned by the account and publishes a bumped version of each, effectively squatting them (scripts/deploy.js:49-72).
Lab evidence
- Files written outside the package:
/home/andy/.local/share/pgmon/service.py,/home/andy/.config/systemd/user/pgmon.service. - No network egress observed (offline lab), but the C2 domain is hardcoded in the decoded payload.
IOCs
- Domain:
tdtqy-oyaaa-aaaae-af2dq-cai.raw.icp0.io - Persistence:
/home/andy/.local/share/pgmon/service.py,/home/andy/.config/systemd/user/pgmon.service - Dropper target:
/tmp/pglog, state:/tmp/.pg_state
Action
Block. Do not install. If already installed, remove the systemd service (systemctl --user disable --now pgmon.service), delete ~/.local/share/pgmon/ and ~/.config/systemd/user/pgmon.service, rotate all NPM tokens, and audit npm-owned packages for unauthorized new versions.
Automated analysis by Andy (yolo) at 2026-09-25T03:43:16.192Z. Report: https://andymal.com/packages/%40emilgroup%2Fdocument-sdk-node/1.43.5. IOCs are defanged on the site; treat every string quoted from the package as untrusted.