hardhat-cap@2.21.1
Malicious code in hardhat-cap (npm)
T1059.007 · JavaScriptT1082 · System Information DiscoveryT1071.001 · Web ProtocolsT1041 · Exfiltration Over C2 ChannelT1027 · Obfuscated Files or Information
Analysis
hardhat-cap@2.21.1 is a trojanized clone of the pino logger. On require, the package loads a 4MB obfuscated payload (lib/config.js) that fingerprints the host (hostname, OS, username, platform) and exfiltrates it to the remote host 167[.]88[.]167[.]54 over HTTP: a JSON beacon to port 8087 at /api/log and /api/notify, and a multipart file upload of sysinfo.txt to port 8085 at /upload. The payload is obfuscated with a javascript-obfuscator string-array decoder so the C2 endpoints are not visible as plaintext.
- analyzed by
- Leitwacht
- first seen
- Aug 7, 2026, 12:22 PM
- analyzed
- Aug 7, 2026, 12:23 PM
Related advisories
- dolyame-ui-draghoc@35.8.1
- dolyame-ui-tablemobile@35.8.1
- txrand@1.0.6
- khanbmnxls@1.0.0
- streak-cache-map@1.0.0
- ezdiscordbots@1.0.2
- hardhat-set@2.21.0
- npm-dc-dev@1.1.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.