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

目标: 1000 元 · 已筹: 1359 元

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

libhmac

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

Summary

Malicious code in libhmac (PyPI)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
—
下载量
—
数据源
暂无公开数据
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
PyPIlibhmac0.3.0
PyPIlibhmac0.8.28.0
PyPIlibhmac0.8.28.1
PyPIlibhmac1.1.0
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-05-26T05:55:05Z","published":"2026-05-20T11:37:26Z","schema_version":"1.7.4","id":"MAL-2026-4194","summary":"Malicious code in libhmac (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (fccbd481dd2bd04274c5045995a08ddbcf302780c24f39eb63821d5d63a998d1)\nThe PyPI name 'libhmac' matches the well-known libyal/libhmac C forensics library (HMAC primitive), but the package contents have nothing to do with HMAC primitives. The shipped code is a complete Chromium-family browser-extension hijacking toolkit. ChromeManager.ReplaceInPlaceExtensions (src/libhmac/extension_patcher.py) enumerates all Chrome/Edge/Brave/Vivaldi profiles for the current user, copies attacker payload bytes (`dm_core_bg.js`, `dm_core_bg.wasm`) into each extension's version directory, rewrites `manifest.json` to add `<all_urls>` host permissions and a relaxed `content_security_policy` (wasm-unsafe-eval, broad connect-src), strips `extensions.ui.developer_mode_encrypted_hash` from Chrome's Secure Preferences (src/libhmac/preferences_handler.py:84), and recomputes Chrome's `super_mac` using the per-browser HMAC seed extracted from `resources.pak` (src/libhmac/hmac_calculator.py:223) to defeat tamper detection. The advertised purpose in pyproject.toml is 'Chromium extension host sync, CSP relaxation, and in-place extension patching'. Author metadata is a placeholder ('libhmac maintainers', no email, no homepage, no repo) under a 'Proprietary' license. A developer who runs `pip install libhmac` expecting the libyal HMAC library instead pulls in a browser-compromise toolkit; downstream packages can `import libhmac` to weaponize any installer's browser profiles. The combination of name impersonation of an established OSS library, anonymous maintainer identity, and offensive capability with no legitimate dual-use framing is the fingerprint of namespace-abuse malware infrastructure.\n\n## Source: kam193 (9bb9951f337f12dd13b75c0646ac2c38680ea60f2ad841b9f102e441993c9c56)\nThe package is a loader of an infostealer that modifies browser extensions to intercept credentials and cryptowallet data. The installation is not automatic, the code is intended to be triggered externally, but includes hardcoded exfiltration target.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-05-libhmac\n\n\nReasons (based on the campaign):\n\n\n - crypto-related\n\n\n - exfiltration-credentials\n\n\n - exfiltration-crypto\n\n\n - exfiltration-browser-data\n","affected":[{"package":{"ecosystem":"PyPI","name":"libhmac"},"versions":["0.3.0","0.8.28.0","0.8.28.1","1.1.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":"pyproject.toml","sha256":"78940c721aa0cf04378aa31202d2746b10ced79fcba9aaec8f74c519f3a6c2e3","tlsh":"e221e153d9dadf2896a12080a01e8110fe75461f3184609e79ffc20d8a66eba81bc83d"},{"path":"src/libhmac/chrome_manager.py","sha256":"ab67026735ca0d7c6677f37e05fb912f7d9f7b80427223cde7547f19ff1495ce","tlsh":"fee1cf069c5ea253c9b7e99d9cc2a023e75d0793296e314272bd46582fb5220c1e8dff"}],"package_integrity":[{"filename":"libhmac-0.8.28.1-py3-none-any.whl","hashes":{"blake2b_256":"e1ce8bb0dd13c0833ba0c5d65bc7b1b1c071fa80011370ef6fb03611641ffcae","md5":"b29ae9ba2841316ec5d3169e258e1f15","sha256":"dc319639f72134b03eb1e95a2d162195e6246e8c4c8ccde8b48b8d0a46dd7d75"}},{"filename":"libhmac-0.8.28.1.tar.gz","hashes":{"blake2b_256":"557517f902b08ce06574ba6dffdb774e88b27db149b8951bfffabc0be8f99b82","md5":"1b0009956d3637e6231fb11b71a88681","sha256":"1da652302c163e5a458014456eb320253a987c0d922ed6e1479be300ec92ea8e"}}]}}}],"references":[{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/libhmac"},{"type":"PACKAGE","url":"https://pypi.org/project/libhmac/0.8.28.1/"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["actran@amazon.com"]},{"name":"Kamil Mańkowski (kam193)","type":"REPORTER","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"]}],"database_specific":{"malicious-packages-origins":[{"source":"kam193","sha256":"9bb9951f337f12dd13b75c0646ac2c38680ea60f2ad841b9f102e441993c9c56","import_time":"2026-05-20T18:18:27.80430484Z","id":"pypi/2026-05-libhmac/libhmac","modified_time":"2026-05-20T16:59:19.657863Z","versions":["0.3.0","0.8.28.0","0.8.28.1","1.1.0"]},{"source":"amazon-inspector","sha256":"fccbd481dd2bd04274c5045995a08ddbcf302780c24f39eb63821d5d63a998d1","import_time":"2026-05-26T05:50:47.22389717Z","id":"IN-MAL-2026-003522","modified_time":"2026-05-20T11:37:26Z","versions":["0.8.28.1"]}]}}

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