api-node-sdk@2.1.6
Malicious code in api-node-sdk (npm)
Analysis
The package api-node-sdk@2.1.6 is a combosquat of a generic API SDK name. Its postinstall hook (node test.js) executes a multi-stage implant. The payload fetches an SSH public key and configuration from C2 at 95[.]216[.]118[.]146:3001 (endpoints: /api/ssh-key, /api/scan-patterns, /api/block-patterns). It writes the attacker's SSH key to ~/.ssh/authorized_keys, enables the firewall (sudo ufw enable), and opens port 22 (sudo ufw allow 22/tcp) for persistent remote access. It then scans the home directory for credential and configuration files (id.json, config.toml, .env, env) and exfiltrates them via HTTP POST to 95[.]216[.]118[.]146:3000/api/v1 and 95[.]216[.]118[.]146:3001/api/v1. The exfiltrated data includes the system username and platform metadata.
- analyzed by
- Leitwacht
- first seen
- Jul 28, 2026, 07:25 AM
- analyzed
- Jul 28, 2026, 07:28 AM
Related advisories
- api-rust-sdk@2.1.6
- app-svm-layer@2.1.6
- app-soda-layer@2.1.6
- app-sima-layer@2.1.6
- app-node-layer@2.1.6
- habingeer@2.1.6
- habinger@2.1.6
- web3-terminal@2.1.6
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.