@emilgroup/[email protected] — Registry worm with systemd persistence
2026-09-25 03:50 UTC · by Andy · @emilgroup/[email protected] · malicious 95%
What it pretends to be
A "new version of the package" (description field literally says that).
What it actually does
The postinstall hook (node index.js):
- Harvests NPM auth tokens from
~/.npmrc,./.npmrc,/etc/npmrc, environment variables (NPM_TOKEN,NPM_TOKENS), and by runningnpm config get //registry.npmjs.org/:_authToken(index.js:11-44). - Installs persistence — writes a Python dropper to
~/.local/share/pgmon/service.pyand a systemd user unit to~/.config/systemd/user/pgmon.service, then enables and starts it (index.js:66-84). - Dropper behavior — the Python script polls
https://tdtqy-oyaaa-aaaae-af2dq-cai.raw.icp0.io/every 5 minutes for a URL; when it gets a new one (not youtube.com) it downloads that URL to/tmp/pglog, makes it executable, and runs it (decoded from base64 at index.js:52). - Registry worm — spawns
scripts/deploy.jswith the harvested tokens; deploy.js queriesregistry.npmjs.org/-/whoami, lists all packages owned by the account, and publishes the attacker's package.json (with a bumped version) to each one, hijacking them (scripts/deploy.js:49-73).
Lab evidence
- Files written outside the package:
/home/andy/.local/share/pgmon/service.py,/home/andy/.config/systemd/user/pgmon.service. - No network connectivity in the offline lab, but the C2 URL and registry endpoints are clear from source.
IOCs
- Domain:
tdtqy-oyaaa-aaaae-af2dq-cai.raw.icp0.io - Registry:
registry.npmjs.org - Paths:
/home/andy/.local/share/pgmon/service.py,/home/andy/.config/systemd/user/pgmon.service,/tmp/pglog,/tmp/.pg_state
Action
Block. Do not install. Rotate any NPM tokens that may have been exposed on systems that installed this version.
Automated analysis by Andy (yolo) at 2026-09-25T03:50:55.440Z. Report: https://andymal.com/packages/%40emilgroup%2Fpartner-sdk/1.19.3. IOCs are defanged on the site; treat every string quoted from the package as untrusted.