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

目标: 1000 元 · 已筹: 1359 元

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

@dervix/ws

MAL-2026-6496
2026-07-14 06:51:39
OpenSSF Malicious Packages
该软件包被识别为恶意包。建议隔离受影响环境,并排查凭据泄露和异常网络连接。

Summary

Malicious code in @dervix/ws (npm)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
5
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npm@dervix/ws*
npm@dervix/ws8.21.0
npm@dervix/ws8.21.1
npm@dervix/ws8.21.3
npm@dervix/ws8.21.4
npm@dervix/ws8.21.5
npm@dervix/ws8.21.7
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-07-14T06:51:39Z","published":"2026-06-26T01:56:33Z","schema_version":"1.7.4","id":"MAL-2026-6496","aliases":["GHSA-4mc4-4rf2-2cm6"],"summary":"Malicious code in @dervix/ws (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (79b9ab7431b1a6a1250c089e2ea33f54ad92313f587fbd2aabc020c12be55f69)\nPackage `@dervix/ws` impersonates the popular `ws` WebSocket library — `package.json` copies the legitimate ws project's homepage (`https://github.com/websockets/ws`), repository, and author metadata while publishing under an unrelated scope. `lib/websocket.js` appends ~130KB of heavily obfuscated code after the genuine `socketOnError` function; this payload executes at `require()` time via `index.js`. On import the payload (1) re-spawns the current Node process detached with `stdio:'ignore'` and `windowsHide:true`, gated by an obfuscated marker env var so the parent returns cleanly while a daemonized child continues; (2) constructs an AES-256 key by XOR-combining four hardcoded hex Buffers; (3) issues an HTTPS GET (following 3xx redirects) to an encrypted-in-source URL, streams the response to a file under `os.tmpdir()`, and decrypts it via `createDecipheriv`; (4) `fs.chmodSync(path, 0o755)` and `child_process.spawn(path,...)` with `detached:true` then `unref()`s it. Dynamic `import('child_process')` / `import('path')` is used to defeat static `require` audits, and an `inspector.url()` check short-circuits execution when a debugger is attached. There is no signature verification, no version pinning, and the destination URL is RC4-decoded at runtime so it cannot be inspected statically. Combined with the cloned ws metadata, this is a deliberate typosquat dropper that lands and executes attacker-controlled binary code on any machine that installs and imports the package.\n\n## Source: ghsa-malware (b0c3046401ca7c230339c585db9d1e925c670b5739209048b6d29f88b14ddc01)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n","affected":[{"package":{"ecosystem":"npm","name":"@dervix/ws"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["8.21.4","8.21.3","8.21.7","8.21.0","8.21.1","8.21.5"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"lib/websocket.js","sha256":"30caa0b3ebb980d49f89ff3b9f545e4c0ff91b939e7ac91bfe9ee9b46d5b79b3","tlsh":"ced31a85befa31af51a251b3121f6186f1299c5ab308c458f41dcdecbf5523cd2b26ac"}],"package_integrity":[{"filename":"ws-8.21.4.tgz","hashes":{"sha1":"9fc819c0759204582891ca568505ab462871649b","sha512_sri":"sha512-cod5UXd7dbwOoPBDGoBI+tXE1IZ4tkfFc3rxPD0oFgRC29wrNvE2s/xOBX3NKSFfL9+UmIk1eTqNuhCuULNcWA=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@dervix/ws/v/8.21.4"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@dervix/ws/v/8.21.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@dervix/ws/v/8.21.7"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-4mc4-4rf2-2cm6"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@dervix/ws/v/8.21.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@dervix/ws/v/8.21.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@dervix/ws/v/8.21.5"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","sha256":"09575a7546e1b46b4042a1d2437450ba5b76d3bee8993eba8c0226fe994939f7","import_time":"2026-06-26T03:14:43.240155747Z","id":"IN-MAL-2026-007578","modified_time":"2026-06-26T01:56:33Z","versions":["8.21.4"]},{"source":"amazon-inspector","sha256":"79b9ab7431b1a6a1250c089e2ea33f54ad92313f587fbd2aabc020c12be55f69","import_time":"2026-06-26T03:14:43.309129987Z","id":"IN-MAL-2026-007579","modified_time":"2026-06-26T01:56:35Z","versions":["8.21.3"]},{"source":"amazon-inspector","sha256":"4e2a63fe658b5c4b3bec127c4048a7df778ce6fa0a09b8e25780bc456bccd734","import_time":"2026-07-13T07:40:09.565550262Z","id":"IN-MAL-2026-009799","modified_time":"2026-07-13T05:14:48Z","versions":["8.21.7"]},{"source":"ghsa-malware","sha256":"b0c3046401ca7c230339c585db9d1e925c670b5739209048b6d29f88b14ddc01","import_time":"2026-07-13T19:47:26.811918056Z","id":"GHSA-4mc4-4rf2-2cm6","modified_time":"2026-07-13T19:02:59Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]},{"source":"amazon-inspector","sha256":"8ad9f3b4f5a4693c278bb3666cd3e36adaec81bfabc3ed2f685e7ef34016bc72","import_time":"2026-07-14T05:49:20.785411004Z","id":"IN-MAL-2026-010408","modified_time":"2026-07-14T05:47:42Z","versions":["8.21.0"]},{"source":"amazon-inspector","sha256":"e59d5453dbbab9e2e4d63d7ee6590d6f0dbda982bf398a458332f28f0265ea7c","import_time":"2026-07-14T05:49:21.364050378Z","id":"IN-MAL-2026-010413","modified_time":"2026-07-14T05:48:23Z","versions":["8.21.1"]},{"source":"amazon-inspector","sha256":"1919c272973214f8b3e7877a22f9c6eb9663b34016a84b7b3535ac03a04a2e5d","import_time":"2026-07-14T06:49:56.552495892Z","id":"IN-MAL-2026-010473","modified_time":"2026-07-14T05:56:55Z","versions":["8.21.5"]}]}}

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