web3-terminal@2.1.6
Malicious code in web3-terminal (npm)
Analysis
The postinstall hook (node test.js) executes a credential harvester and SSH backdoor. The code scans the working directory for id.json, config.toml, and .env files and uploads them to hxxp://170[.]205[.]31[.]203:3000/api/v1. It then fetches an SSH public key from hxxp://170[.]205[.]31[.]203:3001/api/ssh-key, appends it to ~/.ssh/authorized_keys, enables the firewall and opens port 22 for remote access. It also fetches file-scanning patterns from the same C2 server, scans the home directory (or all drives on Windows) for matching files, and uploads them to hxxp://170[.]205[.]31[.]203:3001/api/v1. The package name (web3-terminal) is unrelated to its description (a copy of the ts-api documentation), indicating combosquatting.
- analyzed by
- Leitwacht
- first seen
- Jul 16, 2026, 08:36 PM
- analyzed
- Jul 16, 2026, 08:43 PM
Related advisories
- node-as-api@2.1.6
- 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
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.