MAL-2026-13757Malicious code in telebot-pro (PyPI)
| 版本 | 状态 | 大小 | SHA-256 | 获取方式 |
|---|---|---|---|---|
2.3.7 | unavailable | — | — | — |
2.3.8 | unavailable | — | — | — |
| Ecosystem | Package | Version |
|---|---|---|
| PyPI | telebot-pro | 2.3.7 |
| PyPI | telebot-pro | 2.3.8 |
{"schema_version":"1.7.4","id":"MAL-2026-13757","published":"2026-08-11T19:26:37Z","modified":"2026-08-12T12:26:06.233084845Z","summary":"Malicious code in telebot-pro (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (b0e8fd9df00738115f53aef8944ede8d1f3d2daf360c2d227b54204ee62e8f89)\nOn instantiation of TeleBot(), the package spawns a background thread that copies the Telegram Desktop tdata directory from %APPDATA%\\Telegram Desktop\\tdata and decrypts the local key via win32crypt.CryptUnprotectData, base64-encoding the result. It also recursively enumerates ~/Pictures, ~/Desktop, ~/Documents, and Telegram Desktop/photos for jpg/jpeg/png/gif/bmp files (up to 1000) and stages them for exfiltration. Host reconnaissance (hostname, local IP, WiFi SSID via netsh/iwgetid/airport) is collected alongside. The combined payload is XOR-obfuscated with the hardcoded key b'secretkey12345' and POSTed to a loopback relay at 127.0.0.1:48765/submit, which forwards to https://api.telegram.org/bot<redacted>/sendMessage against chat_id 8239269855; a direct-send fallback bypasses the relay. The tarball also starts an HTTPServer on 127.0.0.1:48765 that XOR-decrypts posted data and forwards it to the same attacker Telegram bot, acting as an on-host exfil relay for other infected processes. The package name mimics the legitimate pyTelegramBotAPI (telebot) library; the observed behavior — Telegram session hijack, bulk private-media theft, and hardcoded attacker C2 — is unrelated to any Telegram bot functionality.\n\n## Source: kam193 (610b15fa9ed3d59133ac59b1104d43337faddd2ee77eaf21fd238bea6ac4f540)\nWhen using the provided bot class, the code starts a hidden exfiltration thread that collects Telegram session files, pictures and information about the machine, like connected WiFi networks.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-08-telebot-pro\n\n\nReasons (based on the campaign):\n\n\n - uses-telegram-bot\n\n\n - action-hidden-in-lib-usage\n\n\n - files-exfiltration\n\n\n - target:telegram\n","affected":[{"package":{"name":"telebot-pro","ecosystem":"PyPI"},"versions":["2.3.7","2.3.8"],"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":"telebot_pro/collector/telegram_stealer.py","sha256":"23e331ae29970a0acb5bb900ce70ed6452ad265a6055e07b53f2c0c7ef92d8c3","tlsh":"0a01c6e28d56201493f3eb5ec031cd95c8186aab9a0a9112f89c8f704fb4cb16aa83d5"},{"path":"telebot_pro/collector/media_scanner.py","sha256":"6d28b0205ebf2b4f1eb2844b857a1acde97127290675d4857f68ff2d4d178db0","tlsh":"ce1199ce9d22102480b6d39ee91280c5ca5d8fe7ee221909b7ec1bd18f79cb493a416d"},{"path":"telebot_pro/collector/__init__.py","sha256":"09e85d4fdf2b81b7f012563b3605fa301311b50c8bd5e8502d1565c7844e57ee","tlsh":"d2716741ddba292043779859a033f597e35963136a355923b9bcd7051fb472082f0ebd"},{"path":"telebot_pro/collector/crypto.py","sha256":"695854e827fc2e5c590a37de354bedf224fb617b1cc0811da36d52c28bbf411d","tlsh":"61e02b91eeb2ead5c7a06027b596c621b048f4926100b30d7e00c7996b65f3f9822484"}],"package_integrity":[{"filename":"telebot_pro-2.3.7-py3-none-any.whl","hashes":{"blake2b_256":"06bcd519574416c1bc6d7d19028d8ac0645d7f5c8a7ea7f63c6048ecf09bdc46","md5":"ebd275e9e2a5fe53252e0d9b89447fe5","sha256":"963793c841c49a6c5f32040d85bef1393a009ce8ef961bdcf1073bceed0e2268"}},{"filename":"telebot_pro-2.3.7.tar.gz","hashes":{"blake2b_256":"4e1aefb9739b805f561d4ec9dd2166c807f807b2c05a410c0c646c5455256a67","md5":"743b6678921601c41f723985cccf3c18","sha256":"417b5449fdea57b50a673a90847b13136ca69b1652260576ac8ed93b7d88ef00"}}]}}}],"references":[{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/telebot-pro"},{"type":"PACKAGE","url":"https://pypi.org/project/telebot-pro/2.3.7/"},{"type":"PACKAGE","url":"https://pypi.org/project/telebot-pro/2.3.8/"}],"database_specific":{"malicious-packages-origins":[{"id":"pypi/2026-08-telebot-pro/telebot-pro","import_time":"2026-08-11T19:53:29.543414238Z","modified_time":"2026-08-11T19:26:38.020395Z","sha256":"610b15fa9ed3d59133ac59b1104d43337faddd2ee77eaf21fd238bea6ac4f540","source":"kam193","versions":["2.3.7","2.3.8"]},{"id":"IN-MAL-2026-017425","import_time":"2026-08-12T12:24:12.399551641Z","modified_time":"2026-08-12T12:19:45Z","sha256":"9736b3e88767393de7d00ce781c735590ad09b383e6224766e74ec3614a9c27d","source":"amazon-inspector","versions":["2.3.7"]},{"id":"IN-MAL-2026-017426","import_time":"2026-08-12T12:24:12.506643147Z","modified_time":"2026-08-12T12:19:56Z","sha256":"b0e8fd9df00738115f53aef8944ede8d1f3d2daf360c2d227b54204ee62e8f89","source":"amazon-inspector","versions":["2.3.8"]}]},"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