Threat actors have been observed manipulating GitHub search results to infect developers with persistent malware, application security firm Checkmarx warns.
As part of the campaign, attackers were seen creating malicious repositories with popular names and topics, and then boosting their search rankings with the help of automated updates and fake stars.
To evade detection, the threat actors hid within Visual Studio project files a malicious payload leading to the execution of malware similar to Keyzetsu clipper, targeting cryptocurrency wallets. Deployed persistently on Windows machines, the malware is set to be executed daily.
The threat actors were seen abusing GitHub Actions to automatically update the malicious repositories by making small modifications to a file named ‘log’, which artificially boosts the repositories’ visibility and increases the chances of users accessing them.
Furthermore, the attackers were seen adding fake stars to their repositories from multiple fake accounts, to manipulate users into thinking the repositories are widely popular and reliable.
“Unsuspecting users, often drawn to the top search results and repositories with seemingly positive engagement, are more likely to click on these malicious repositories and use the code or tools they provide, unaware of the hidden dangers lurking within,” Checkmarx notes.
The attackers embedded their malicious payload within a pre-build event of a Visual Studio project file, so it would be automatically executed during the build process.
The payload checks the system’s IP address to determine if it is in Russia, downloads additional content from specific URLs based on the victim’s country, downloads encrypted files from the URLs, and extracts and executes their content.
On April 3, the attackers started using a new URL leading to an archived executable file. To evade detection by security solutions, they padded the executable with many zeros, preventing its scanning.
“The results of our analysis of this malware suggest that the malware contains similarities to the ‘Keyzetsu clipper’ malware, a relatively new addition to the growing list of crypto wallet clippers commonly distributed through pirated software,” Checkmarx says.
The malware attempts to achieve persistence using a scheduled task pointing to a shortcut to the executable file.
According to Checkmarx, the campaign has been successful, with numerous malicious repositories receiving complaints from the infected users.
“In the aftermath of the XZ attack and many other recent incidents, it would be irresponsible for developers to rely solely on reputation as a metric when using open source code. These incidents highlight the necessity for manual code reviews or the use of specialized tools that perform thorough code inspections for malware,” Checkmarx notes.
Related: Cyber Insights 2024: Supply Chain
Related: Eight Vulnerabilities Disclosed in the AI Development Supply Chain
Related: New Class of CI/CD Attacks Could Have Led to PyTorch Supply Chain Compromise