目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%
← 返回恶意软件包
npm active

hardhat-promised

MAL-2026-17662
2026-10-08 22:41:55
OpenSSF Malicious Packages
该软件包被识别为恶意包。建议隔离受影响环境,并排查凭据泄露和异常网络连接。

Summary

Malicious code in hardhat-promised (npm)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
0
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npmhardhat-promised2.21.0
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"schema_version":"1.7.4","id":"MAL-2026-17662","published":"2026-10-08T03:44:05Z","modified":"2026-10-08T22:41:54.561612269Z","summary":"Malicious code in hardhat-promised (npm)","details":"hardhat-promised@2.21.0 was published to npm on 2026-10-06 13:59 UTC by user ryan.danial915 (account's only package, created the same day). The name targets the Ethereum development tool hardhat. The package is a verbatim copy of the pino logger (README, docs, lib/*.js, SECURITY.md; the README badges still point to pino) with one file added that pino does not contain: lib/config.js, a single-line 4,373,384-byte obfuscated script (javascript-obfuscator style, hex-escaped string table, control-flow flattening). index.js requires ./lib/config on line 6, so the payload runs as soon as the package is required; the exported 'middleware' is a no-op. The dependency axios, which pino does not use, was added for the payload. package.json carries a fake author (Robert King <hello@jsonspack.com>) and no repository.\n\nBehavior observed when lib/config.js is loaded in an instrumented sandbox: (1) child_process.spawn of a detached node process (node --max-old-space-size=4096 --no-warnings -, script fed over stdin, stdout and stderr ignored, windowsHide: true, detached: true), i.e. a hidden background process that outlives the parent; (2) code construction through the Function constructor; (3) axios.post of JSON to http://167.88.172.33:8087/api/log containing os.hostname(), os.platform()/release()/type() and os.userInfo().username, with a fixed key ukey=301, a tag t=3, a timestamp and a SHA-256 'validation' header. The messages posted are 'Starting client', 'Spawning autoUploadScript', 'Spawning ldbScript', 'Spawning socketScript' and the matching 'Failed to spawn ...' errors, which name three stealer modules: automatic file upload, LevelDB (browser extension / wallet storage) reading, and a persistent socket connection to the operator.\n\nTrigger: on import (require). Type: trojanized copy of a popular library acting as an information-stealer loader with a hard-coded C2 at 167.88.172.33:8087.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (306eed59a2a4d15563101a3bfde19c1d6d5e0c9152cb0f3d0f421331e075ef4e)\nThe npm package hardhat-promised impersonates the pino logger: it ships pino's README (with pino shields.io badges linking to npmjs.com/package/pino), LICENSE, docs/, index.d.ts, and lib/ directory layout verbatim, while publishing under an unrelated name. index.js is a thin cover-story stub mirroring pino's public API and, at module top level, executes `require('./lib/config')`. lib/config.js is a 4,373,384-byte obfuscator.io-packed script (26,185-entry rotating string array, ~134k deobfuscation transforms, hex-escaped bootstrapper of the form `(function(a,z){const kb={...}})`) with no relation to the small constants module it replaces in real pino. Any consumer that requires this package executes the opaque 4.3MB blob on the installer's host at library load. The combination of unrelated-package impersonation, injected multi-megabyte obfuscated code where a trivial config module is advertised, and top-level execution on import is the trojanized-logger shape used to smuggle installer-harm code into dependency trees.\n","affected":[{"package":{"name":"hardhat-promised","ecosystem":"npm"},"versions":["2.21.0"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"lib/config.js","sha256":"7e4c6d76f1d845f752e37876a2d3f773996719f33c2d1c282e0a84b04444efeb","tlsh":"bf1694889194e02b96df1753bf052afdd13aa876d0cca747c2d4be9d29ac80be475cd0"},{"path":"README.md","sha256":"987942c23bee23c44a75d53b8a8fd119dbf7ba6de6a199c41f0e86e0fd97abfc","tlsh":"b341946783e46bba4b6301b1a1c275aaff5f931c3faa60a5d89cc1291319497813220a"}],"package_integrity":[{"filename":"hardhat-promised-2.21.0.tgz","hashes":{"sha1":"0c83fd872e723e8c68c7b6c893637859fb1a7907","sha512_sri":"sha512-KXS8g9ekQoJaw+aqbVVcFd/8spKYRQ219UBZ50mCdL5cMWascvC2I69R8T/DM19nYqF9cs+MTO672YS0RBnb7w=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/hardhat-promised/v/2.21.0"}],"database_specific":{"iocs":{"files":[{"digests":{"sha256":"7e4c6d76f1d845f752e37876a2d3f773996719f33c2d1c282e0a84b04444efeb"},"note":"obfuscated payload, required by index.js line 6; spawns detached node, posts host identity to 167.88.172.33:8087","paths":["lib/config.js"],"source":"PACKAGE_ARCHIVE"},{"digests":{"sha256":"4e6c4e61a7019ab0affe9c2d20e36701b330ec357be205930355bac1464f9316"},"note":"replaced pino entry point that loads lib/config.js","paths":["index.js"],"source":"PACKAGE_ARCHIVE"}],"ips":["167.88.172.33"],"urls":["http://167.88.172.33:8087/api/log"]},"malicious-packages-origins":[{"id":"IN-MAL-2026-021134","import_time":"2026-10-08T03:50:30.145091373Z","modified_time":"2026-10-08T03:44:05Z","sha256":"306eed59a2a4d15563101a3bfde19c1d6d5e0c9152cb0f3d0f421331e075ef4e","source":"amazon-inspector","versions":["2.21.0"]}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"Eunsoo Kim","contact":["https://github.com/eskim86"],"type":"FINDER"}]}

数据来源:OpenSSF Malicious Packages · Apache-2.0