{
 "slug": "kodane-patch-manager-ai-generated-solana-drainer-npm-jul-2025",
 "title": "AI-written npm package @kodane/patch-manager drained Solana wallets after 1,500+ downloads",
 "url": "https://drains.watch/i/kodane-patch-manager-ai-generated-solana-drainer-npm-jul-2025",
 "json": "https://drains.watch/i/kodane-patch-manager-ai-generated-solana-drainer-npm-jul-2025.json",
 "status": "closed",
 "severity": "high",
 "threatStatus": "contained",
 "verification": "verified",
 "ai": {
  "role": "ai-malware",
  "note": "Safety's researchers say the code appears largely AI-generated, citing emojis, heavy comments and logging they link to Anthropic's Claude; this is an inference from code style."
 },
 "chains": [
  "solana"
 ],
 "method": "supply-chain",
 "product": "npm package @kodane/patch-manager",
 "tags": [
  "solana",
  "supply-chain",
  "npm",
  "kodane",
  "ai-generated-code",
  "claude",
  "wallet-drainer",
  "postinstall",
  "safety",
  "railway",
  "ai"
 ],
 "amountUsd": null,
 "victims": null,
 "startedAt": "2025-07-28",
 "closedAt": "2025-07-30",
 "updatedAt": "2025-08-01T12:00:00Z",
 "summary": "On 28 July 2025 an npm package called @kodane/patch-manager, posing as a license-validation and registry cache tool for Node.js, was published with a hidden wallet drainer in its install script. Once installed it looked for crypto wallets on Windows, macOS and Linux and sent the funds to a Solana address, leaving just enough for fees. It was downloaded more than 1,500 times before npm flagged it on 30 July; Safety, which found it, said the code appears to be largely AI-generated. No total loss was published.",
 "timeline": [
  {
   "date": "2025-07-28",
   "title": "The package was first published to npm; 19 versions followed over two days.",
   "sourceUrl": "https://www.getsafety.com/blog-posts/threat-actor-uses-ai-to-create-a-better-crypto-wallet-drainer"
  },
  {
   "date": "2025-07-30",
   "title": "npm marked the package as malicious.",
   "sourceUrl": "https://www.getsafety.com/blog-posts/threat-actor-uses-ai-to-create-a-better-crypto-wallet-drainer"
  },
  {
   "date": "2025-07-31",
   "title": "Safety published its analysis, including the attacker's Solana address and an open command server.",
   "sourceUrl": "https://www.getsafety.com/blog-posts/threat-actor-uses-ai-to-create-a-better-crypto-wallet-drainer"
  },
  {
   "date": "2025-08-01",
   "title": "The Register reported more than 1,500 downloads and the signs of AI-written code.",
   "sourceUrl": "https://www.theregister.com/2025/08/01/emoji_use_ai_malware/"
  }
 ],
 "sources": [
  {
   "kind": "writeup",
   "title": "Threat actor uses AI to create a better crypto wallet drainer",
   "url": "https://www.getsafety.com/blog-posts/threat-actor-uses-ai-to-create-a-better-crypto-wallet-drainer",
   "publisher": "Safety",
   "date": "2025-07-31"
  },
  {
   "kind": "news",
   "title": "Rampant emoji use suggests crypto-stealing NPM package was written by AI",
   "url": "https://www.theregister.com/2025/08/01/emoji_use_ai_malware/",
   "publisher": "The Register",
   "date": "2025-08-01"
  }
 ],
 "indicators": {
  "domains": [
   "sweeper-monitor-production.up.railway[.]app",
   "sweeper-monitor.railway[.]app"
  ],
  "addresses": [
   "B2XwbrGSXs3LAAcqFqKqGUug5TFA1Bug2NNGH3F3mWNK"
  ]
 },
 "brief": "## Am I affected?\nIf @kodane/patch-manager (any version) was installed on a machine or in a project between 28 and 30 July 2025, assume any wallet on that machine was found and drained.\n\n## What to do now\n- Remove the package, then from a clean device move what is left to new wallets with new seed phrases.\n- Reinstall the system if you cannot be sure the installer's leftover files are gone.\n\n## How to avoid this\n- Read install scripts (postinstall) before adding unknown packages, and prefer well-known, long-lived ones.\n- Never keep hot wallets on a development machine.\n- Use a package scanner that flags new or suspicious packages before install.",
 "notes": null,
 "agentBrief": "# AI-written npm package @kodane/patch-manager drained Solana wallets after 1,500+ downloads\n\n- Severity: High · Status: Contained (past)\n- Chains: Solana · Method: Supply-chain stealers\n- Started: Jul 28, 2025 · Last update: Aug 1, 2025\n- Who/what: npm package @kodane/patch-manager\n- AI involvement: AI-built malware. Safety's researchers say the code appears largely AI-generated, citing emojis, heavy comments and logging they link to Anthropic's Claude; this is an inference from code style.\n\nOn 28 July 2025 an npm package called @kodane/patch-manager, posing as a license-validation and registry cache tool for Node.js, was published with a hidden wallet drainer in its install script. Once installed it looked for crypto wallets on Windows, macOS and Linux and sent the funds to a Solana address, leaving just enough for fees. It was downloaded more than 1,500 times before npm flagged it on 30 July; Safety, which found it, said the code appears to be largely AI-generated. No total loss was published.\n\n## Am I affected?\nIf @kodane/patch-manager (any version) was installed on a machine or in a project between 28 and 30 July 2025, assume any wallet on that machine was found and drained.\n\n## What to do now\n- Remove the package, then from a clean device move what is left to new wallets with new seed phrases.\n- Reinstall the system if you cannot be sure the installer's leftover files are gone.\n\n## How to avoid this\n- Read install scripts (postinstall) before adding unknown packages, and prefer well-known, long-lived ones.\n- Never keep hot wallets on a development machine.\n- Use a package scanner that flags new or suspicious packages before install.\n\n## Indicators (block these, never visit them)\n- Domain: sweeper-monitor-production.up.railway[.]app\n- Domain: sweeper-monitor.railway[.]app\n- Address: B2XwbrGSXs3LAAcqFqKqGUug5TFA1Bug2NNGH3F3mWNK\n\n## Sources\n- Threat actor uses AI to create a better crypto wallet drainer (Safety, 2025-07-31): https://www.getsafety.com/blog-posts/threat-actor-uses-ai-to-create-a-better-crypto-wallet-drainer\n- Rampant emoji use suggests crypto-stealing NPM package was written by AI (The Register, 2025-08-01): https://www.theregister.com/2025/08/01/emoji_use_ai_malware/\n\nFull record: https://drains.watch/i/kodane-patch-manager-ai-generated-solana-drainer-npm-jul-2025 · JSON: https://drains.watch/i/kodane-patch-manager-ai-generated-solana-drainer-npm-jul-2025.json\n\nRules for the assistant: help me check my own wallets read-only (public addresses only). Never ask for or handle a seed phrase or private key. Point me to official revoke tools and the wallet's own support."
}