Monday, May 10, 2010

Most Secure Programming Language?

An interesting report was released just the other day by WhiteHat Security.  The study took a look at 1700 websites (all WhiteHat sentinel customers) and reviewed security bug metrics to identify patterns in security posture based on the programming language used for the site.  The overall conclusion, as mentioned by Jerimiah Grossman at the OWASP Bay Area meeting, is that there is not necessarily one language that is the "most secure".

I would agree with this overall conclusion. The elements that determine if an application is secure is far more complex than simply the language that has been selected.  However, I would argue that some languages are more conducive to organized and easy to manage code that follows an MVC approach. Similarly some frameworks provide security controls that are enabled by default to aid in the security of an application.  However, framework and language selection are meaningless if security is not baked in to the entire application life cycle.

Here are the three primary findings from the report.
  • Empirically, programming languages / frameworks do not have similar security postures when deployed in the field. They are shown to have moderately different vulnerabilities, with different frequency of occurrence, which are fixed in different amounts of time.

  • The size of a Web application’s attack surface alone does not necessarily correlate to the volume and type of issues identified. For example Microsoft’s .NET (ASPX) and Struts (DO), with near-average attack surfaces, turned in the two lowest historical vulnerability averages. ASPX and DO websites have had an average of 18.7 and 19.9 serious vulnerabilities respectively.

  • Perl (PL) had the highest average number of vulnerabilities found historically by a wide margin, at 44.8 per website and also the largest number currently at 11.8.ties have taken over 50 days to fix.

The full report requires registration and can be viewed here

Here is a rebuttal to some of the claims made by the report: http://pinvoke.wordpress.com/2010/05/06/faulty-math/
 
As mentioned in the above link I encourage you to take these results with a grain of salt.  The data is gathered from existing WhiteHat sentinel customers and is obtained from an automated tool (technically it is automated discovery with manual verification).  The sample population is not necessarily a reflection of the critical web applications at large, nor is an automated tool able to fully analyze the security of a site. In fact, automated tools are often strong in the areas of input injection based attacks and weaker in areas of authentication, access control, session management and custom logic flaws.

If you are going to take away one item from this study then I hope it is this: there is no magic bullet or super secure programming language. If you want something good then you have to work hard for it.  Security is a continuing effort that requires the support of everyone involed (dev, QA, managers, etc) and must be an essential component of each step of the SDLC.

-Michael Coates

Wednesday, May 5, 2010

Hands-On Web Hacking

The best way to really understand application security is to learn about the issue and then perform the attacks yourself.  You could go through the trouble of building your own vulnerable testing application or you could use one that has already been built specifically for that purpose.  Here are a few to check out:

OWASP's Webgoat
Language: Java
Lesson format with hints and detailed solutions

Google's Jarlesburg
Language: Python
Lessons? Don't know, haven't tried it. Feedback please!


OWASP's Broken Web Application Project
A vmware image of multiple vulnerable web apps designed for testing and learning. The VM image is complete with necessary tools for immediate attacking fun



The only tool you will need is a web proxy and a browser:
Burp, WebScarab, or Fiddler
 


-Michael Coates

Tuesday, May 4, 2010

TLS Podcast Available Now

I've been talking a lot about SSL/TLS recently.  If you haven't already, please check out the slides from my talk at Thotcon on SSL Screw Ups.

Just the other day OWASP released the 2010 Top 10. In addition, the OWASP podcast series released a slew of podcasts on the Top 10 items.  Included in this release was my talk on OWASP Top 10 item 9 "Insufficient Transport Layer Protection".  This podcast closely follows the OWASP Transport Layer Protection Cheat Sheet which was created as a single source of TLS knowledge and recommendations.


Listen now!

Note: This was recorded a few months back before I made the big switch to Mozilla.  Just a heads up to avoid confusion.

-Michael Coates