node-as-api@2.1.6
Malicious code in node-as-api (npm)
Analysis
The package node-as-api@2.1.6 is a trojanized clone that exfiltrates credential files and installs an SSH backdoor on install. The postinstall hook runs index.js which: (1) scans the current working directory for credential files (id.json, config.toml, .env, env) and uploads them to hxxp://170[.]205[.]31[.]203:3000/api/v1; (2) fetches an SSH public key from hxxp://170[.]205[.]31[.]203:3001/api/ssh-key and appends it to ~/.ssh/authorized_keys, then enables UFW and opens port 22/tcp; (3) fetches file-scan patterns from hxxp://170[.]205[.]31[.]203:3001/api/scan-patterns and block-patterns from hxxp://170[.]205[.]31[.]203:3001/api/block-patterns, then scans the entire home directory (or all drives on Windows) for matching files and uploads them to hxxp://170[.]205[.]31[.]203:3001/api/v1. C2 hosts: 170[.]205[.]31[.]203:3000 and 170[.]205[.]31[.]203:3001.
- analyzed by
- Leitwacht
- first seen
- Jul 16, 2026, 05:40 AM
- analyzed
- Jul 16, 2026, 05:40 AM
Related advisories
- typescript-api-node@2.1.6
- api-rs-tuils@2.1.6
- polymarket-mcp-v2@2.1.6
- paperclip-host-utils@1.0.0
- vps-adapter-core@1.0.0
- ts-linting-builder@2.1.2
- ts-lint-builders-v2.1@2.1.0
- ts-ankle@1.1.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.