protectstraizolib@1.0.8
Malicious code in protectstraizolib (npm)
Analysis
It ships a hardcoded AES-256-CBC encrypted Discord bot token, user ID, and channel ID in src/webhook/discord.js (vars _0x3m4n5o, _0x4p5q6r, _0x5r6s7t with DECRYPT_KEY/DECRYPT_IV). On initialization it logs into Discord as the author's bot, listens for 'protect' prefixed commands in a specific channel, and can: list all registered bots (exfiltrating their guild/server metadata to the C2 channel), force bots to leave servers (protect leave), and send DMs through registered bots (protect dm). The registerBot() function automatically forwards each bot's server list (server IDs, names, owner IDs) to the author's Discord channel — an information exfiltration channel. No installer credential theft (no NPM_TOKEN/GITHUB_TOKEN/npmrc), and no install-time hook — the malice surfaces when a developer imports the library and calls StartLib() with a bot token.
- analyzed by
- Leitwacht
- first seen
- Jun 12, 2026, 04:06 PM
- analyzed
- Jun 12, 2026, 04:07 PM
Related advisories
- period-newline@0.1.0
- chalk-plus-js@7.0.4
- gpt-terminal-cli@1.0.0
- wormgpt-cli@1.0.1
- statist-browser-typed-client-mb.reliability.android.metrics@20.9.3
- sme-crm-services-sme-crm-services-core@20.1.4
- beaver-ui-icon-lock@12.2.3
- mcp-dev-toolkit@1.5.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.