Home > Software Quality Tips > Application Security Strategies > What to do after penetration testing: source code analysis
Software Quality Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

APPLICATION SECURITY STRATEGIES

What to do after penetration testing: source code analysis


Kevin Beaver, CISSP
08.22.2007
Rating: -4.50- (out of 5)


Software quality news and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Kevin Beaver

You've done your automated scans and manual analysis of your Web sites. Penetration testing is complete. Traditional logic says stop there and wait until next month or quarter for the next round of testing. That's made pretty good sense…until now. If you're like most security professionals, developers and QA analysts, the last thing you want to do is add another task to your already over-filled plate. That is especially true for a task you assume is going to take hours -- if not days -- to complete and, in turn, is going to generate that much more work.

I've always been skeptical about what the marketing machine puts out and thus was one of those reluctant people not really buying into the value of source code analysis. I've been proven wrong. These tools really do work.

Based on my experience, the results that are generated by source code analysis tools are equally valuable for developers and security professionals. Figure 1 shows an OWASP Top Ten report of a source code analysis performed by Compuware's DevPartner's SecurityChecker.

Figure 1: SecurityChecker's OWASP Top Ten analysis report

A big plus with the source code analysis tools that I've used is that they don't generate gobs of useless information that doesn't add much value. Instead, they've found a relatively small number of pinpointed issues with only a few false positives sprinkled in. They not only find what's vulnerable but also provide real-world solutions for fixing the problems. The neat thing is that these tools find security-related flaws that have made both developers and QA testers say things like, "Very interesting; I haven't thought about that."

Performing a source code analysis -- be it static analysis or run-time analysis (some tools do both) -- is actually pretty easy. Once you get your tool setup (which typically integrates into Visual Studio, Eclipse or the like), you simply load up your project files, start the analysis and off it goes. Klockwork's toolbar integration into Microsoft's Visual Studio 2005 is shown in Figure 2.

Figure 2: Klocwork for C/C++ toolbar integrates directly into Visual Studio

This allows the person doing the testing to work with everything -- source code, analysis tool and reporting -- all within one interface. Along the same lines, SPI Dynamics has a tool called DevInspect that developers can use to analyze their source code in Visual Studio as they go along before it actually goes into QA and production. I like how most source code analysis tools are tailored for specific users (i.e. security professionals, developers or QA/testers). This helps facilitate the process at the various testing levels and best suits the people who are performing the analysis.

The time required to run a source code analysis depends on several factors, including the number of lines of code, processor speed and memory available. In my experience, it's has taken 10 to 15 minutes tops. Some naysayers argue that manual analysis of every line of code is required to do it right. More power to them. Most of us have way too many other things to do with our time anyway. I'm convinced that it's neither efficient nor effective for a human being to look at tons of code attempting to find security defects. Given the complexity and size of most modern day applications, automated analysis is the way to go.

The downside to source code analysis is that certain tools I've used can be a beast to set up, especially if you're analyzing managed code such as .NET that requires IIS on the local machine and other dependencies that you may or may not have installed. This isn't a big deal for developers and QA folks, since they typically have all the tools they need on their local machine. However, security professionals often do not have the same software running and ready, which can add some extra time and effort to the process.

More information on source code analysis
How source code analysis improves application security

Book excerpt: Static Analysis as Part of the Code Review Process

Application security defense in depth: Strategies to lock down your Web apps

One source code analysis experience I had involved about a day getting the software installed and working properly and about 20 minutes of running the actual analysis and creating the report. Luckily, I've had good luck with technical support from the various vendors when issues came up. As always, though, documentation is lacking. Don't let any potential setup problems deter you from taking the plunge into source code analysis. The benefits are far ahead of any inconveniences.

One thing I've found in security over the years is that the often-overused concept of a layered defense really works. Adding ongoing source code analysis to your arsenal can serve as yet another security layer for your applications. It will make a difference. You're going to find vulnerabilities that aren't easily uncovered using penetration testing but can be exploited by a malicious attacker nonetheless.

From security auditors to Web administrators to development managers, the benefits of source code analysis are huge for everyone involved. In the end, your organization and/or your customers will be running software of higher quality and management can be assured that you're taking the next big step forward down the path of reducing business risks.

-----------------------------------------
About the author: Kevin Beaver is an independent information security consultant, speaker, and expert witness with Atlanta-based Principle Logic LLC. Kevin has authored/co-authored six books on information security including Hacking For Dummies and Hacking Wireless Networks For Dummies (Wiley) as well as The Practical Guide to HIPAA Privacy and Security Compliance (Auerbach). He's also the creator of the Security On Wheels series of audiobooks. Kevin can be reached at kbeaver@principlelogic.com.


Rate this Tip
To rate tips, you must be a member of SearchSoftwareQuality.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Application Security Strategies
Web server weaknesses you don't want to overlook
Rich Internet applications security testing checklist
The lowdown on PCI compliance
Web 2.0 application security troubleshooting, testing tutorial
Expert resolves issues plaguing OpenSTA users
Fixing four Web 2.0 input validation security mistakes
Social engineering training could disrupt botnet growth
Web security problems: Five ways to stop login weaknesses
Preparing for testing applications in the cloud
The role of quality assurance (QA) pros in software security

Software security testing tools
Beating software's cross-site scripting, authentication problems
Free tools for Agile testers
Put a stop to software espionage by watermarking source code
How to make your software tamperproof
How can I tell if my software security has been breached?
Lesser-known free software testing tools testers should try
Demo: Using WebGoat, a free software testing tool
Rich Internet applications security testing checklist
Finding cross-site scripting (XSS) application flaws checklist
Webgoat Tutorial

Source code analysis
Static analysis tool helps software engineers find bugs during builds
Eight reasons to do source code analysis on your Web application
How static analysis can improve software security
Static Analysis as Part of the Code Review Process -- Chapter 3, Secure Programming with Static Analysis
How source code analysis improves application security
Source code analysis part of DoD's app security plan
Code analysis: Which tool is right for you?
Application security increased by static and dynamic code analysis

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
penetration testing  (SearchSoftwareQuality.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Software Design & Testing - Project Management
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2006 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts