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
White Papers
Cartoon
Current Issue
Flash Poll
Video
Slideshows
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2014-3352
Published: 2014-08-30
Cisco Intelligent Automation for Cloud (aka Cisco Cloud Portal) 2008.3_SP9 and earlier does not properly consider whether a session is a problematic NULL session, which allows remote attackers to obtain sensitive information via crafted packets, related to an "iFrame vulnerability," aka Bug ID CSCuh...

CVE-2014-3908
Published: 2014-08-30
The Amazon.com Kindle application before 4.5.0 for Android does not verify X.509 certificates from SSL servers, which allows man-in-the-middle attackers to spoof servers and obtain sensitive information via a crafted certificate.

CVE-2010-5110
Published: 2014-08-29
DCTStream.cc in Poppler before 0.13.3 allows remote attackers to cause a denial of service (crash) via a crafted PDF file.

CVE-2012-1503
Published: 2014-08-29
Cross-site scripting (XSS) vulnerability in Six Apart (formerly Six Apart KK) Movable Type (MT) Pro 5.13 allows remote attackers to inject arbitrary web script or HTML via the comment section.

CVE-2013-5467
Published: 2014-08-29
Monitoring Agent for UNIX Logs 6.2.0 through FP03, 6.2.1 through FP04, 6.2.2 through FP09, and 6.2.3 through FP04 and Monitoring Server (ms) and Shared Libraries (ax) 6.2.0 through FP03, 6.2.1 through FP04, 6.2.2 through FP08, 6.2.3 through FP01, and 6.3.0 through FP01 in IBM Tivoli Monitoring (ITM)...

Best of the Web
Dark Reading Radio
Archived Dark Reading Radio
This episode of Dark Reading Radio looks at infosec security from the big enterprise POV with interviews featuring Ron Plesco, Cyber Investigations, Intelligence & Analytics at KPMG; and Chris Inglis & Chris Bell of Securonix.