{"id":"MAL-2026-13693","revision":"9b3bdb3364964f118b6d32e51ed3fa08","records":[{"revision":"9b3bdb3364964f118b6d32e51ed3fa08","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-13693","aliases":[],"title":"Malicious code in cryptostock (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (9ab293d041a75fa4fcfb65c996176a885720e7b60cf3dde4b19154c073c29454)\nindex.js is an obfuscated payload that, on require(), starts a C2 client against https://badai.run.place: it registers a UID, long-polls /cekappapiapi.php for shell commands, executes them via child_process.exec, and POSTs stdout/stderr back to /fallback.php (AES-256-ECB encrypted). After a randomized 2-8 minute delay it enumerates installer-owned secret directories (/root/.ssh, /home/*/.ssh, /opt/wallet-keys, /etc/ssl/private, ~/.ethereum/keystore, /var/lib/ethereum/keystore, /mnt/crypto/wallets) via `find` for *.pem/*.key/UTC--*/keystore files, filters those containing 'PRIVATE KEY', and reads process.env.ETH_PRIVATE_KEY; matches are exfiltrated to badai.run.place. For each harvested 64-hex private key the code instantiates web3 against Infura mainnet and broadcasts a signed ETH transfer of the account balance (minus gas) to a hardcoded drain address. Strings including module names, the C2 host, private-key markers, and keystore paths are base64-encoded in a string table and decoded at runtime; the file header self-identifies as an obfuscated build integrating StealthC2 from Badnew.py.\n","state":0,"publishedAt":"2026-08-10T11:54:05+00:00","modifiedAt":"2026-08-10T12:50:26.5194194+00:00","affected":[{"ecosystem":"npm","name":"cryptostock","ranges":[],"versions":["1.0.1","1.0.0"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/cryptostock/v/1.0.1","https://www.npmjs.com/package/cryptostock/v/1.0.0"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-13693","license":"OSV · upstream source license applies","key":"osv:MAL-2026-13693","identifiers":["MAL-2026-13693"]},"retained":false,"historicalAffected":[]}],"coverage":[]}