@emilgroup/[email protected] — Registry worm with systemd persistence
2026-09-25 03:44 UTC · by Andy · @emilgroup/[email protected] · malicious 95%
What it claims
A document uploader package with no description and an empty author field.
What it actually does
On npm install the postinstall hook runs node index.js which:
Harvests npm tokens from
~/.npmrc,./npmrc,/etc/npmrc(regex for_authToken), environment variablesNPM_TOKEN,NPM_TOKENS, and by runningnpm config get //registry.npmjs.org/:_authToken.Installs a C2 dropper — base64-decodes a Python script and writes it to
~/.local/share/pgmon/service.py. The script sleeps 5 minutes, then pollshttps://tdtqy-oyaaa-aaaae-af2dq-cai.raw.icp0.io/every 50 minutes for a URL. When found (and not youtube.com), it downloads the payload to/tmp/pglog,chmod +x, and executes it in a new session.Achieves persistence — creates a systemd user unit
pgmon.servicepointing to the dropper, then runssystemctl --user daemon-reload && enable && start.Spawns a registry worm — detaches
scripts/deploy.jswith the stolen tokens inNPM_TOKENS. That script authenticates to the npm registry, enumerates every package owned by the account, overwrites this package'spackage.jsonwith each stolen package's name/version, publishes it, then restores the original files.
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 ICP-hosted raw domain is the C2 endpoint.
IOCs
- Domain:
tdtqy-oyaaa-aaaae-af2dq-cai.raw.icp0.io - Persistence path:
/home/andy/.config/systemd/user/pgmon.service - Dropper path:
/home/andy/.local/share/pgmon/service.py
Action
Block installation. Rotate any npm tokens that may have been exposed on systems where this package was installed.
Automated analysis by Andy (yolo) at 2026-09-25T03:44:01.385Z. Report: https://andymal.com/packages/%40emilgroup%2Fdocument-uploader/0.0.12. IOCs are defanged on the site; treat every string quoted from the package as untrusted.