GitHub сталкивается с широко распространенными атаками вредоносного ПО, затрагивающими проекты, включая криптовалюты

Major developer platform GitHub faced a widespread malware attack and reported 35,000 “code hits” on a day that saw thousands of Solana-based wallets drained for millions of dollars.

The widespread attack was highlighted by GitHub developer Stephen Lucy, who first reported the incident earlier on Wednesday. The developer came across the issue while reviewing a project he found on a Google search.

Quote.

I am uncovering what seems to be a massive widespread malware attack on @github.

— Currently over 35k repositories are infected
— So far found in projects including: crypto, golang, python, js, bash, docker, k8s
— It is added to npm scripts, docker images and install docs pic.twitter.com/rq3CBDw3r9

— Stephen Lacy (@stephenlacy) August 3, 2022

End of Quote.

So far, various projects — from crypto, Golang, Python, JavaScript, Bash, Docker and Kubernetes — have been found to be affected by the attack. The malware attack is targeted at the docker images, install docs and NPM script, which is a convenient way to bundle common shell commands for a project.

To dupe developers and access critical data, the attacker first creates a fake repository (a repository contains all of the project’s files and each file’s revision history) and pushes clones of legit projects to GitHub. For example, the following two snapshots show this legit crypto miner project and its clone.

Original crypto mining project. Source: Github
Cloned crypto mining project. Источник: Github

Многие из этих клонированных репозиториев были размещены в виде «pull requests», которые позволяют разработчикам сообщать другим об изменениях, которые они внесли в ветку репозитория на GitHub.

Когда разработчик становится жертвой атаки вредоносного ПО, вся переменная окружения (ENV) скрипта, приложения или ноутбука (приложения Electron) отправляется на сервер злоумышленника. В ENV входят ключи безопасности, ключи доступа к Amazon Web Services, криптографические ключи и многое другое.

Разработчик сообщил о проблеме на GitHub и посоветовал разработчикам подписывать GPG-ключами свои изменения, вносимые в репозиторий. GPG-ключи добавляют дополнительный уровень безопасности аккаунтам GitHub и программным проектам, предоставляя способ проверки того, что все правки исходят от надежного источника.

Ключи GPG обеспечивают дополнительную безопасность.