{"id":"MAL-2026-11414","summary":"Malicious code in aiassistcore (PyPI)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (9561c11926b1e2d0a7f38f91edc062a77b27e624521dd7c1e500ef3c16a157a2)\nThe package presents itself as 'AI assistant utilities' but its workspace.py implements two active attacks against the installer's Windows session. A background `Helper` thread uses Win32 `GetAsyncKeyState` over key codes 1..255 to capture every keystroke, buffers modifier state, and flushes the log to a file whose path is imported as `KEYLOGGER_DIR` / `KEYLOGGER_LOG_FILE` from `cognikit.config` — the code's own identifiers name the artifact as a keylogger. A second `_monitor_clipboard` thread polls the Windows clipboard and matches its contents against a base64-obfuscated regex table for ~18 cryptocurrency address formats (BTC, ETH, TRX, XRP, SOL, DOT, XMR, LTC, DOGE, ADA, ATOM, ALGO, NEAR, APT, SUI, TON, BCH); on a match, the clipboard is emptied and rewritten with an attacker-supplied replacement address from `self.wallet_replacements`, so funds the user attempts to send are redirected to attacker-controlled wallets. The address-regex table and chain tickers are hidden behind a `_d()` base64 decoder invoked at import time, aligned with the clipper behavior and inconsistent with the advertised purpose.\n\n## Source: kam193 (f2900cfaae06740bbefca375a4d23cb6c3dd67726ace0f9cffda92c04f1c4333)\nIn this campaign, some packages (e.g. cognikit, aiassistcore) are pulled as dependencies and contain the C2 configuration and the malicious functionality, while others (like aichannel) provide fake functionality and silently execute malicious actions from dependencies. The malicious functionality is oriented to replace the copied cryptocurrency wallet addresses with these controlled by the attacker and downloaded from the C2 server, exfiltrating browser data, establishing a remote control over the device, placing malicious extensions in browsers. \n\nIoCs are consistent with those previously attributed to North Korea's \"Contagious Interview\" campaign. The known TTP suggest these packages are used as dependencies in malicious interview assessments or cryptocurrency projects.\n\n\n---\n\nCategory: MALICIOUS - The campaign has clearly malicious intent, like infostealers.\n\n\nCampaign: 2026-07-cognikit\n\n\nReasons (based on the campaign):\n\n\n - crypto-related\n\n\n - The malicious code is intentionally included in a dependency of the package\n\n\n - keylogger\n\n\n - clipboard-modify\n\n\n - exfiltration-browser-data\n\n\n - persistence\n\n\n - rat\n\n\n - The package contains code to execute remote commands (probably limited to a specific set) on the victim's machine.\n","modified":"2026-08-04T22:05:24.588722634Z","published":"2026-07-31T14:15:34Z","database_specific":{"iocs":{"urls":["http://45.95.186.237:8000/address"],"ips":["45.95.186.237"]},"malicious-packages-origins":[{"id":"pypi/2026-07-cognikit/aiassistcore","import_time":"2026-07-31T15:20:37.156759781Z","modified_time":"2026-07-31T14:15:34.952202Z","sha256":"f2900cfaae06740bbefca375a4d23cb6c3dd67726ace0f9cffda92c04f1c4333","source":"kam193","versions":["0.1.2"]},{"versions":["0.1.2"],"id":"IN-MAL-2026-011049","import_time":"2026-08-04T21:33:15.082724781Z","modified_time":"2026-08-04T21:25:09Z","sha256":"9561c11926b1e2d0a7f38f91edc062a77b27e624521dd7c1e500ef3c16a157a2","source":"amazon-inspector"}]},"references":[{"type":"WEB","url":"https://x.com/L0Psec/status/2066540845893861386"},{"type":"WEB","url":"https://bad-packages.kam193.eu/pypi/package/aiassistcore"},{"type":"PACKAGE","url":"https://pypi.org/project/aiassistcore/0.1.2/"}],"affected":[{"package":{"name":"aiassistcore","ecosystem":"PyPI","purl":"pkg:pypi/aiassistcore"},"versions":["0.1.2"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/aiassistcore/MAL-2026-11414.json","cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"indicators":{"evidence_files":[{"tlsh":"958286a1191e7c11d243ed1d1882a1973b273c5b5e0d1d24bfac8a8c5f4833686f9ebe","path":"aiassistcore/workspace.py","sha256":"3890438482f3c221a302abaaeb86f3759ac9fe06cad123539f31d7e50697ca61"}],"package_integrity":[{"filename":"aiassistcore-0.1.2-py3-none-any.whl","hashes":{"blake2b_256":"4e1c1364ed6a7efa552c20955969696867de2c8a1151ce9d99c182dc96b811f5","md5":"ca30a6f611d49c0d5e4431116c1c03e6","sha256":"a09f1031f5c49bd95cd619ab3d90c6015c1003f888c04029c5925fd566fd7d1b"}}]}}}],"schema_version":"1.8.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"}]}