Socket detected malicious republished versions of node-ipc that steal developer secrets, fingerprint hosts, and exfiltrate data through DNS TXT queries. The incident affects node-ipc 9.1.6, 9.2.3, and 12.0.1, with historical malicious releases 10.1.1, 10.1.2, 11.0.0, and 11.1.0 tied to the 2022 compromise. #node-ipc #TekDefense #Permiso
Keypoints
- Socket classified seven reviewed node-ipc versions as malicious and recommends blocking them.
- The newly malicious versions are node-ipc 9.1.6, 9.2.3, and 12.0.1, detected within about three minutes of publication.
- The payload fingerprints the host, reads local files and environment variables, compresses the collected data, and exfiltrates it via DNS TXT queries.
- Historical malicious versions 10.1.1 and 10.1.2 were destructive and geo-targeted Russia and Belarus, while 11.0.0 and 11.1.0 used peacenotwar.
- The malicious code is embedded in node-ipc.cjs, not the ESM wrapper, so CommonJS consumers are the primary exposure path.
- The likely compromise vector is takeover of a dormant maintainer account through an expired email domain, as identified by Ian Ahl.
- Collected data includes cloud, SSH, Kubernetes, npm, Git, Terraform, browser-related, and other developer secrets, packaged into a temporary gzip archive before exfiltration.
MITRE Techniques
- [T1082 ] System Information Discovery – The payload fingerprints the host using OS APIs and uname output (‘fingerprint the host environment’ and ‘runs uname -a’).
- [T1083 ] File and Directory Discovery – It enumerates and reads local files across many secret locations (‘enumerate and read local files’).
- [T1016 ] System Network Configuration Discovery – It collects network-relevant host data including hostname and OS context (‘os.hostname()’ and ‘builds a host fingerprint’).
- [T1005 ] Data from Local System – It harvests files such as SSH keys, kube configs, npm tokens, and environment files (‘SSH keys’, ‘Kubernetes’, ‘npm’, and ‘.env’).
- [T1057 ] Process Discovery – It collects process environment data and shell history that can reveal active tooling and secrets (‘sorted process.env entries’).
- [T1027 ] Obfuscated Files or Information – The malware is embedded as an obfuscated IIFE in the CommonJS bundle (‘single obfuscated IIFE’).
- [T1041 ] Exfiltration Over C2 Channel – Stolen data is exfiltrated through DNS TXT queries (‘attempt exfiltration through a network endpoint selected via DNS/address logic’ and ‘uses DNS TXT queries’).
- [T1132 ] Data Encoding – The archive is transformed with gzip, base64, XOR, and character substitution before transport (‘gzip archive to base64 text’ and ‘substitute characters’).
- [T1560.001 ] Archive Collected Data: Archive via Utility – It builds a tar.gz archive of collected files before exfiltration (‘builds a POSIX ustar archive in memory’).
- [T1055 ] Process Injection – Not observed in the article; no evidence of injection was described.
- [T1105 ] Ingress Tool Transfer – Not observed in the article; no download-and-execute stage was described.
- [T1106 ] Native API – The payload uses Node.js child_process, fs, path, os, and dns APIs to run its logic (‘child_process.fork’, ‘resolveTxt()’, and filesystem operations).
Indicators of Compromise
- [File hashes ] malicious package artifacts and payload hash – node-ipc.cjs SHA-256: 96097e0612d9575cb133021017fb1a5c68a03b60f9f3d24ebdc0e628d9034144, node-ipc-9.1.6.tgz SHA-256: 449e4265979b5fdb2d3446c021af437e815debd66de7da2fe54f1ad93cbcc75e, and 2 more hashes
- [Domain names ] DNS bootstrap and exfiltration infrastructure – sh.azurestaticprovider.net:443, bt.node.js
- [IP addresses ] bootstrap resolver target used during DNS setup – 37.16.75.69, and the article also notes use of 1.1.1.1 and 8.8.8.8 for resolution attempts
- [File names ] archive contents and forensic artifacts – uname.txt, envs.txt, etc/hosts, and fixtures/_paths.txt
- [File paths ] temporary archive location on disk – /nt-/.tar.gz
- [Environment variables ] runtime indicator and child execution flag – __ntw=1
- [Exported properties ] module activation path – __ntRun
- [DNS query patterns ] exfiltration labels and prefixes – xh.*, xd.*, xf.* under bt.node.js
Read more: https://socket.dev/blog/node-ipc-package-compromised