Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Vulnerabilities / Threats

5/28/2020
05:25 PM
Connect Directly
Twitter
LinkedIn
Google+
RSS
E-Mail
50%
50%

GitHub Supply Chain Attack Uses Octopus Scanner Malware

Octopus Scanner is a new malware used to compromise 26 open source projects in a massive GitHub supply chain attack.

On March 9, the GitHub Security Incident Response Team (SIRT) received a message from security researcher JJ, who had discovered a set of GitHub repositories actively serving malware. A deep-dive analysis of the malware revealed it was built to compromise NetBeans projects, something they hadn't seen before on GitHub. All affected projects were actively serving backdoored code, and the owners of these repositories were completely unaware of it.

Nico Waisman, head of GitHub Security Lab, says the first step in their investigation was to identify whether the campaign was still active. Once the critical assessment was complete and they learned the command-and-control (C2) server was not active, they were able to reduce the risk level and take a closer look at Octopus Scanner, an open source supply chain malware.

"The unique feature around this malware is that it is targeting developers as the means of spreading," Waisman explains. "Once the computer gets infected, it looks for NetBeans files to infect." While GitHub users, as developers, should be concerned about this malware using developers for propagation, Waisman notes this particular technique is "extremely rare."

When Octopus Scanner lands on a machine, it looks for signs indicating the NetBeans IDE is in use on a developer's system, GitHub security researcher Alvaro Muñoz explains in a blog post on their findings. If it doesn't find anything, the malware takes no action. If it does, it ensures that every time a project is built, any resulting JAR files are infected with a dropper. When executed, the payload ensures persistence and spreads a remote access Trojan (RAT), which connects to C2 servers.

The malware continues to spread by infecting NetBeans projects, or JAR files. This way, it backdoors healthy projects so when developers release code to the public, it contains malware. The goal of Octopus Scanner is to insert backdoors into artifacts built by NetBeans so the attacker can use these resources as part of the C2 server, Waisman says.

"When the end user deploys the workload, they have given the attacker access via the backdoor to their resources for use as part of a command-and-control server," he adds.

Octopus Scanner also tries to prevent any new project builds from replacing the infected one. This ensures the malicious build components remain in place. While researching the infected repositories, GitHub found four different versions of affected NetBeans projects. All but one of them, a downstream system, would get infected either by building from an infected repository or by using any of the compromised artifacts that came from an infected build, Muñoz wrote. 

"Infecting build artifacts is a means to infect more hosts since the infected project will most likely get built by other systems and the build artifacts will probably be loaded and executed on other systems as well," he explains in the blog post.

It is interesting the attackers specifically chose to target the NetBeans build process, especially because it's not the most common Java IDE. This could indicate a targeted attack, Muñoz says, or they may have already implemented the malware for build systems like Make, MsBuild, or Gradle, and it could be spreading unnoticed.

Supply Chain Threats: What You Should Know
Developers and companies are growing more reliant on open source code, Waisman says. Open source is easy for developers, meaning it's also easy for adversaries. Attackers are pursuing supply chain compromises because they can have widespread reach: a single attack can give them access to multiple targets. And as Muñoz points out, malware that abuses the build process and its resulting artifacts is "both interesting and concerning" for several reasons. 

In an open source context, this gives the malware an effective means of spreading. The infected projects will likely be cloned and used on different systems, and the artifacts of the builds may spread even further, making it harder to track down.

Because the primary users of these repositories are developers, a successful intrusion could give attackers access to the same resources that developers use. These may include additional passwords, production environments, database passwords, and other sensitive assets, he adds.

While supply chain compromises like this are scary, Waisman says they remain rare.

"The primary issue in supply chain security is unpatched software," he explains. "It's much easier for an attacker to take advantage of an unpatched, known vulnerability in a dependency than to insert a new vulnerability into your code."

For developers, the challenge is knowing their dependencies and knowing when they need to be patched. GitHub aims to help with this through Dependency Graph, which helps users better understand their projects' dependencies and provides security alerts when a dependency has a vulnerability, he says. For open source maintainers, the challenge is in preventing issues and responding when necessary. On GitHub, maintainers can create a security.md file with their reporting and disclosure policy, create fixes when needed, and publish security advisories. 

"Ultimately, this is about surfacing, coordinating, and sharing information between multiple parties, including developers, open source maintainers, security researchers, and enterprises," Waisman says.

Related Content:

 

 
 
 
 
 
 
Learn from industry experts in a setting that is conducive to interaction and conversation about how to prepare for that "really  bad day" in cybersecurity. Click for more information and to register
Kelly Sheridan is the Staff Editor at Dark Reading, where she focuses on cybersecurity news and analysis. She is a business technology journalist who previously reported for InformationWeek, where she covered Microsoft, and Insurance & Technology, where she covered financial ... View Full Bio
 

Recommended Reading:

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
COVID-19: Latest Security News & Commentary
Dark Reading Staff 7/14/2020
Omdia Research Launches Page on Dark Reading
Tim Wilson, Editor in Chief, Dark Reading 7/9/2020
Russian Cyber Gang 'Cosmic Lynx' Focuses on Email Fraud
Kelly Sheridan, Staff Editor, Dark Reading,  7/7/2020
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
Special Report: Computing's New Normal, a Dark Reading Perspective
This special report examines how IT security organizations have adapted to the "new normal" of computing and what the long-term effects will be. Read it and get a unique set of perspectives on issues ranging from new threats & vulnerabilities as a result of remote working to how enterprise security strategy will be affected long term.
Flash Poll
The Threat from the Internetand What Your Organization Can Do About It
The Threat from the Internetand What Your Organization Can Do About It
This report describes some of the latest attacks and threats emanating from the Internet, as well as advice and tips on how your organization can mitigate those threats before they affect your business. Download it today!
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2020-6287
PUBLISHED: 2020-07-14
SAP NetWeaver AS JAVA (LM Configuration Wizard), versions - 7.30, 7.31, 7.40, 7.50, does not perform an authentication check which allows an attacker without prior authentication to execute configuration tasks to perform critical actions against the SAP Java system, including the ability to create a...
CVE-2020-6289
PUBLISHED: 2020-07-14
SAP Disclosure Management, version 10.1, had insufficient protection against Cross-Site Request Forgery, which could be used to trick user in to browsing malicious site.
CVE-2020-6290
PUBLISHED: 2020-07-14
SAP Disclosure Management, version 10.1, is vulnerable to Session Fixation attacks wherein the attacker tricks the user into using a specific session ID.
CVE-2020-6291
PUBLISHED: 2020-07-14
SAP Disclosure Management, version 10.1, session mechanism does not have expiration data set therefore allows unlimited access after authenticating once, leading to Insufficient Session Expiration
CVE-2020-6292
PUBLISHED: 2020-07-14
Logout mechanism in SAP Disclosure Management, version 10.1, does not invalidate one of the session cookies, leading to Insufficient Session Expiration.