Security Experts:

NetBeans Projects on GitHub Targeted in Apparent Supply Chain Attack

GitHub revealed on Thursday that tens of open source NetBeans projects hosted on its platform were targeted by a piece of malware as part of what appears to be a supply chain attack.

GitHub learned about the malware, which has been named Octopus Scanner, on March 9 from a security researcher who noticed that several repositories hosted on GitHub had been serving malware, likely without their owners’ knowledge.

An analysis led to the discovery of 26 affected NetBeans projects that had been backdoored. The malware is designed to add malicious code to both project files and newly created JAR files. JAR files got infected with a dropper whose payload was designed to ensure persistence and spawn a remote administration tool (RAT). A RAT is delivered to both UNIX-like and Windows systems.

The malware is also designed to prevent new project builds from replacing ones that have already been infected.

When GitHub analyzed the malicious files in March — the company identified four samples — they were only detected by a handful of antimalware engines on VirusTotal. The detection rate has increased since then, but it’s currently still at only 20/60.

Open source projects such as the ones targeted by Octopus Scanner can get cloned, forked and used by many others, enabling the malware to spread even more, the company warned.

“Since the primary-infected users are developers, the access that is gained is of high interest to attackers since developers generally have access to additional projects, production environments, database passwords, and other critical assets. There is a huge potential for escalation of access, which is a core attacker objective in most cases,” GitHub said.

The fact that the malware specifically targets NetBeans projects is interesting considering that there are other, more popular Java IDEs.

“If malware developers took the time to implement this malware specifically for NetBeans, it means that it could either be a targeted attack, or they may already have implemented the malware for build systems such as Make, MsBuild, Gradle and others as well and it may be spreading unnoticed,” GitHub noted.

The company has pointed out that it provides several features that can help maintain the integrity and security of the open source software supply chain, and it has promised to continue making improvements.

GitHub warned developers last month that their accounts may have been compromised as a result of a sophisticated phishing campaign.

Related: New GitHub Security Lab Aims to Secure Open Source Software

Related: GitHub Adds New Tools to Help Developers Secure Code

Related: New GitHub Features Help Find Vulnerabilities and Secrets in Code

view counter
Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.