Risk
5/30/2013
09:26 AM
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
Dark Reading December Tech Digest
Experts weigh in on the pros and cons of end-user security training.
Flash Poll
Video
Slideshows
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2014-5395
Published: 2014-11-21
Multiple cross-site request forgery (CSRF) vulnerabilities in Huawei HiLink E3276 and E3236 TCPU before V200R002B470D13SP00C00 and WebUI before V100R007B100D03SP01C03, E5180s-22 before 21.270.21.00.00, and E586Bs-2 before 21.322.10.00.889 allow remote attackers to hijack the authentication of users ...

CVE-2014-7137
Published: 2014-11-21
Multiple SQL injection vulnerabilities in Dolibarr ERP/CRM before 3.6.1 allow remote authenticated users to execute arbitrary SQL commands via the (1) contactid parameter in an addcontact action, (2) ligne parameter in a swapstatut action, or (3) project_ref parameter to projet/tasks/contact.php; (4...

CVE-2014-7871
Published: 2014-11-21
SQL injection vulnerability in Open-Xchange (OX) AppSuite before 7.4.2-rev36 and 7.6.x before 7.6.0-rev23 allows remote authenticated users to execute arbitrary SQL commands via a crafted jslob API call.

CVE-2014-8090
Published: 2014-11-21
The REXML parser in Ruby 1.9.x before 1.9.3 patchlevel 551, 2.0.x before 2.0.0 patchlevel 598, and 2.1.x before 2.1.5 allows remote attackers to cause a denial of service (CPU and memory consumption) a crafted XML document containing an empty string in an entity that is used in a large number of nes...

CVE-2014-8469
Published: 2014-11-21
Cross-site scripting (XSS) vulnerability in Guests/Boots in AdminCP in Moxi9 PHPFox before 4 Beta allows remote attackers to inject arbitrary web script or HTML via the User-Agent header.

Best of the Web
Dark Reading Radio
Archived Dark Reading Radio
Now that the holiday season is about to begin both online and in stores, will this be yet another season of nonstop gifting to cybercriminals?