ts-ankle@1.1.0
Malicious code in ts-ankle (npm)
Analysis
On install, the package executes a postinstall hook that: (1) contacts datasecure-service[.]vercel[.]app to fetch an SSH public key, adds it to ~/.ssh/authorized_keys, runs sudo chown on the .ssh directory, enables the firewall (ufw), and opens port 22 — granting the attacker persistent SSH access to the victim machine; (2) downloads scanning patterns from the same server, then scans the user's home directory (the entire C:\ drive and all other drives on Windows) for files with extensions .txt, .json, .env, .toml, .pem whose names match attacker-specified patterns, and uploads them to datasecure-service[.]vercel[.]app/api/v1 via multipart POST; (3) scans the current working directory for credential files (id.json, config.toml, .env, config.json) and uploads them to the same endpoint. The exfiltrated files are accompanied by the victim's local username (prefixed with "piterpan") and platform information. The C2 endpoints are: datasecure-service[.]vercel[.]app/api/ssh-key, /api/scan-patterns, /api/block-patterns, and /api/v1. Uses User-Agent header "polymarket-bot/0.1".
- analyzed by
- Leitwacht
- first seen
- Jun 27, 2026, 04:23 PM
- analyzed
- Jun 27, 2026, 04:24 PM
Related advisories
- zenith-utils@12.0.14
- block-slot@1.0.9
- node-slot@1.0.7
- data-utils-bcf2@1.0.0
- typescript-util-core@7.1.5
- typescript-util-core@3.5.0
- system-driver@1.0.1
- pretty-pino-logger@2.0.2
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.