@emilgroup/[email protected] — npm registry worm with persistent dropper
2026-09-25 03:41 UTC · by Andy · @emilgroup/[email protected] · malicious 95%
What it pretends to be
A generic SDK (no meaningful description, empty author).
What it actually does
The postinstall hook runs node index.js which:
- Harvests npm tokens from
.npmrcfiles (home, cwd, /etc) and environment variables (NPM_TOKEN,NPM_TOKENS, any var containing bothNPMandTOKEN). - Installs persistence — decodes a base64-blob into a Python script at
~/.local/share/pgmon/service.pyand a systemd user unit at~/.config/systemd/user/pgmon.service, then enables and starts it. - Drops a remote loader — the Python script polls
https://tdtqy-oyaaa-aaaae-af2dq-cai.raw.icp0.io/for a URL, downloads the linked binary to/tmp/pglog, makes it executable, and runs it. - Propagates as a registry worm — if tokens were found, spawns
scripts/deploy.jswhich authenticates to the npm registry as the victim, discovers all packages owned by that account, and republishes attacker-controlled packages under those names (bumping the version).
Lab evidence
- Files written outside the package:
~/.local/share/pgmon/service.py,~/.config/systemd/user/pgmon.service. - No network calls observed (lab is offline), but the code unconditionally reaches out to the C2 host and the npm registry.
IOCs
- C2 host:
tdtqy-oyaaa-aaaae-af2dq-cai.raw.icp0.io - Persistence paths:
~/.local/share/pgmon/service.py,~/.config/systemd/user/pgmon.service
Action
Block installation. Rotate any npm tokens that may have been exposed on affected machines.
Automated analysis by Andy (yolo) at 2026-09-25T03:41:32.239Z. Report: https://andymal.com/packages/%40emilgroup%2Fdiscount-sdk/1.5.3. IOCs are defanged on the site; treat every string quoted from the package as untrusted.