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

目标: 1000 元 · 已筹: 1359 元

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

karpatkey

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

Summary

Malicious code in karpatkey (PyPI)

凭据/密钥窃取文件/数据外传
AI 分析整理qwen3.6
基于上游报告生成,请以下方原始证据为准。
公开使用量数据
统计周期
—
下载量
—
数据源
暂无公开数据
下载量只代表仓库活动度,不等于已被入侵的安装数量。
受影响版本
EcosystemPackageVersion
PyPIkarpatkey2.1.1
恶意行为说明OpenSSF OSV
上游来源证据
展开原始 OSV JSON
{"modified":"2026-07-28T14:22:05Z","published":"2026-07-24T09:21:35Z","schema_version":"1.7.4","id":"MAL-2026-11047","summary":"Malicious code in karpatkey (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (b434ae7cf6afb9ce18a54757c03069983e404db695d959bd29aa628864b8349c)\nOn `import karpatkey`, the top-level `karpatkey/__init__.py` spawns a daemon background thread that walks the installer's home directory and collects SSH private keys (`~/.ssh/id_*`), AWS credentials (`~/.aws/credentials`), GCP credentials (`~/.config/gcloud/`), kubeconfig (`~/.kube/config`), Ethereum wallet keystores (`~/.ethereum/keystore/*`), GnuPG private keys (`~/.gnupg/private-keys-v1.d/*`), `.npmrc`/`.pypirc`/docker/git credentials, shell histories, `.env*` files under Desktop/Projects/repos/code/src/work, Kubernetes service-account tokens from `/var/run/secrets/kubernetes.io/serviceaccount`, and the full `os.environ`. The archive is zipped, base64-encoded and POSTed via plain HTTP to two hardcoded bare-IP destinations, 185.158.107.189:8877 and 151.247.22.13:8877, encoded as integer tuples in an `_ANALYTICS` list and reassembled at runtime by an `_fa` helper. The module `karpatkey/_compat.py` presents itself as a \"Runtime environment compatibility layer\" and stages the archive as `.compat_cache.zip`, a cover-story that does not match the observed behavior. The destinations are unrelated to the declared publisher domain `kpk.io`.\n\n## Source: kam193 (ea7a30728a3c4f46fee3153895404941b4363cb7086f5efe55e9ae9931913395)\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\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":{"ecosystem":"PyPI","name":"karpatkey"},"versions":["2.1.1"],"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":"karpatkey/_compat.py","sha256":"32beb863d627fd21d58524396e9bad7eec090cbc96a396791f2ad96d36b7e68f","tlsh":"1a716677e85d0c638353d61dd45b9070372a3f9f2542182e76cc6b980f5c8bc5276b99"}],"package_integrity":[{"filename":"karpatkey-2.1.1-py3-none-any.whl","hashes":{"blake2b_256":"3961a08ecc4d705de4bc63ceacca9819408249187a456172b59c567886fe536c","md5":"b5f2f1ae551a1f672abdf27f6da11f8f","sha256":"6c2458a1001830aab246c0104a4740c0aa1ddce00d039d5f15a7f5f82505247e"}},{"filename":"karpatkey-2.1.1.tar.gz","hashes":{"blake2b_256":"0b646722df81b8ba901367ccff7a5a812c6e54046a5e3f8d86794011655e54a8","md5":"569ea5a007b4f88ca1c5eccc8074ddf9","sha256":"1fcea1117e4d400395301d2499a252e402a3244dfab39c3b1d47142b754866c7"}}]}}}],"references":[{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/karpatkey"},{"type":"PACKAGE","url":"https://pypi.org/project/karpatkey/2.1.1/"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]},{"name":"Kamil Mańkowski (kam193)","type":"REPORTER","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"]}],"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":[{"source":"kam193","sha256":"ea7a30728a3c4f46fee3153895404941b4363cb7086f5efe55e9ae9931913395","import_time":"2026-07-24T10:20:25.477117413Z","id":"pypi/2026-07-roles-royce/karpatkey","modified_time":"2026-07-24T09:21:35.399632Z","versions":["2.1.1"]},{"source":"amazon-inspector","sha256":"b434ae7cf6afb9ce18a54757c03069983e404db695d959bd29aa628864b8349c","import_time":"2026-07-28T14:20:00.048984173Z","id":"IN-MAL-2026-010937","modified_time":"2026-07-28T13:39:00Z","versions":["2.1.1"]}]}}

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