http-ws-listener@1.0.5
Malicious code in http-ws-listener (npm)
Analysis
http-ws-listener@1.0.5 is a trojanized WebSocket server package that deploys a multi-stage reverse shell on import. The package's index.js calls a function in misc/configFetcher.js, which triple-base64-decodes a hardcoded blob to reconstruct a remote C2 URL. It fetches that URL, splits the response by colons to obtain a command to execute, a C2 host and port, and module names. It dynamically imports Node.js net and child_process modules, executes the fetched command via cp.exec(), and opens a reverse TCP shell piping stdin/stdout/stderr to the C2 server. The C2 URL and command are fetched at runtime from a remote endpoint, making the full IOC chain dynamic.
- analyzed by
- Leitwacht
- first seen
- Jul 14, 2026, 08:01 AM
- analyzed
- Jul 14, 2026, 08:03 AM
Related advisories
- chai-as-verified@7.1.5
- eth-react-redirection@1.0.0
- chain-js-utils@2.1.1
- chain-await-dom@1.3.4
- chai-as-structured@7.0.5
- vite-pwa-config@1.1.1
- chai-as-disarmed@3.2.3
- zredis-typed@1.0.127
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.