string-utils-assistant@1.0.0
Malicious code in string-utils-assistant (npm)
Analysis
A "simple string utility" package that, on install, starts a persistent remote-command channel hidden inside the library. The postinstall hook (`node postinstall.js`) spawns a detached, unref'd `node index.js` background process so the connection outlives the install. That script opens a raw TCP socket to 47[.]251[.]102[.]182:8057, announces the victim with `SYSTEM_TYPE:<os.platform()>\n`, then treats every newline-delimited message from the remote end as a command and executes it through child_process.exec (prefixing `chcp 65001 &&` on Windows), returning stdout/stderr over the same socket. Messages framed `FILE_START:<path>` … `FILE_END` are written verbatim to the attacker-chosen filesystem path using fs.createWriteStream, allowing arbitrary file delivery to the host. A second code path reports OS platform and CPU architecture when the local date matches 2024-11-30T10:00, and dropped connections are retried on a randomized 60–300 second timer. The advertised string helpers (toUpperCase, reverseString, trimString, …) are genuine and exported alongside the remote-command logic, so the package behaves as documented when imported. IOCs: 47[.]251[.]102[.]182:8057 (raw TCP command channel), files postinstall.js and index.js.
- analyzed by
- Leitwacht
- first seen
- Nov 23, 2026, 11:21 AM
- analyzed
- Nov 23, 2026, 11:22 AM
Related advisories
- calculatorsyippie@1.0.6
- calkyippie@1.0.0
- scanstudy-pointer-bat@1.0.0
- calcultimatetest@1.0.0
- envforge3@1.0.1
- envparse2@1.0.1
- envparse3@1.0.1
- rojo-rbx@1.4.3
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.