<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><!--Generated by Squarespace Site Server v5.7.2 (http://www.squarespace.com/) on Mon, 26 Oct 2009 12:39:53 GMT--><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Ruby on Rails Security Project</title><link>http://www.rorsecurity.info/journal/</link><description /><lastBuildDate>Fri, 04 Sep 2009 11:24:15 +0000</lastBuildDate><copyright /><language>en-US</language><generator>Squarespace Site Server v5.7.2 (http://www.squarespace.com/)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/RubyOnRailsSecurity" type="application/rss+xml" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">RubyOnRailsSecurity</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><title>Two vulnerabilities fixed in Rails 2.3.4</title><dc:creator>Heiko</dc:creator><pubDate>Fri, 04 Sep 2009 11:11:49 +0000</pubDate><link>http://www.rorsecurity.info/journal/2009/9/4/two-vulnerabilities-fixed-in-rails-234.html</link><guid isPermaLink="false">280802:2845483:5081551</guid><description>&lt;p&gt;Rails version 2.3.4 has been released to fix two vulnerabilities.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;a href="http://weblog.rubyonrails.org/2009/9/4/timing-weakness-in-ruby-on-rails"&gt;timing weakness&lt;/a&gt; in the ClientCookieStore. Rails version 2.1.0 and all subsequent versions are affected. Detailed information c&lt;a href="http://codahale.com/a-lesson-in-timing-attacks/"&gt;an be found here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;And a &lt;a href="http://weblog.rubyonrails.org/2009/9/4/xss-vulnerability-in-ruby-on-rails"&gt;XSS vulnerability&lt;/a&gt; in the way Rails handles Unicode. This affects all versions in the Rails 2 branch, but not applications running with Ruby 1.9.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Upgrade to &lt;a href="http://weblog.rubyonrails.org/2009/9/4/ruby-on-rails-2-3-4"&gt;version 2.3.4 now&lt;/a&gt;, or apply a patch (available on the pages linked above).&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyOnRailsSecurity/~4/NRRAE3B4P_E" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rorsecurity.info/journal/rss-comments-entry-5081551.xml</wfw:commentRss></item><item><title>DoS vulnerability in BigDecimal</title><dc:creator>Heiko</dc:creator><pubDate>Wed, 10 Jun 2009 07:40:00 +0000</pubDate><link>http://www.rorsecurity.info/journal/2009/6/10/dos-vulnerability-in-bigdecimal.html</link><guid isPermaLink="false">280802:2845483:4254255</guid><description>&lt;p&gt;A Denial of Service (DoS) vulnerability was found in the BigDecimal standard Ruby library. An attacker could cause a segmentation fault and crash the Ruby interpreter. This is due to the BigDecimal method mishandling certain large values. Almost every Rails application is vulnerable to this because ActiveRecord relies on this method.&lt;/p&gt;
&lt;p&gt;You are advised &lt;a href="http://www.ruby-lang.org/en/news/2009/06/09/dos-vulnerability-in-bigdecimal/"&gt;to update your Ruby&lt;/a&gt; installation. There is a temporary fix on &lt;a href="http://github.com/NZKoz/bigdecimal-segfault-fix/tree/master"&gt;Github&lt;/a&gt;. This fix breaks valid formats supported by BigDecimal, so you are advised to plan migrating to a new Ruby version.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyOnRailsSecurity/~4/i2yed6L8Onw" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rorsecurity.info/journal/rss-comments-entry-4254255.xml</wfw:commentRss></item><item><title>Vulnerability in Rails 2.3 HTTP Authentication</title><dc:creator>Heiko</dc:creator><pubDate>Thu, 04 Jun 2009 12:57:15 +0000</pubDate><link>http://www.rorsecurity.info/journal/2009/6/4/vulnerability-in-rails-23-http-authentication.html</link><guid isPermaLink="false">280802:2845483:4188096</guid><description>&lt;p&gt;There has been a security vulnerability in Rails in the HTTP digest authentication in Rails 2.3. That way someone can authenticate without any user name and password. The HTTP &lt;span style="text-decoration: underline;"&gt;basic&lt;/span&gt; authentication seems to be not vulnerable to this problem.&lt;/p&gt;
&lt;p&gt;The problem arises in the authenticate_or_request_with_http_digest method which will proceed even if the user name check returns nil.&lt;/p&gt;
&lt;p&gt;You can find out more, including countermeasures at &lt;a href="http://n8.tumblr.com/post/117477059/security-hole-found-in-rails-2-3s" target="_blank"&gt;Nate's blog&lt;/a&gt; and the &lt;a href="http://weblog.rubyonrails.org/2009/6/3/security-problem-with-authenticate_with_http_digest" target="_blank"&gt;Rails weblog&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyOnRailsSecurity/~4/6AKsz5cDxC8" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rorsecurity.info/journal/rss-comments-entry-4188096.xml</wfw:commentRss></item><item><title>Hacking Ruby on Rails @ RailsWayCon09</title><dc:creator>Heiko</dc:creator><pubDate>Fri, 29 May 2009 12:14:24 +0000</pubDate><link>http://www.rorsecurity.info/journal/2009/5/29/hacking-ruby-on-rails-railswaycon09.html</link><guid isPermaLink="false">280802:2845483:4121012</guid><description>&lt;p&gt;I'm back from the nice RailsWayCon(ference) in Berlin. I did a session on Ruby on Rails Security, check out the slides:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div id="__ss_1505963" style="width: 425px; text-align: left;"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" title="Hacking Ruby on Rails at Railswaycon09" href="http://www.slideshare.net/heikowebers/hacking-ruby-on-rails-at-railswaycon09-1505963?type=powerpoint"&gt;Hacking Ruby on Rails at Railswaycon09&lt;/a&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=railswaycon09presentation-090529071741-phpapp01&amp;rel=0&amp;stripped_title=hacking-ruby-on-rails-at-railswaycon09-1505963" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=railswaycon09presentation-090529071741-phpapp01&amp;rel=0&amp;stripped_title=hacking-ruby-on-rails-at-railswaycon09-1505963" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyOnRailsSecurity/~4/ofx0RYd5f00" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rorsecurity.info/journal/rss-comments-entry-4121012.xml</wfw:commentRss></item><item><title>Securing A Website With Client SSL Certificates</title><dc:creator>Heiko</dc:creator><pubDate>Tue, 12 May 2009 12:57:51 +0000</pubDate><link>http://www.rorsecurity.info/journal/2009/5/12/securing-a-website-with-client-ssl-certificates.html</link><guid isPermaLink="false">280802:2845483:3957734</guid><description>&lt;p&gt;In the comments of the last article Morgan came up with the idea of &lt;strong&gt;client &lt;/strong&gt;SSL certificates to secure the admin panel. This is not authentication in a classical sense, it is saying which SSL certificates (which you self-signed) you allow to access a particular site. This is a better solution than limiting the access to various IP adresses when you are a work nomad and you have to access it from different parts in the world.&lt;/p&gt;
&lt;p&gt;The steps to do this are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Setup OpenSSL to become a Certificate Authority (CA)&lt;/li&gt;
&lt;li&gt;Create a root CA key&lt;/li&gt;
&lt;li&gt;Create a key for the (sub)domain in question&lt;/li&gt;
&lt;li&gt;Setup your web server&lt;/li&gt;
&lt;li&gt;Create a client certificate and install it in your browser&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href="http://it.toolbox.com/blogs/securitymonkey/howto-securing-a-website-with-client-ssl-certificates-11500" target="_blank"&gt;Here is the HOWTO: Securing A Website With Client SSL Certificates&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyOnRailsSecurity/~4/0MWWuPh-bIg" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rorsecurity.info/journal/rss-comments-entry-3957734.xml</wfw:commentRss></item><item><title>[WebAppSec] Twitter's admin panel compromised</title><dc:creator>Heiko</dc:creator><pubDate>Fri, 01 May 2009 12:19:42 +0000</pubDate><link>http://www.rorsecurity.info/journal/2009/5/1/webappsec-twitters-admin-panel-compromised.html</link><guid isPermaLink="false">280802:2845483:3858248</guid><description>&lt;p&gt;One of the best known Rails application, Twitter, was compromised very recently. A French &lt;a href="http://www.korben.info/twitter-vu-de-linterieur-interface-admin-piratee.html" target="_blank"&gt;hacker&lt;/a&gt; &lt;a href="http://blogs.zdnet.com/security/?p=3292" target="_blank"&gt;claimed&lt;/a&gt; that he gained access to Twitter's admin panel at https://admin.twitter.com/. Twitter &lt;a href="http://blog.twitter.com/2009/04/unauthorized-access-update-on-security.html" target="_blank"&gt;confirmed&lt;/a&gt; that an outside individual gained access to details of several accounts, including accounts from Ashton Kutcher, Lily Allen, Britney Spears and Barack Obama.&lt;/p&gt;
&lt;p&gt;It seems that the hacker gained access to a Yahoo Mail account of a Twitter employee by answering his "secret question" and thus he could reset the password and access his mail account. In one of the e-mails he found the Twitter administration password.&lt;/p&gt;
&lt;p&gt;Here is list of must-have security countermeasures for admin panels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Don't make the admin panel publicly available unless you really have to! It seems that admin.twitter.com was secured with a .htaccess file. I recommend to at least allow access only from several IP addresses.&lt;/li&gt;
&lt;li&gt;Don't make admin panels pretty, make sure they are Cross-Site Scripting and CSRF-safe! A simple message to the support panel containing Cross-Site Scripting is sometimes already enough to gain access to the panels.&lt;/li&gt;
&lt;li&gt;Forgotten passwords are a huge problem. Resetting it with a simple answer to an easy question is definitely not enough. Sending a password-reset URL to an e-mail address is currently one of the best solutions (but it isn't totally secure).&lt;/li&gt;
&lt;li&gt;It seems that everyone with access to the Twitter admin panel may do everything. Why can everyone download "emails to gzipped CSV file"? Why not require to re-enter another password for sensitive actions or use a role-based admin user model?&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sophos.com/blogs/gc/g/2009/05/01/twitter-security-breach-exposes-accounts-hackers/" target="_blank"&gt;Someone suggested&lt;/a&gt; using authentication tokens that provide a randomly generated key upon login&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://www.rorsecurity.info/journal/2008/3/3/intranet-and-admin-security.html"&gt;I wrote about this&lt;/a&gt; already a while ago.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyOnRailsSecurity/~4/oLkrfBe5O5Q" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rorsecurity.info/journal/rss-comments-entry-3858248.xml</wfw:commentRss></item><item><title>[Server] Nessus vulnerability scanner for networks and systems</title><dc:creator>Heiko</dc:creator><pubDate>Thu, 30 Apr 2009 13:34:09 +0000</pubDate><link>http://www.rorsecurity.info/journal/2009/4/30/server-nessus-vulnerability-scanner-for-networks-and-systems.html</link><guid isPermaLink="false">280802:2845483:3848472</guid><description>&lt;p&gt;&lt;span class="full-image-float-right ssNonEditable"&gt;&lt;span&gt;&lt;img style="width: 300px;" src="http://www.rorsecurity.info/storage/post-images/nessus.jpg?__SQUARESPACE_CACHEVERSION=1241098722370" alt="" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.tenablesecurity.com/solutions/" target="_blank"&gt;Tenable Network Security&lt;/a&gt; has announced the release of &lt;a href="http://www.nessus.org/nessus/" target="_blank"&gt;Nessus 4&lt;/a&gt; a short while ago. Nessus is a network vulnerability scanner that can be used to identify potential vulnerabilities in your systems and networks. You can use it to find open ports, unpatched software, configuration errors and possibly leaks of private data.&lt;br /&gt;&lt;br /&gt;The software package consists of a client and server. The server keeps the scanner plugins up to date and the client performs the actual scan.&lt;br /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download the package from the homepage (you need to provide your e-mail address)&lt;/li&gt;
&lt;li&gt;Install it, start the server program and download the newest scanner plugins&lt;/li&gt;
&lt;li&gt;After you started the server, you can connect to it from the client&lt;/li&gt;
&lt;li&gt;Add an IP address on the left side and add scanner types to the right side (choose all plugins for a start)&lt;/li&gt;
&lt;li&gt;&amp;bdquo;Scan now&amp;ldquo;: The scan takes about 5 minutes&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="http://www.nessus.org/download/" target="_blank"&gt;Nessus is available&lt;/a&gt; free of charge for non-enterprise and personal use. The commercial version (Professional Feed) costs $1,200 which you can evaluate for 15 days. Even a one-time check gives you a great overview of what a potential attacker would see.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyOnRailsSecurity/~4/pRzIODB-UbY" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rorsecurity.info/journal/rss-comments-entry-3848472.xml</wfw:commentRss></item><item><title>Hidden actions render templates</title><dc:creator>Heiko</dc:creator><pubDate>Fri, 24 Apr 2009 07:37:59 +0000</pubDate><link>http://www.rorsecurity.info/journal/2009/4/24/hidden-actions-render-templates.html</link><guid isPermaLink="false">280802:2845483:3783682</guid><description>&lt;p&gt;Sometimes you have to temporarely exclude actions from a controller or someone just forgot to remove legacy actions. The &lt;a href="http://api.rubyonrails.org/classes/ActionController/Base.html#M000617" target="_blank"&gt;hide_action method&lt;/a&gt; can be used in controllers to hide the given methods from being callable as actions. However, it &lt;a href="https://rails.lighthouseapp.com/projects/8994/tickets/2551-actioncontrollerbasehide_action-not-working-as-expected-when-template-exists" target="_blank"&gt;might not work as expected&lt;/a&gt;, because it still renders the template associated with it, but it doesn't call the code in the action method. This could be a security issue if the template contained only text or if it didn't throw errors on nil objects.&lt;/p&gt;
&lt;p&gt;Now, one could think that moving an action to the protected or private part of the controller solves the problem and hides the methods from being callable as actions. No, this is the same problem. The only way to actually hide actions is to remove them altogether or remove the route for it. Remember that there might be the standard route still in place.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyOnRailsSecurity/~4/ndnN6416y-M" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rorsecurity.info/journal/rss-comments-entry-3783682.xml</wfw:commentRss></item><item><title>Common Apache Misconception</title><dc:creator>Heiko</dc:creator><pubDate>Tue, 14 Apr 2009 12:16:27 +0000</pubDate><link>http://www.rorsecurity.info/journal/2009/4/14/common-apache-misconception.html</link><guid isPermaLink="false">280802:2845483:3640783</guid><description>&lt;p&gt;There is an interesting article over at &lt;a href="http://isc.sans.org/diary.html?storyid=6139" target="_blank"&gt;sans.org&lt;/a&gt; about a common Apache misconception. In Apache you usually have a configuration directive like this:&lt;/p&gt;
&lt;pre style="padding-left: 30px;"&gt;&lt;code&gt;LoadModule php4_module modules/libphp4.so &lt;br /&gt;AddType application/x-httpd-php .php&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;The misconception is about the .php part. It does not mean that it handles all files &lt;strong&gt;ending&lt;/strong&gt; with .php as PHP code. The .php part can be anywhere in the file name, as in: file.php.txt. The impact of this is that if you have this module enabled and someone uploads a file.php.txt, Apache will execute the PHP code in it. Of course this only happens when the upload directory is in the DocumentRoot of Apache.&lt;/p&gt;
&lt;p&gt;The original article has a &lt;a href="http://isc.sans.org/diary.html?storyid=6139" target="_blank"&gt;checklist about how to upload files&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyOnRailsSecurity/~4/ZtKD3ddad14" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rorsecurity.info/journal/rss-comments-entry-3640783.xml</wfw:commentRss></item><item><title>Ruby on Rails Security Podcast (German)</title><dc:creator>Heiko</dc:creator><pubDate>Mon, 30 Mar 2009 09:24:30 +0000</pubDate><link>http://www.rorsecurity.info/journal/2009/3/30/ruby-on-rails-security-podcast-german.html</link><guid isPermaLink="false">280802:2845483:3509256</guid><description>&lt;p&gt;I did a Ruby on Rails Security Podcast together with &lt;a href="http://thomasbaustert.de/blog/2009/3/16/heiko-webers-sicherheitsaspekte-von-rails-anwendungen" target="_blank"&gt;Thomas Baustert&lt;/a&gt; in German. We were talking about the most important security aspects of Rails web applications. &lt;a href="http://thomasbaustert.podspot.de/files/podcastonrails-de-02-sicherheitsaspekte-ruby-on-rails-heiko-webers.mp3" target="_blank"&gt;Download the podcast here directly&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyOnRailsSecurity/~4/DEPQWwBvivo" height="1" width="1"/&gt;</description><wfw:commentRss>http://www.rorsecurity.info/journal/rss-comments-entry-3509256.xml</wfw:commentRss></item></channel></rss>
