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.

Application Security

4/21/2020
12:25 PM
50%
50%

Attackers Aim at Software Supply Chain with Package Typosquatting

Attackers seed Ruby Gems repository with more than 760 malicious packages using names just a bit different than the standard code libraries.

Developers who make a simple typing mistake could find their systems compromised by malware in the latest attack on the software supply chain, say researchers at ReversingLabs, a software analysis platform provider.

The researchers analyzed the package repository for the Ruby language looking for code packages, known as Ruby Gems, submitted to the repository with names similar to existing baseline packages. They found more than 760 malicious Gems with similar names to legitimate packages had polluted the Ruby Gems repository.

The attack is similar to the typosquatting the company found in Python and the Node Package Manager repositories, says Robert Perica, principal engineer and threat analyst at ReversingLabs.

"Like other developers, when a developer mistypes a name and tries to download a package that does not exist, they expect an error that tells them that the package is not available," he says. "But malicious actors are taking advantage of typos and delivering malware instead."

The use of typosquatting to attempt to compromise developers' software and systems is a continuation of attacks on the software supply chain. In the past, developers mainly had to worry about keeping the packages they used up-to-date to close any vulnerabilities in their software. 

Over the past few years, however, companies that track open source software packages have noted that attackers have focused on the components that developers often use as the basis for their applications. In 2018, for example, a popular JavaScript package in the Node Package Manager (NPM) repository known as event-stream was compromised with Bitcoin-stealing code and remained undetected for more than two months.

"The presumed attacker ... reportedly offered to help maintain the library," said Danny Grander, co-founder and security lead at software-security firm Snyk, in an analysis of the incident. "Since adding libraries is a common practice, it's easy to see how the new library was not reviewed too carefully. Furthermore, the library appears to have performed the promised functionality."

Compromising an existing open source project is a long con that takes time, however. Typosquatting is much easier and does not require as many resources. The common attack typically focuses on creating file or domain names that are similar to common runtimes or destinations, respectively, in an attempt to catch infrequent typos. The strategy typically pays off when a large volume of requests are involved, making a low percentage mistake still amount to a reasonable number of potential victims.

In the early 2000s, for example, domain registrars began redirecting mistyped domains to their own landing pages — a move to which many privacy advocates, Internet service providers, and browser makers took exception. In 2008, Oliver Friedrichs, then a researcher for Symantec, warned that typosquatting could be used to capture sensitive emails. As an experiment, he registered 124 domains that had close spellings to US presidential candidates and found more than 1,100 connection attempts were sent to the mail handler for those domains.

In the latest case, two developer accounts submitted different misspelled version of RubyGems, such as "atlas-client" instead of the actual "atlas_client," according to ReversingLabs' analysis. The malicious component installed by the fake component infects the developer's system with persistent malware to replace any Bitcoin wallet address on the clipboard with the attacker's wallet address, Perica says.

While most popular more than a decade ago, Ruby continues to be a relevant programming language for back-end Web developers because it powers the Ruby on Rails application framework. The language ranked No. 8 out of all programming languages in May 2016, but it has since fallen to No. 13, according to the ranking maintained by TIOBE, a software quality firm. Developer-knowledge site StackOverflow places the language at No. 12 with about 8% of all developers using Ruby.

The attack against the Ruby Gems repository was fairly simple to spot because the attacker used portable executable files — not typically part of a Ruby Gem — and obvious names, such as "aaaa.png," for the file components. A sneakier attacker could make the malware more difficult to spot, Perica says. 

"It all depends on the level of caution that developers have in dealing with the package management frameworks," he says. "We have to practice due diligence as developers and expect mistakes to happen."

Related Content:

A listing of free products and services compiled for Dark Reading by Omdia analysts to help meet the challenges of COVID-19. 

 

Check out The Edge, Dark Reading's new section for features, threat data, and in-depth perspectives. Today's top story: "Cybersecurity Home-School: The Robot Project."

Veteran technology journalist of more than 20 years. Former research engineer. Written for more than two dozen publications, including CNET News.com, Dark Reading, MIT's Technology Review, Popular Science, and Wired News. Five awards for journalism, including Best Deadline ... 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/6/2020
Russian Cyber Gang 'Cosmic Lynx' Focuses on Email Fraud
Kelly Sheridan, Staff Editor, Dark Reading,  7/7/2020
Another COVID-19 Side Effect: Rising Nation-State Cyber Activity
Stephen Ward, VP, ThreatConnect,  7/1/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-15600
PUBLISHED: 2020-07-07
An issue was discovered in CMSUno before 1.6.1. uno.php allows CSRF to change the admin password.
CVE-2020-15599
PUBLISHED: 2020-07-07
Victor CMS through 2019-02-28 allows XSS via the register.php user_firstname or user_lastname field.
CVE-2020-8916
PUBLISHED: 2020-07-07
A memory leak in Openthread's wpantund versions up to commit 0e5d1601febb869f583e944785e5685c6c747be7, when used in an environment where wpanctl is directly interfacing with the control driver (eg: debug environments) can allow an attacker to crash the service (DoS). We recommend updating, or to res...
CVE-2020-12821
PUBLISHED: 2020-07-07
Gossipsub 1.0 does not properly resist invalid message spam, such as an eclipse attack or a sybil attack.
CVE-2020-15008
PUBLISHED: 2020-07-07
A SQLi exists in the probe code of all Connectwise Automate versions before 2020.7 or 2019.12. A SQL Injection in the probe implementation to save data to a custom table exists due to inadequate server side validation. As the code creates dynamic SQL for the insert statement and utilizes the user su...