{"id":616208,"date":"2025-10-30T15:33:34","date_gmt":"2025-10-30T13:33:34","guid":{"rendered":"https:\/\/mybroadband.co.za\/news\/?p=616208"},"modified":"2025-11-01T08:54:46","modified_gmt":"2025-11-01T06:54:46","slug":"hackers-try-to-hijack-developers-using-claude-code","status":"publish","type":"post","link":"https:\/\/mybroadband.co.za\/news\/software\/616208-hackers-try-to-hijack-developers-using-claude-code.html","title":{"rendered":"Claude Code trojan found in NPM"},"content":{"rendered":"\n<p>Supply chain security company Safety has discovered a trojan masquerading as Anthropic\u2019s popular Claude Code AI software development assistant.<\/p>\n\n\n\n<p>Anthropic describes Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster.<\/p>\n\n\n\n<p>Claude Code executes routine tasks, explains complex code, and handles Git workflows through natural language commands. Git is the tool most programmers use for version control.<\/p>\n\n\n\n<p>Developers MyBroadband spoke to in South Africa reported positive experiences with Claude Code, saying it allows them to work much faster than before.<\/p>\n\n\n\n<p>Considering Claude Code\u2019s utility and popularity, it should not come as a surprise that attackers attempted a supply chain attack against the tool.<\/p>\n\n\n\n<p>Safety said in <a href=\"https:\/\/www.getsafety.com\/blog-posts\/malicious-claude-code-package\">a recent blog post<\/a> that its research team\u2019s automated malicious package detection engine identified a new malicious NPM package called @chatgptclaude_club\/claude-code on Monday, 27 October.<\/p>\n\n\n\n<p>NPM is the default package manager for Node.js, the widely used open source JavaScript runtime environment, which GitHub acquired in March 2020. Microsoft has owned GitHub since October 2018.<\/p>\n\n\n\n<p>The malicious package was originally published in August, and 19 versions of it have been released to date. At the time of the report, it had been downloaded 207 times.<\/p>\n\n\n\n<p>By the time of publication, NPM had removed the malicious package and replaced it with a security holding package. It had been downloaded 435 times.<\/p>\n\n\n\n<p>\u201cThis package deploys a sophisticated payload that targets Claude Code installations, either locally on a developer&#8217;s computer or in a continuous integration pipeline,\u201d explained Paul McCarty, the Head of Research at Safety.<\/p>\n\n\n\n<p>\u201cThe intent is to steal Anthropic credentials, but more worryingly, the malware includes a bidirectional command and control server.\u201d<\/p>\n\n\n\n<p>McCarty said their initial analysis led them to believe the package is meant to proxy Claude commands and sensitive data back to the threat actor.<\/p>\n\n\n\n<p>At the same time, it allows the attacker to utilise someone else\u2019s Claude to run their own commands. Claude bills for each token its models process, making this potentially lucrative.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">NPM&#8217;s lack of metadata validation<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2025\/10\/Paul-McCarty-in-black-short-with-greenery-background.jpg\" alt=\"\" class=\"wp-image-616213\" srcset=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2025\/10\/Paul-McCarty-in-black-short-with-greenery-background.jpg 1200w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2025\/10\/Paul-McCarty-in-black-short-with-greenery-background-600x338.jpg 600w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2025\/10\/Paul-McCarty-in-black-short-with-greenery-background-768x432.jpg 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p>\u201cThe malicious package is based on the legitimate @anthropic-ai\/claude-code. The Anthropic package is one of the most popular NPM packages and averages over five million downloads per week,\u201d said McCarty.<\/p>\n\n\n\n<p>\u201cIf you compare the two package contents directories side by side, you can see that the malicious package has the real Claude Code package contents, but with three extra files.\u201d<\/p>\n\n\n\n<p>Simply put, the malware is designed to evade detection by a developer whose machine or CI pipeline has been infected by behaving like the real Claude Code.<\/p>\n\n\n\n<p>\u201cThis is made possible by the fact that NPM, still after all these years, doesn&#8217;t validate what users add to their package metadata,\u201d said McCarty.<\/p>\n\n\n\n<p>\u201cBecause of this lack of validation, threat actors can use the real GitHub repositories in their malicious packages, which adds legitimacy.\u201d<\/p>\n\n\n\n<p>Many NPM users think that the GitHub Repository data in the upper right corner of the package page is validation from the platform, but McCarty said that, unfortunately, that was not the case.<\/p>\n\n\n\n<p>However, in the background, the three extra files in the package intercept traffic to Anthropic to exfiltrate all user prompts, conversations, authentication data, and billing and usage data.<\/p>\n\n\n\n<p>McCarty said there were a handful of indicators developers or their defenders could look for to see if they had been compromised.<\/p>\n\n\n\n<p>These include checking whether they were using the @chatgptclaude_club\/claude-code package, or the legitimate one from Anthropic.<\/p>\n\n\n\n<p>Developers and security professionals could also monitor network traffic for the command and control server\u2019s URL, disclosed in McCarty\u2019s blog post, and check if a ~\/.chatclub\/ directory had been created.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Supply chain security company Safety has discovered a trojan in NPM that masqueraded as Anthropic&#8217;s popular Claude Code AI software development assistant.<\/p>\n","protected":false},"author":15,"featured_media":616210,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,16],"tags":[97858,102027],"class_list":["post-616208","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","category-software","tag-claude","tag-claude-code"],"_links":{"self":[{"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/posts\/616208"}],"collection":[{"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/comments?post=616208"}],"version-history":[{"count":4,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/posts\/616208\/revisions"}],"predecessor-version":[{"id":616377,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/posts\/616208\/revisions\/616377"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/media\/616210"}],"wp:attachment":[{"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/media?parent=616208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/categories?post=616208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/tags?post=616208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}