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

目标: 1000 元 · 已筹: 1359 元

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

roles-royce

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

Summary

Malicious code in roles-royce (PyPI)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
—
下载量
—
数据源
pypistats.org
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
PyPIroles-royce2.1.0
PyPIroles-royce2.1.1
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"schema_version":"1.7.4","id":"MAL-2026-10927","published":"2026-07-20T17:53:19Z","modified":"2026-08-04T21:35:15.520144684Z","summary":"Malicious code in roles-royce (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (318b93ddaafba751bab93b48efbef99f4eb45f143b019d7ff0f74735e434f378)\nroles_royce/__init__.py invokes a hidden `_check_env()` routine at import time that spawns a background thread harvesting installer secrets — SSH private keys under ~/.ssh/id_*, ~/.aws/credentials, ~/.config/gcloud/*.json, ~/.kube/config, ~/.npmrc, ~/.pypirc, ~/.docker/config.json, ~/.gitconfig, ~/.git-credentials, ~/.gnupg/private-keys-v1.d/*, ~/.ethereum/keystore/* wallet keystores, shell histories, and.env* files across Desktop/Projects/repos/code/src/work. The collected files are zipped, base64-encoded, and POSTed together with the full os.environ (truncated per variable) and the Kubernetes service-account token/namespace read from /var/run/secrets/kubernetes.io/serviceaccount/token to two hardcoded IPv4 endpoints (185.158.107.189:8877 and 151.247.22.13:8877). The destinations are stored as integer tuples in a variable named `_ANALYTICS` and reassembled at runtime by a helper `_fa`; the module is named `_compat.py`, the entry function is `check()`, and staging paths use `.compat-`/`.compat_cache.zip` naming to present the routine as a runtime compatibility check. A fallback exception path re-POSTs dict(os.environ) to the same endpoints. The package advertises itself as a Zodiac Roles transaction builder; the exfiltration behavior is unrelated to that purpose.\n\n## Source: kam193 (e4a24ac9bb2fd9263f35109916cd093952633bc0e04714f3986c8627f6a22291)\nDuring import, the package exfiltrates sensitive data (env variables, credential files, shell history, cryptocurrency wallet data etc.). It appears to be targeting users of kpk.io with names the same or similar to the legitimate packages they offer in different ecosystems.\n\nFirst discovered by Amazon Inspector.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-07-roles-royce\n\n\nReasons (based on the campaign):\n\n\n - dependency-confusion\n\n\n - targetted-attack\n\n\n - exfiltration-credentials\n\n\n - exfiltration-env-variables\n\n\n - exfiltration-cloud-tokens\n\n\n - exfiltration-ssh-keys\n\n\n - exfiltration-crypto\n","affected":[{"package":{"name":"roles-royce","ecosystem":"PyPI"},"versions":["2.1.1","2.1.0"],"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"}],"indicators":{"evidence_files":[{"path":"roles_royce/_compat.py","sha256":"934e01ab7daaeceb938c09a601a75aa2a8f894c9fb9db83ad0bbcf825d421afe","tlsh":"04715573e85d0c638353d61dd45b9070372a3f9f2946182e76cc6b584f5c8bc4276b99"}],"package_integrity":[{"filename":"roles_royce-2.1.1-py3-none-any.whl","hashes":{"blake2b_256":"f7225c4057131af46bef1565bc8a47a9b4c72d44831e1ae9c0638792e3c2ec19","md5":"470803b8e11aed2bb87fa9f2a458b5ed","sha256":"e9eade8b6dd695be0fadfaf0156f0210c4f0575c5203b285845a7f1c4f71e8a9"}},{"filename":"roles_royce-2.1.1.tar.gz","hashes":{"blake2b_256":"9a56ed76e107849ae6c614234de5987e32ed478ed6ec0c0ffce6e228c615451d","md5":"508e13371cf608d9f272d61f28410848","sha256":"ca52c2662dada52e12c254babe1c523775d5fa6c62fc82ed00785921a67e5654"}}]}}}],"references":[{"type":"PACKAGE","url":"https://pypi.org/project/roles-royce/2.1.1/"},{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/roles-royce"},{"type":"PACKAGE","url":"https://pypi.org/project/roles-royce/2.1.0/"}],"database_specific":{"iocs":{"ips":["185.158.107.189","151.247.22.13"],"urls":["http://185.158.107.189:8877","http://151.247.22.13:8877"]},"malicious-packages-origins":[{"id":"IN-MAL-2026-010798","import_time":"2026-07-20T18:14:25.069059055Z","modified_time":"2026-07-20T17:53:19Z","sha256":"318b93ddaafba751bab93b48efbef99f4eb45f143b019d7ff0f74735e434f378","source":"amazon-inspector","versions":["2.1.1"]},{"id":"pypi/2026-07-roles-royce/roles-royce","import_time":"2026-07-24T10:20:25.581888579Z","modified_time":"2026-07-24T09:18:07.568027Z","sha256":"e4a24ac9bb2fd9263f35109916cd093952633bc0e04714f3986c8627f6a22291","source":"kam193","versions":["2.1.0","2.1.1"]},{"id":"IN-MAL-2026-011043","import_time":"2026-08-04T21:33:14.855794533Z","modified_time":"2026-08-04T21:24:13Z","sha256":"4de67ca22fa0696133924c12b6ab51d0c609dded7ad99176331e4efc05ddd09a","source":"amazon-inspector","versions":["2.1.0"]}]},"credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"Kamil Mańkowski (kam193)","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"],"type":"REPORTER"}]}

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