{"id":"MAL-2026-18298","summary":"Malicious code in claudeopusfile (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (de2f0d45d8a2c0489d082d86a91c63fc5cad53f891b3dd1e976cd7479344c65f)\nsetup.py imports claudeopusfile.compat._ensure_compat during pip install. compat.py constructs the string 'exec' from a chr-code tuple (chr(101),chr(120),chr(101),chr(99)) and invokes it via getattr(builtins, _RUN)(compile(code, '\u003cclaudeopusfile-compat\u003e', 'exec'),...) on content produced by zlib.decompress(base64.b85decode(_shimdata.DATA)) — an opaque base85+zlib blob shipped in claudeopusfile/_shimdata.py. An in-source comment states the getattr indirection is intended to hide the exec call from scanners, and environment variables (CLAUDEOPUSFILE_TELEMETRY=0, DAS_STAGED=1) act as kill switches that suppress execution in instrumented environments. The package additionally ships claudeopusfile/_payload.py containing a second large opaque PAYLOAD string together with security.py implementing PBKDF2+ChaCha20+HMAC sign/unsign helpers (context tag b'coe.'), providing a signed-channel decryption path for a staged second payload. Decoded content runs with the installer's privileges on `pip install`. The package's advertised purpose (prompt-generator utility) has no need to decode and execute an opaque blob at install time.\n\n## Source: kam193 (9a776d104d66cbeec1283bd7a7e9decc15da19a1946dd27c7d7ca632a6cdc2f2)\nDuring installation, obfuscated code is used to fetch code hidden in an image containing a Python application with a native extension module. This module holds an obfuscated infostealer which collects sensitive data and exfiltrates them to a C2 server retrieved from transaction history in the Polygon blockchain.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-09-donutautosellsrc\n\n\nReasons (based on the campaign):\n\n\n - infostealer\n\n\n - Downloads and executes a remote executable.\n\n\n - obfuscation\n\n\n - The package contains code to detect if it is running in a sandbox environment.\n\n\n - malware\n\n\n - native-extension\n\n\n - steganography\n\n\n - c2-in-blockchain\n","modified":"2026-10-26T06:45:15.843384220Z","published":"2026-10-25T23:35:59Z","database_specific":{"malicious-packages-origins":[{"sha256":"9a776d104d66cbeec1283bd7a7e9decc15da19a1946dd27c7d7ca632a6cdc2f2","source":"kam193","versions":["0.1.1","0.1.2"],"id":"pypi/2026-09-donutautosellsrc/claudeopusfile","import_time":"2026-10-25T23:38:10.327077802Z","modified_time":"2026-10-25T23:37:39.662422Z"},{"sha256":"66edaf70e33c38c19084199a6856e62bd651c41df145ad1c0e8a50ff3f030c72","source":"kam193","versions":["0.1.1","0.1.2"],"id":"pypi/2026-09-donutautosellsrc/claudeopusfile","import_time":"2026-10-26T00:47:12.519355123Z","modified_time":"2026-10-25T23:37:39.662422Z"},{"versions":["0.1.2"],"id":"IN-MAL-2026-021759","import_time":"2026-10-26T06:39:40.795839462Z","modified_time":"2026-10-26T06:29:25Z","sha256":"332d288fee9ec34f9d024d91f13c04c10b6072e0fd2368f5c966ce5e94daaaf5","source":"amazon-inspector"},{"modified_time":"2026-10-26T06:29:39Z","sha256":"de2f0d45d8a2c0489d082d86a91c63fc5cad53f891b3dd1e976cd7479344c65f","source":"amazon-inspector","versions":["0.1.1"],"id":"IN-MAL-2026-021761","import_time":"2026-10-26T06:39:40.936876726Z"}],"iocs":{"urls":["https://thisisafalsepositive.st/cdn/v2/9f4e7a2c1b8d.png","https://thisisafalsepositive.st/cdn/v2/promotion/manifest.json","https://thisisafalsepositive.st/shard/submitData","https://thisisafalsepositive.st/shard/submitLogs","https://thisisafalsepositive.st/shard/submitFile"],"domains":["thisisafalsepositive.st","sltnnt.ru"]}},"references":[{"type":"EVIDENCE","url":"https://www.virustotal.com/gui/file/d03c42c275f0dbc617428441508c49ae1adcbbc95af4eeb094bca4e4f8943f3e/detection"},{"type":"WEB","url":"https://polygonscan.com/address/0x9c0a507300fd902787bb193d80fca5ce6e1bff9a"},{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/claudeopusfile"},{"type":"PACKAGE","url":"https://pypi.org/project/claudeopusfile/0.1.2/"},{"type":"PACKAGE","url":"https://pypi.org/project/claudeopusfile/0.1.1/"}],"affected":[{"package":{"name":"claudeopusfile","ecosystem":"PyPI","purl":"pkg:pypi/claudeopusfile"},"versions":["0.1.1","0.1.2"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/claudeopusfile/MAL-2026-18298.json","indicators":{"package_integrity":[{"hashes":{"blake2b_256":"f3f8467102c869d9c9dbe99fdca9cded479fd247e8ab9daad8d9ab791a1d9e7a","md5":"5095c38698e1526c335489ed56b6d61f","sha256":"22210a635279b41771492163ac5f5d5eaaa1b247b58c2b8da62043e2734e108f"},"filename":"claudeopusfile-0.1.2.tar.gz"}],"evidence_files":[{"sha256":"757dcc0045491bcef5566bd59c8a1b2b95227662295c39505c40e99c27648805","tlsh":"20f08b224c61662224f084c93232602697a9232f27305086b5be4324aff9451fb465ad","path":"setup.py"},{"sha256":"30236bcd7d672d170f31fd3d40a436fa973f41c73c8facdd28115652fb99e3c2","tlsh":"a6112f568d0a5db24331d1188960c8acc26e0a0bbd752042beac07bc3f34a61d6eb4ce","path":"claudeopusfile/compat.py"}]},"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"}]}}],"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"}]}