Derailed: Hackers Exploit Months Old Rails Flaw
Users and administrators of Ruby-On-Rails sites are finding themselves being targeted by malware that exploits a Ruby vulnerability publicized in January 2013. Once exploited, unpatched systems are directed download specific code from a remote computer that will cause the system to compile an Internet Relay Chat (IRC) client to join a specific channel and await further instructions. These attacks provide a sharp reminder on the importance of prompt patch deployment as lax security policies are exposed.
There are multiple weaknesses in the parameter parsing code for Ruby on Rails which allows attackers to bypass authentication systems, inject arbitrary SQL, inject and execute arbitrary code, or perform a DoS attack on a Rails application.
Coinciding with this announcement, Patterson’s description of the flaw provided information on where to obtain the patches that were available for multiple Rails versions. Yet 4 months later it seems many sites remain unpatched and vulnerable. Affected users have voiced their frustration as their systems become infected. Security blogger Jeff Jarmoc has provided a detailed walkthrough of this current exploit, which includes source code for the program that the infected system runs to receive instructions through IRC.
Users wishing to see if their server is vulnerable can try Tinfoil Security’s Railscheck. The Code Climate Blog has explained how the original flaw worked and provides a proof of concept for those seeking more details.