Metasploit: Serialization Mischief in Ruby Land… # sploitz on railz, oh my… #security #rails /ht @hdmoore

This afternoon a particularly scary advisory was posted to the Ruby on Rails (RoR) security discussion list. The summary is that the XML processor in RoR can be tricked into decoding the request as a YAML document or as a Ruby Symbol, both of which can expose the application to remote code execution or SQL injection. A gentleman by the name of Felix Wilhelm went into detail on how the vulnerability works, but stopped short of providing a working proof of concept. These kinds of bugs are close to my heart, as Metasploit itself is written in Ruby, and we use Ruby on Rails within the Metasploit Community, Express, and Pro user interfaces.

We marshaled the troops and released a security update for Metasploit users (2013010901), updated all of our own RoR applications with the workaround, and started digging into the vulnerability itself.

Ben M. Murphy, a researcher working on this issue, claims that this can lead to direct system command execution in all Ruby on Rails web applications. If this pans out, this would put thousands of production web sites at risk of remote compromise. Mr Murphy has not released his exploit code for the issue, but Felix’s blog post provided enough information to start poking at the vulnerability.

To demonstrate the issue…

continues

Leave a Reply