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

目标: 1000 元 · 已筹: 1359 元

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

2fa-secretkey

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

Summary

Malicious code in 2fa-secretkey (npm)

凭据/密钥窃取安装阶段执行文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
last-week
下载量
785
数据源
npmjs.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
npm2fa-secretkey1.0.1
npm2fa-secretkey1.0.2
npm2fa-secretkey1.0.3
npm2fa-secretkey1.0.4
npm2fa-secretkey1.0.5
npm2fa-secretkey1.0.6
npm2fa-secretkey1.0.7
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-08-29T02:24:14Z","published":"2026-08-29T01:54:48Z","schema_version":"1.7.4","id":"MAL-2026-15547","summary":"Malicious code in 2fa-secretkey (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (8458c66987512aafeb111d45ec4c5639bc5bb43cd342777b9972e727719fe2b7)\nThe package advertises itself as a TOTP/2FA helper but its package.json postinstall spawns lib/core.js as a detached, stdio-ignored child of the node runtime, so the payload runs automatically on `npm install` and outlives npm exit. lib/core.js hides its strings behind an XOR 0x3F char-code decoder that reconstructs a hardcoded discord.com/api/webhooks/... URL, a DPAPI class name, powershell.exe, AppData paths, and cmd tokens at runtime. Before running, _env() exits when CI, CONTINUOUS_INTEGRATION, JEST_WORKER_ID or npm_config_global are set, when APPDATA/USERPROFILE/USERNAME/COMPUTERNAME are missing, when the lifecycle script name contains 'audit' or 'pack', or when %USERPROFILE%/Documents is absent, gating execution to real Windows user machines. On Windows the payload shells out to powershell.exe with an inline C# Add-Type that P/Invokes advapi32 CredEnumerate/CredRead to dump 'MCL|*|Xal.*' entries from Windows Credential Manager, extracts Microsoft refresh tokens and JWT access tokens, and trades them via login.live.com, XBL, XSTS and api.minecraftservices.com to mint Minecraft session IDs. It additionally reads the Chromium Local State encrypted_key, strips the DPAPI prefix, calls System.Security.Cryptography.ProtectedData::Unprotect through PowerShell to recover the browser master key, and AES-256-GCM-decrypts cookies and stored credentials. The collected material is POSTed as JSON and multipart uploads (tagged with the OS username and '@everyone') to the XOR-decoded Discord webhook endpoint, which is unrelated to the package's advertised TOTP purpose and is not caller-configurable.\n","affected":[{"package":{"ecosystem":"npm","name":"2fa-secretkey"},"versions":["1.0.3","1.0.5","1.0.7","1.0.4","1.0.2","1.0.6","1.0.1"],"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":"package.json","sha256":"c62c5af8862f5b7b131940f95526dd9a12ea642097e4bbfe30962fc77478006b","tlsh":"db11506cbe78ab3ba1d0c6e1e51b4103b623cc0201c0695c938b00dd8bed25b593fcac"}],"package_integrity":[{"filename":"2fa-secretkey-1.0.3.tgz","hashes":{"sha1":"6e0ee5cb4310ea66dd10bb099442c72b4d24f839","sha512_sri":"sha512-7JcisVxNZZj35FDgrpyCjeoYzmp7y/kJGcJvKceS8+ITKBGPOGumYEklXHPoeUV2Ls5gX5AxJjf6B5u4uyLE9Q=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/2fa-secretkey/v/1.0.3"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/2fa-secretkey/v/1.0.5"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/2fa-secretkey/v/1.0.7"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/2fa-secretkey/v/1.0.4"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/2fa-secretkey/v/1.0.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/2fa-secretkey/v/1.0.6"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/2fa-secretkey/v/1.0.1"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-019122","import_time":"2026-08-29T02:22:19.169749354Z","modified_time":"2026-08-29T01:55:32Z","sha256":"1afe6a146679af33f711ab93de8e6b71acb6377b50a5fcff765130d9ca13c34c","source":"amazon-inspector","versions":["1.0.3"]},{"id":"IN-MAL-2026-019120","import_time":"2026-08-29T02:22:18.907344305Z","modified_time":"2026-08-29T01:55:11Z","sha256":"c57ce2e0a40135d182f0ee06ff17c7bd8bfdaff1a3a3160d4c1358d6dfd16249","source":"amazon-inspector","versions":["1.0.5"]},{"id":"IN-MAL-2026-019117","import_time":"2026-08-29T02:22:18.518440585Z","modified_time":"2026-08-29T01:54:48Z","sha256":"d6fb9a8b0d5d1f044f585f6e8316d845141eef3fd7556e4264918975a2a9df2d","source":"amazon-inspector","versions":["1.0.7"]},{"id":"IN-MAL-2026-019118","import_time":"2026-08-29T02:22:18.621038314Z","modified_time":"2026-08-29T01:54:56Z","sha256":"d81366920353e4098b6c52b8d3ff03bd47b29479b94e53e52ae8e29919e4417d","source":"amazon-inspector","versions":["1.0.4"]},{"id":"IN-MAL-2026-019121","import_time":"2026-08-29T02:22:19.018359916Z","modified_time":"2026-08-29T01:55:21Z","sha256":"2da42e350014b4d2f6bc3b5f1fc86d31bcefb0106d8a8af8b466c3221c757f72","source":"amazon-inspector","versions":["1.0.2"]},{"id":"IN-MAL-2026-019119","import_time":"2026-08-29T02:22:18.718842159Z","modified_time":"2026-08-29T01:55:04Z","sha256":"8458c66987512aafeb111d45ec4c5639bc5bb43cd342777b9972e727719fe2b7","source":"amazon-inspector","versions":["1.0.6"]},{"id":"IN-MAL-2026-019123","import_time":"2026-08-29T02:22:19.271989305Z","modified_time":"2026-08-29T01:55:43Z","sha256":"b7a00fd5e8a87938baf406799f7b110eb81f9f70b113a69de5dfdd706723d99e","source":"amazon-inspector","versions":["1.0.1"]}]}}

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