Original Article Text

Click to Toggle View

GitHub comments abused to push malware via Microsoft repo URLs. A GitHub flaw, or possibly a design decision, is being abused by threat actors to distribute malware using URLs associated with a Microsoft repository, making the files appear trustworthy. While most of the malware activity has been based around the Microsoft GitHub URLs, this "flaw" could be abused with any public repository on GitHub, allowing threat actors to create very convincing lures. Abusing GitHub's file upload feature Yesterday, McAfee released a report on a new LUA malware loader distributed through what appeared to be a legitimate Microsoft GitHub repository for the "C++ Library Manager for Windows, Linux, and MacOS," known as vcpkg. The URLs for the malware installers, shown below, clearly indicate that they belong to the Microsoft repo, but we could not find any reference to the files in the project's source code. Finding it strange that a Microsoft repo would be distributing malware since February, BleepingComputer looked into it and found that the files are not part of vcpkg but were uploaded as part of a comment left on a commit or issue in the project. When leaving a comment, a GitHub user can attach a file, which will be uploaded to GitHub's CDN and associated with the related project using a unique URL in this format: 'https://www.github.com/{project_user}/{repo_name}/files/{file_id}/{file_name}.' Instead of generating the URL after a comment is posted, GitHub automatically generates the download link after you add the file to an unsaved comment, as shown below. This allows threat actors to attach their malware to any repository without them knowing. Even if you decide not to post the comment or delete it after it is posted, the files are not deleted from GitHub's CDN, and the download URLs continue to work forever. As the file's URL contains the name of the repository the comment was created in, and as almost every software company uses GitHub, this flaw can allow threat actors to develop extraordinarily crafty and trustworthy lures. For example, a threat actor could upload a malware executable in NVIDIA's driver installer repo that pretends to be a new driver fixing issues in a popular game. Or a threat actor could upload a file in a comment to the Google Chromium source code and pretend it's a new test version of the web browser. These URLs would also appear to belong to the company's repositories, making them far more trustworthy. Unfortunately, even if a company learns their repos are abused to distribute malware, BleepingComputer could not find any settings that allow you to manage files attached to your projects. Furthermore, you can only protect a GitHub account from being abused in this way and tarnishing your reputation by disabling comments. According to this GitHub support document, you can only temporarily disable comments for a maximum of six months at a time. However, restricting comments can significantly impact a project's development as it will not allow users to report bugs or suggestions. Sergei Frankoff, of automated malware analysis service UNPACME, did a livestream on Twitch about this bug just last month, saying that threat actors were actively abusing it. Weeks later... GitHub bug still dropping malware pic.twitter.com/s165zOAsoI As part of our research into this bug, BleepingComputer could only find one other repo, httprouter, abused to distribute malware in this way, and it was the same 'Cheater.Pro.1.6.0.zip' as seen in Microsoft's URLs. However, Frankoff told BleepingComputer that they discovered a similar campaign in March that utilizes the same LUA loader malware, which is called SmartLoader, disguised as the Aimmy cheat software. Frankoff told BleepingComputer that SmartLoader is commonly installed alongside other payloads, such as the RedLine information-stealing malware. BleepingComputer contacted both GitHub and Microsoft on Thursday about this abuse but did not receive a response. At the time of this publication, the information-stealing malware is still being distributed through links associated with Microsoft' GitHub repository.

Daily Brief Summary

MALWARE // Malware Disguised as Microsoft Repo Files Exploits GitHub Feature

Threat actors exploit a GitHub design flaw to distribute malware through URLs appearing to come from Microsoft repositories.

Malware disguised as files in comments on GitHub bypasses scrutiny by leveraging trusted repo URLs, making the deception highly convincing.

Files attached in comments on GitHub are stored on GitHub's CDN, with persistent URLs that do not get deleted even if the comment is removed.

Malicious actors have abused this GitHub feature by attaching malware to comments within reputable projects, such as Microsoft's "C++ Library Manager" (vcpkg) repository.

The exposed repositories maintain active download links indefinitely, potentially deceiving users long after the initial comment manipulation.

GitHub's settings currently lack robust mechanisms to manage or delete files attached to project comments, complicating efforts to mitigate abuse.

Disabling comments is a potential but inconvenient solution, as it can significantly restrict community contributions and project development.