In August 2009, SANS published their 20 Critical Security Controls, since then it has been revised and is currently at version 2.3. This list of 20 security controls covers common aspects of security including network, application, data, authorization, and others. The control that was most interesting to me was Control #7: Application Software Security. There's no doubt that application security is a mandatory requirement for secure organizations today and yet, I speak to organizations who have yet to implement or assign any technology or human resources to it. That being said, I will review some of the key points covered in Critical Control 7.
...both internally developed and third-party application software must be carefully tested to find security flaws. For third-party application software, enterprises should verify that vendors have conducted detailed security testing of their products. For in-house developed applications, enterprises must conduct such testing themselves or engage an outside firm to conduct such testing.Organizations should test in-house developed and third-party procured web and other application software for coding errors and malware insertion, including backdoors prior to deployment using automated static code analysis software. If source code is not available, these organizations should test compiled code using static binary analysis tools. In particular, input validation and output encoding routines of application software should be carefully reviewed and tested.
I am an advocate of secure code, but I am also a realist and readily admit that I don't believe fully secure exists. As hard as we might try to write secure code there is someone with more time and more to gain by finding ways around it. So, organizations should code applications as securely as possible, but never rely solely on that for application security. In the quotes above, SANS recommends several 3rd party tools to help identify weaknesses in code and I am in complete agreement that knowing where you're weaknesses exist is a step in the right direction toward securing those weaknesses. I think the most compelling argument against trusting secure code was also stated above and I will quote it again.
For third-party application software, enterprises should verify that vendors have conducted detailed security testing of their products.
How do you verify this? Who is willing to wait for 3rd party software vendors to fix web application code in their software? Will they fix it immediately or wait until the next patch or even the next release? How long must your organization accept an open public facing vulnerability? Do you take your application offline until it is fixed? Do secure coding tools or practices protect these applications in your production network? I think not.
Source code testing tools, web application security scanning tools, and object code testing tools have proven useful in securing application software, along with manual application security penetration testing by testers who have extensive programming knowledge as well as application penetration testing expertise.
As I said previously, some of the mentioned tools do help organizations move closer to application security. Knowing you have a problem is the first step in fixing it. I've recently worked closely with Web application vulnerability scanners. These tools are quite effective at finding vulnerabilities, but admittedly, have no solution to protect the issues that are found. Almost all of the vulnerability assessment vendors have or are beginning to partner with Imperva Inc. to automatically feed vulnerabilities into the SecureSphere Web Application Firewall and close the gap between the first step "Knowing you have a problem" and the final stage of solving the problem and mitigating the risk or vulnerability.
Organizations should protect web applications by deploying web application firewalls that inspect all traffic flowing to the web application for common web application attacks, including but not limited to Cross-Site Scripting, SQL injection, command injection, and directory traversal attacks.
As with the quote above, Web Application Firewalls (WAF) are the only mitigating solution for web applications that can keep up with changing attack techniques and web application changes and growth. It's only in this one section on Web Application Firewalls that SANS uses the word "Protect" in conjunction with applications and it's for a very good reason. All of the code review, monitoring and scanning techniques they mention work to increase security, as much as possible, but as they say, it's only with a WAF that you can provide the protection required.
It's critical to point out, that a WAF that cannot block traffic 'real-time' should never be considered a protective/mitigating solution. These types of non-real-time blocking WAFs are monitors at best and have limited or no protection capabilities. I state this, because I hear confusion when speaking to some organizations about whether they need to block or not. If you know you have a vulnerability and know where it is, you should absolutely implement a blocking solution, at least, for that part of the web application, preferably for the rest of the site, as well, considering, where there is one vulnerability there is likely to be others you don't know about.
For applications that rely on a database, organizations should conduct a configuration review of both the operating system housing the database and the database software itself, checking settings to ensure that the database system has been hardened using standard hardening templates.
Almost all web applications rely on a back-end databases these days. Data security is our focus at Imperva and we have known from the beginning that the database is the target of the attacks that this Critical Control #7 is focused on preventing. Imperva Inc. is the only organization to provide complete monitoring and protection for both the web application and the back-end database that houses everything the criminal wants to steal.
I hate being long winded and yes my fingers are hurting, but remember this. Source code review and code scanning is just that, a review of the code. It does nothing to protect web applications and certainly does nothing to protect 3rd party web applications, of which there is some in almost every company. Vulnerability assessment/scanning products are effective at finding vulnerabilities, but have no ability to prevent attacks or protect web applications out-right, however, these vendors have begun to partner with Imperva Inc. to provide an automated scanning solution that can seamlessly feed found vulnerabilities into Imperva's SecureSphere WAF to protect web applications where they need it. Lastly, to meet SANS complete control requirements, SecureSphere provides not only the WAF solution required to protect the web application, but also the recommended database protection to protect the actual target of web application attacks - the data.




