Risk
5/30/2013
09:26 AM
Connect Directly
RSS
E-Mail
50%
50%

Ruby On Rails Under Attack

Patched vulnerability being exploited in the wild after many developers don't bother to patch

The bad news: A critical flaw affecting the Ruby on Rails Web application framework is being exploited in the wild. The good news: The vulnerability was patched in January. However, there are those out there who have apparently failed to apply the patch for CVE-2013-0156.

"It's not surprising in the slightest that many people have not patched the exposed vulnerability of Ruby on Rails," says Tod Beardsley, Metasploit engineering manager at Rapid7. "Rails has a generally good reputation and an infrequent security patch schedule; therefore, people aren't used to worrying over it like they might be with other software packages. Rails developers, in particular, are typically not IT operations people and are usually unconcerned with the security of Rails itself; they are typically Web application developers and may or may not pay attention to security mailing lists."

Reports of an exploit targeting the issue surfaced on discussion boards in recent days, and security researcher Jeff Jarmoc outlined how the exploit works. According to Jarmoc, the exploit adds a command to crontab and executes commands, downloading and executing a C source file from a remote server. The malware then connects to an IRC server, joins the #rails channel, and awaits commands. The command-and-control servers are all down.

"Functionality is limited, but includes the ability to download and execute files as commanded, as well as changing servers," Jarmoc blogged. "There's no authentication performed, so an enterprising individual could hijack these bots fairly easily by joining the IRC server and issuing the appropriate commands."

"In short, this is a pretty straightforward skiddy exploit of a vulnerability that has been publicly known, and warned about, for months," he wrote.

The vulnerability at the center of the attacks was discovered in the JSON code for Ruby on Rails 3.0 and 2.3, and can be exploited to allow attackers to bypass authentication, inject arbitrary SQL commands, execute arbitrary code, or cause a denial-of-service condition.

If the application owner cannot upgrade or patch, the application itself can be harden to prohibit XML parameters or prohibit the parameter conversions that caused the particular problem -- YAML and Symbol, explains Qualys CTO Wolfgang Kandek.

"We have seen a great adoption rate for Ruby on Rails, and unfortunately not all of its users keep a close eye on vulnerabilities for that software," he says. "Small companies without dedicated security teams and hobbyists are probably the biggest sinners here -- they are focused on programming an Internet-connected service or site, but are not really looking at all the underlying system administration tasks, such as keeping OS and the rest of the software stack updated."

Rails developers tend to lock in on certain "known good" versions of Rails and actively resist updating without significant testing effort, says Beardsley.

"This brings stability to the underlying Web application since changes to Rails may bring API changes along with it, which can break functionality," he explains. "However, it's a bad habit to have when it comes to security patches. Rails patches are publicized primarily through a dedicated Google Group. While this particular vulnerability announcement has netted 74,000 views so far, the typical post to this low-traffic group sees anywhere between 2,000 and 15,000 views."

Have a comment on this story? Please click "Add Your Comment" below. If you'd like to contact Dark Reading's editors directly, send us a message. Brian Prince is a freelance writer for a number of IT security-focused publications. Prior to becoming a freelance reporter, he worked at eWEEK for five years covering not only security, but also a variety of other subjects in the tech industry. Before that, he worked as a ... View Full Bio

Comment  | 
Print  | 
More Insights
Register for Dark Reading Newsletters
Partner Perspectives
What's This?
In a digital world inundated with advanced security threats, Intel Security seeks to transform how we live and work to keep our information secure. Through hardware and software development, Intel Security delivers robust solutions that integrate security into every layer of every digital device. In combining the security expertise of McAfee with the innovation, performance, and trust of Intel, this vision becomes a reality.

As we rely on technology to enhance our everyday and business life, we must too consider the security of the intellectual property and confidential data that is housed on these devices. As we increase the number of devices we use, we increase the number of gateways and opportunity for security threats. Intel Security takes the “security connected” approach to ensure that every device is secure, and that all security solutions are seamlessly integrated.
Featured Writers
White Papers
Cartoon
Current Issue
Dark Reading's October Tech Digest
Fast data analysis can stymie attacks and strengthen enterprise security. Does your team have the data smarts?
Flash Poll
Video
Slideshows
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2013-0334
Published: 2014-10-31
Bundler before 1.7, when multiple top-level source lines are used, allows remote attackers to install arbitrary gems by creating a gem with the same name as another gem in a different source.

CVE-2014-2334
Published: 2014-10-31
Multiple cross-site scripting (XSS) vulnerabilities in the Web User Interface in Fortinet FortiAnalyzer before 5.0.7 allow remote attackers to inject arbitrary web script or HTML via unspecified vectors, a different vulnerability than CVE-2014-2336.

CVE-2014-2335
Published: 2014-10-31
Multiple cross-site scripting (XSS) vulnerabilities in the Web User Interface in Fortinet FortiManager before 5.0.7 allow remote attackers to inject arbitrary web script or HTML via unspecified vectors, a different vulnerability than CVE-2014-2336.

CVE-2014-2336
Published: 2014-10-31
Multiple cross-site scripting (XSS) vulnerabilities in the Web User Interface in Fortinet FortiManager before 5.0.7 and FortiAnalyzer before 5.0.7 allow remote attackers to inject arbitrary web script or HTML via unspecified vectors, a different vulnerability than CVE-2014-2334 and CVE-2014-2335.

CVE-2014-3366
Published: 2014-10-31
SQL injection vulnerability in the administrative web interface in Cisco Unified Communications Manager allows remote authenticated users to execute arbitrary SQL commands via a crafted response, aka Bug ID CSCup88089.

Best of the Web
Dark Reading Radio
Archived Dark Reading Radio
Follow Dark Reading editors into the field as they talk with noted experts from the security world.