{"id":23858,"date":"2025-02-25T12:51:51","date_gmt":"2025-02-25T08:51:51","guid":{"rendered":"https:\/\/me-en.kaspersky.com\/blog\/?p=23858"},"modified":"2025-02-25T12:51:51","modified_gmt":"2025-02-25T08:51:51","slug":"malicious-code-in-github","status":"publish","type":"post","link":"https:\/\/me-en.kaspersky.com\/blog\/malicious-code-in-github\/23858\/","title":{"rendered":"Malicious code on GitHub: How hackers target programmers"},"content":{"rendered":"<p>Can you imagine a world where, every time you wanted to go somewhere, you had to reinvent the wheel and build a bicycle from scratch? We can\u2019t either. Why reinvent something that already exists and works perfectly well? The same logic applies to programming: developers face routine tasks every day, and instead of inventing their own wheels and bicycles (which might even be not up to par), they simply grab ready-made <span style=\"text-decoration: line-through\">bicycles<\/span> code from open-source GitHub repositories.<\/p>\n<p>This solution is available to anyone \u2014\u00a0 including criminals who use the <em>world\u2019s best free open-source code<\/em> as bait for attacks. There\u2019s plenty of evidence to back this up, and here\u2019s the latest: our experts have uncovered an active malicious campaign, GitVenom, targeting GitHub users.<\/p>\n<h2><strong>What is GitVenom?<\/strong><\/h2>\n<p>GitVenom is what we named this malicious campaign, in which unknown actors created over 200 repositories containing fake projects with malicious code: Telegram bots, tools for hacking the game Valorant, Instagram automation utilities, and Bitcoin wallet managers. At first glance, all the repositories look legitimate. Especially impressive is the well-designed README.MD file \u2014 a guide on how to work with the code \u2014 with detailed instructions in multiple languages. In addition to that, attackers added multiple tags to their repositories.<\/p>\n<div id=\"attachment_53089\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2025\/02\/25124448\/malicious-code-in-github-01.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-53089\" class=\"wp-image-53089 size-large\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2025\/02\/25124448\/malicious-code-in-github-01-1024x871.png\" alt=\"Attackers used AI to write detailed instructions in multiple languages\" width=\"1024\" height=\"871\"><\/a><p id=\"caption-attachment-53089\" class=\"wp-caption-text\">Attackers used AI to write detailed instructions in multiple languages<\/p><\/div>\n<p>Another indicator reinforcing the apparent legitimacy of these repositories is the large number of commits. The attackers\u2019 repositories have tons of them \u2014 tens of thousands. The attackers weren\u2019t, of course, manually updating each of the 200 repositories to maintain authenticity, but simply used timestamp files that updated every few minutes. The combination of detailed documentation and numerous commits creates the illusion that the code is genuine and safe to use.<\/p>\n<h2><strong>GitVenom: Two years of activity<\/strong><\/h2>\n<p>The campaign started a long time ago: the oldest fake repository we found is about two years old. In the meantime, GitVenom has affected developers in Russia, Brazil, Turkey, and other countries. The attackers covered a wide range of programming languages: malicious code was found in Python, JavaScript, C, C#, and C++ repositories.<\/p>\n<p>Regarding the functionality of these projects, the features described in the README file didn\u2019t even match the actual code \u2014 in reality, the code doesn\u2019t do half of what it claims. But \u201cthanks\u201d to it, victims end up downloading malicious components. These include:<\/p>\n<ul>\n<li><strong>A Node.js<\/strong> <a href=\"https:\/\/encyclopedia.kaspersky.com\/glossary\/trojan-psw-psw-password-stealing-ware\/\" target=\"_blank\" rel=\"noopener\"><strong>stealer<\/strong><\/a> that collects usernames and passwords, crypto wallet data, and browser history, packages the stolen data into a .7z archive, and sends it to the attackers through Telegram.<\/li>\n<li><strong>AsyncRAT<\/strong> \u2014 an open-source <a href=\"https:\/\/encyclopedia.kaspersky.com\/glossary\/remote-access-trojan-rat\/\" target=\"_blank\" rel=\"noopener\">remote administration Trojan<\/a>, which can also function as a keylogger.<\/li>\n<li><strong>Quasar<\/strong> \u2014 an open-source <a href=\"https:\/\/encyclopedia.kaspersky.com\/glossary\/backdoor\/\" target=\"_blank\" rel=\"noopener\">backdoor<\/a>.<\/li>\n<li><strong>A clipper<\/strong> that searches the clipboard for crypto wallet addresses and replaces them with attacker-controlled addresses. Notably, in November 2024, the hacker wallet used in this attack received a one-time deposit of about 5 BTC (approximately US$485,000 at the time of the study).<\/li>\n<\/ul>\n<p>You can read more about the details of this malicious campaign in our <a href=\"https:\/\/securelist.com\/gitvenom-campaign\/115694\/\" target=\"_blank\" rel=\"noopener\">full research<\/a> published on SecureList.<\/p>\n<h2><strong>How to protect yourself from malicious code on GitHub<\/strong><\/h2>\n<p>In short, the best defense is vigilance. Since <a href=\"https:\/\/github.blog\/news-insights\/company-news\/100-million-developers-and-counting\/\" target=\"_blank\" rel=\"nofollow noopener\">over 100 million developers use GitHub<\/a>, attackers will likely continue to spread malicious code through this popular platform. The only question is how they\u2019ll do it \u2014 a decade ago, no one imagined that attackers would be able to conduct campaigns like GitVenom for so long and with such persistence. Therefore, every developer should maintain their cybersecurity hygiene when working with GitHub.<\/p>\n<ul>\n<li><strong>Analyze code before<\/strong> integrating it into an existing project.<\/li>\n<li><strong>Use<\/strong> <a href=\"https:\/\/me-en.kaspersky.com\/premium?icid=me-en_bb2022-kdplacehd_acq_ona_smm__onl_b2c_kdaily_lnk_sm-team___kprem___\" target=\"_blank\" rel=\"noopener\">malware protection<\/a>\u00a0on both computers and smartphones.<\/li>\n<li><strong>Check less obvious indicators carefully<\/strong>: contributor accounts, the number of stars (likes), and the project creation date. If the account was created three days ago, the repository two days ago, and it only has one star, there\u2019s a good chance the project is fake and the code is malicious.<\/li>\n<li><strong>Don\u2019t download files from direct links to GitHub<\/strong> shared in chats, suspicious channels, or on unverified websites.<\/li>\n<li><strong>If you find a suspicious repository,<\/strong> <a href=\"https:\/\/docs.github.com\/en\/communities\/maintaining-your-safety-on-github\/reporting-abuse-or-spam\" target=\"_blank\" rel=\"nofollow noopener\"><strong>report it to GitHub<\/strong><\/a> \u2014 this could save others\u2019 devices not protected with a <a href=\"https:\/\/me-en.kaspersky.com\/premium?icid=me-en_bb2022-kdplacehd_acq_ona_smm__onl_b2c_kdaily_lnk_sm-team___kprem___\" target=\"_blank\" rel=\"noopener\">Kaspersky Premium<\/a>.<\/li>\n<\/ul>\n<input type=\"hidden\" class=\"category_for_banner\" value=\"premium-geek\">\n","protected":false},"excerpt":{"rendered":"<p>We discovered over 200 repositories with fake projects on GitHub. Using them, attackers distribute stealers, clippers, and backdoors.<\/p>\n","protected":false},"author":312,"featured_media":23861,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1486],"tags":[1505,1658,36,1969],"class_list":{"0":"post-23858","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-threats","8":"tag-cryptocurrencies","9":"tag-github","10":"tag-malware-2","11":"tag-open-source"},"hreflang":[{"hreflang":"en-ae","url":"https:\/\/me-en.kaspersky.com\/blog\/malicious-code-in-github\/23858\/"},{"hreflang":"en-in","url":"https:\/\/www.kaspersky.co.in\/blog\/malicious-code-in-github\/28617\/"},{"hreflang":"ar","url":"https:\/\/me.kaspersky.com\/blog\/malicious-code-in-github\/12298\/"},{"hreflang":"en-gb","url":"https:\/\/www.kaspersky.co.uk\/blog\/malicious-code-in-github\/28736\/"},{"hreflang":"es-mx","url":"https:\/\/latam.kaspersky.com\/blog\/malicious-code-in-github\/27971\/"},{"hreflang":"es","url":"https:\/\/www.kaspersky.es\/blog\/malicious-code-in-github\/30789\/"},{"hreflang":"it","url":"https:\/\/www.kaspersky.it\/blog\/malicious-code-in-github\/29483\/"},{"hreflang":"ru","url":"https:\/\/www.kaspersky.ru\/blog\/malicious-code-in-github\/39126\/"},{"hreflang":"tr","url":"https:\/\/www.kaspersky.com.tr\/blog\/malicious-code-in-github\/13184\/"},{"hreflang":"x-default","url":"https:\/\/www.kaspersky.com\/blog\/malicious-code-in-github\/53085\/"},{"hreflang":"fr","url":"https:\/\/www.kaspersky.fr\/blog\/malicious-code-in-github\/22611\/"},{"hreflang":"pt-br","url":"https:\/\/www.kaspersky.com.br\/blog\/malicious-code-in-github\/23487\/"},{"hreflang":"de","url":"https:\/\/www.kaspersky.de\/blog\/malicious-code-in-github\/31976\/"},{"hreflang":"ru-kz","url":"https:\/\/blog.kaspersky.kz\/malicious-code-in-github\/28856\/"},{"hreflang":"en-au","url":"https:\/\/www.kaspersky.com.au\/blog\/malicious-code-in-github\/34685\/"},{"hreflang":"en-za","url":"https:\/\/www.kaspersky.co.za\/blog\/malicious-code-in-github\/34316\/"}],"acf":[],"banners":"","maintag":{"url":"https:\/\/me-en.kaspersky.com\/blog\/tag\/github\/","name":"github"},"_links":{"self":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/23858","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/users\/312"}],"replies":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/comments?post=23858"}],"version-history":[{"count":2,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/23858\/revisions"}],"predecessor-version":[{"id":23862,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/23858\/revisions\/23862"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media\/23861"}],"wp:attachment":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media?parent=23858"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/categories?post=23858"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/tags?post=23858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}