{"id":"MAL-2026-13732","summary":"Malicious code in joule-btp-extension (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (91439e7a69d936aa8a65b16561f48e9d9abab26fc8e3af4087da8d367cfd2210)\nOn pip install, setup.py runs a collect_and_exfiltrate() routine that reads /private/etc/passwd, /private/etc/hosts, and /private/etc/sudoers; captures selected environment variables (HOME, USER, LOGNAME, VIRTUAL_ENV, PATH, PIP_CACHE_DIR, npm_config_prefix, GIT_EDITOR); recursively globs the installer's $HOME and current working directory and reads up to 4096 bytes of each file; and additionally invokes os.system(\"cat /private/etc/passwd\"). The collected data is JSON-serialized and POSTed via urllib to a hardcoded ATTACKER_URL (currently the placeholder http://127.0.0.1:4445/collect, with an author comment 'replace before deploying') using a spoofed 'User-Agent: pip/23.0' header to blend with pip traffic, and all exceptions are silently swallowed. setup.py also writes a marker file '.joule-btp-extension-was-here' into $VIRTUAL_ENV/bin, demonstrating write access to the installer's virtualenv bin directory for persistence. The package's own docstring declares it a proof-of-concept sandbox-escape supply-chain attack targeting SAP Joule Desktop on macOS; the PoC framing does not change what the code does on install: it harvests installer files and identity data and beacons them off-host.\n\n## Source: kam193 (21a7a58b1f32893cafb7cd9a1b452c5e9138b8fa89c43ebef1b3722205f60596)\nDuring installation, the code exfiltrates basic information and exfiltrates more information to a localhost service as well as starts a reverse shell there. It seems to be an internal test that was uploaded to a public repository.\n\n\n---\n\nCategory: PROBABLY_PENTEST - Packages looking like typical pentest packages, but also anything that looks like testing, exploring pre-prepared kits, research & co, with clearly low-harm possibilities.\n\n\nCampaign: 2026-08-joule-btp-extension\n\n\nReasons (based on the campaign):\n\n\n - The package contains code to create a reverse shell, allowing an attacker to execute any commands on the victim's machine.\n\n\n - The package contains code to exfiltrate basic data from the system, like IP or username. It has a limited risk.\n\n## Source: ossf-package-analysis (65193272cd9bd3b918d955bb215650b6b89b171e458b3385819f989bc1128049)\nThe OpenSSF Package Analysis project identified 'joule-btp-extension' @ 0.1.6 (pypi) as malicious.\n\nIt is considered malicious because:\n\n- The package communicates with a domain associated with malicious activity.\n","modified":"2026-08-11T20:41:39.927042202Z","published":"2026-08-11T11:31:05Z","database_specific":{"iocs":{"urls":["https://42b1-2a02-2ad0-103-2841-51cc-a5b3-6bc2-68fe.ngrok-free.app/asd"]},"malicious-packages-origins":[{"modified_time":"2026-08-11T11:31:05Z","sha256":"65193272cd9bd3b918d955bb215650b6b89b171e458b3385819f989bc1128049","source":"ossf-package-analysis","versions":["0.1.6"],"import_time":"2026-08-11T11:49:10.274193773Z"},{"modified_time":"2026-08-11T12:01:52.311156Z","sha256":"21a7a58b1f32893cafb7cd9a1b452c5e9138b8fa89c43ebef1b3722205f60596","source":"kam193","versions":["0.1.0","0.1.1","0.1.3","0.1.4","0.1.6"],"id":"pypi/2026-08-joule-btp-extension/joule-btp-extension","import_time":"2026-08-11T12:23:13.519846779Z"},{"modified_time":"2026-08-11T15:15:59Z","sha256":"c4114daaef1171677fa1042ab30ea5104722c46e0fd9b7c71260b2dbeae61b8e","source":"amazon-inspector","versions":["0.1.0"],"id":"IN-MAL-2026-017357","import_time":"2026-08-11T15:26:48.095927738Z"},{"import_time":"2026-08-11T15:26:48.194385169Z","modified_time":"2026-08-11T15:16:06Z","sha256":"101702a7339ec70d8cec7d46df8650dbd393734e9b884e0c19118117a0491b1c","source":"amazon-inspector","versions":["0.1.6"],"id":"IN-MAL-2026-017358"},{"id":"IN-MAL-2026-017373","import_time":"2026-08-11T15:52:46.66516888Z","modified_time":"2026-08-11T15:43:39Z","sha256":"ed958edb4a9ec676c868ec6dee06a854bacfa7601cefa8ccaab72bca1badcf5f","source":"amazon-inspector","versions":["0.1.3"]},{"id":"IN-MAL-2026-017371","import_time":"2026-08-11T15:52:46.447521533Z","modified_time":"2026-08-11T15:31:29Z","sha256":"63afca9a25a2f6e1d75ae3153d2f1b4e7a0d70649ce402e1cbe1e645478d99ba","source":"amazon-inspector","versions":["0.1.4"]},{"modified_time":"2026-08-11T15:31:40Z","sha256":"91439e7a69d936aa8a65b16561f48e9d9abab26fc8e3af4087da8d367cfd2210","source":"amazon-inspector","versions":["0.1.1"],"id":"IN-MAL-2026-017372","import_time":"2026-08-11T15:52:46.565818241Z"},{"sha256":"5bbf11309d88c0af577c0d50026c8829e8d43503ba900dd9eef1c76eea012697","source":"kam193","versions":["0.1.0","0.1.1","0.1.3","0.1.4","0.1.6"],"id":"pypi/2026-08-joule-btp-extension/joule-btp-extension","import_time":"2026-08-11T19:53:29.927770172Z","modified_time":"2026-08-11T12:01:52.311156Z"}]},"references":[{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/joule-btp-extension"},{"type":"PACKAGE","url":"https://pypi.org/project/joule-btp-extension/0.1.0/"},{"type":"PACKAGE","url":"https://pypi.org/project/joule-btp-extension/0.1.6/"},{"type":"PACKAGE","url":"https://pypi.org/project/joule-btp-extension/0.1.3/"},{"type":"PACKAGE","url":"https://pypi.org/project/joule-btp-extension/0.1.4/"},{"type":"PACKAGE","url":"https://pypi.org/project/joule-btp-extension/0.1.1/"}],"affected":[{"package":{"name":"joule-btp-extension","ecosystem":"PyPI","purl":"pkg:pypi/joule-btp-extension"},"versions":["0.1.6","0.1.0","0.1.1","0.1.3","0.1.4"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."},{"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"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"tlsh":"daa1b915c9686a739193a368eb1be6c27b2071471a205c7c7afd835c1fca13580b66c9","path":"setup.py","sha256":"a85bc51f0315ccf285a4405811b0e57f460e4855d6ea6d29da3e5749c8684ecb"}],"package_integrity":[{"hashes":{"blake2b_256":"9cbf58989d079612f28d17ab246a4f932c93c164bec326f005d19468bf2f0854","md5":"1a7c52ecb405f13fc7910761484fb79b","sha256":"955eb223b5b1a3b9d7273e12dfc1baed40f8e27b7f5ac332d9563caae4786b8b"},"filename":"joule_btp_extension-0.1.0.tar.gz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/joule-btp-extension/MAL-2026-13732.json"}}],"schema_version":"1.9.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"},{"name":"Kamil Mańkowski (kam193)","contact":["https://github.com/kam193","https://bad-packages.kam193.eu/"],"type":"ANALYST"},{"name":"OpenSSF: Package Analysis","contact":["https://github.com/ossf/package-analysis","https://openssf.slack.com/channels/package_analysis"],"type":"FINDER"}]}