Veracode State of Software Security Report Volume 2
Veracode State of Software Security Report Volume 2
AS EVERY CIO AND CISO IS AWARE, the flood of news generated by attacks against insecure software continues unabated across all industry verticals and market segments. Since the publication of Volume 1 at the beginning of the year, there have been multiple new zero-day vulnerabilities reported in Microsoft Windows, at least six material data breaches, 10K filings from Intel disclosing a breach similar to the Chinese attack on Google, and widely covered security concerns about mobile apps, cloud service providers and SCADA systems. Yet despite this evidence that software security efforts are not keeping pace with attacks there is good news to report.
It is heartening to see that CXO software security concerns are beginning to translate into concerted efforts to move from ad-hoc security testing to a new paradigm of application risk governance characterized by standardized processes and operating controls extended uniformly across the enterprise. Given the state of the application threat environment, it is not surprising that over 60% of all of Veracode enterprise customers are launching a formal, comprehensive security program for the very first time. It is this action that has driven the submission of nearly 1,400 new applications representing nearly 200% increase in the use of Veracodes cloud-based assessment service over the past reporting period. This report represents the code-level analysis of 2,922 applications (as compared to 1,591 applications in Volume 1), a sure sign that more development and security teams are taking the security of internally developed and third-party components and applications seriously. The data also shows that once vulnerabilities are detected and remediation advice is provided, developers are quick to achieve an acceptable level of security. And, when a class of softwaresuch as financial services applications makes security a priority it does appear that security quality improves, particularly with respect to common vulnerabilities such as Cross-site Scripting. When this evidence of progress is juxtaposed with my conversations with CIOs and CISOs who are awakening to the importance of security accountability across the software supply chain, I see a climate that is conducive to more secure software in the future. For you who are ready to act now, this report comprises security intelligence gleaned from billions of lines of code analyzed by the worlds first and only cloud-based application risk management services platform. It is our hope that we can assist you to make and buy more secure software. Best Regards, Matthew Moynahan Chief Executive Officer, Veracode veracode.com/ceo-blog
Table of Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Executive Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Software Supply Chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Security of Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Application Threat Space Trends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Addendum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Assurance Level Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Introduction
The State of Software Security is a semi-annual report that draws on continuously updated information in Veracodes cloud-based application risk management services platform. Unlike a survey, the data comes from actual code-level analysis of billions of lines of code and thousands of applications. The resulting security intelligence cannot be found anywhere else. It represents multiple testing methodologies (static binary, dynamic, and manual) on the full spectrum of application types (components, shared libraries, web and non-web applications) and programming languages (including Java, C/C++, .NET, ColdFusion, and PHP) from every part of the software supply chain (Internally Developed, Open Source, Outsourced, Commercial). For those executives, security and development professionals who want to better understand the vulnerabilities that threaten the integrity and performance of software in the software supply chain, this series of reports is essential reading. In Volume 2 of the State of Software Security there are nearly 1,400 more applications than in the inaugural report, reflecting the growing use of independent, cloud-based application risk management services. As before, the report first examines the security quality of applications by type of supplier in the software supply chain and then explores application security by language, industry, and by application type across both web and non-web applications. New in Volume 2 are data from third-party assessments, the first inclusion of PHP and ColdFusion applications, a comparison of static binary, dynamic, and manual testing effectiveness, and additional analytics on Financial industry applications. Veracode welcomes any questions or comments from readers and will continually strive to improve and enrich the quality and detail of our analysis. Additionally, we invite all members of the software supply chain to participate in constructive dialogue on the topic of software security at veracode.com/ceo-blog.
Executive Summary
The following are some of the most significant findings in the State of Software Security Volume 2, representing 2,922 applications assessed in the last 18 months by Veracode SecurityReview, a cloud-based application risk management services platform. 1. More than half of all software failed to meet an acceptable level of security and 8 out of 10 web applications failed to comply with the OWASP Top 10 2. Cross-site Scripting remains the most prevalent of all vulnerabilities 3. Third-party applications were found to have the lowest security quality 4. Developers repaired security vulnerabilities quickly 5. Suppliers of Cloud/Web applications were the most requested third-party assessments 6. No single method of application security testing is adequate by itself 7. The security quality of applications from Banks, Insurance, and Financial Services industries was not commensurate with their business criticality
Key Findings
1. More than half of all software failed to meet an acceptable level of security and 8 out of 10 web applications failed to comply with the OWASP Top 10 57% of all applications were found to have unacceptable application security quality on first submission, even when standards were adjusted for applications considered less business critical (Figure 3). Even more troublesome, more than 80% of internally developed and commercial web applications failed to comply with the OWASP Top 10 (Figure 5), an industry standard list of critical web application errors. The level of risk in terms of repair costs, business continuity, and brand from so many business critical applications failing to meet an acceptable level of security on first submission is staggering. The potential exposure to brand reputation and loss of revenue from interruptions to business operations is significant. Recommendation: Utilize industry standards such as OWASP Top 10 and CWE/SANS Top 25 list of most dangerous software errors as minimum thresholds and compliance policies to which applications need to adhere. 2. Cross-site Scripting remains the most prevalent of all vulnerabilities Cross-site Scripting (XSS) remains the most prevalent vulnerability category, accounting for 51% of all vulnerabilities uncovered by Veracodes combined static binary, dynamic, and manual security testing methods (Figure 13). .NET applications, in particular, exhibited an abnormally high rate of Cross-site Scripting vulnerabilities, resulting from the use of .NET controls that do not automatically encode output (Table 4). While not as numerous, Cryptographic Issuesa category that includes unencrypted or inadequate encryption of dataappeared in the most applications, with 41% of all applications containing one or more vulnerabilities in this category (Figure 14). These statistics underscore the need for developers to become better educated and better equipped to avoid common vulnerabilities. Recommendation: These flaws are easy to fix once found (Figure 4). Focusing on developer education and awareness is a cost-effective way to avoid introducing them.
3. Third-party applications were found to have the lowest security quality Third-party code is getting more attention since Veracode first highlighted in Volume 1 of this report, that between 30% and 70% of software submitted as internally developed contained identifiable third-party components. Both Safecode.org 1 and a report from the research firm Secunia 2 have recently reinforced the elevated risks associated with third-party software in the supply chain. In Figure 3, Veracode shows that applications from all types of third-party suppliers were less secure than Internally Developed applications on first submission. Third-party suppliers failed to achieve acceptable levels of security 81% of the time. However, in Figure 2 it is also evident that third-party code is an essential part of the every organizations portfolio, comprising 29% of all applications submitted to Veracode. Furthermore, between 20% and 37% of very high or high criticality applications are sourced from third-parties. Recommendation: Both internal and third-party components and applications must be subjected to the same level of security verification to ensure consistent security quality across the application portfolio. Procurement contracts for outsourced or commercial software vendors should insist upon the authority to perform independent security testing and specify minimum security acceptance criteria. 4. Developers repaired security vulnerabilities quickly A common misperception is that it is easy to find defects and difficult to fix them. While this may often be true of functional defects in software it is less true for security defects. Observing a variance from functional specifications is relatively easy but determining the root cause can be hard. Conversely, determining that an application allows someone to do something it was never intended to do is actually quite difficult but relatively easy to fix once known (Figure 4). Among the most encouraging data in this report, the evidence that development teams using Veracode can fully remediate unacceptable levels of security quality in only 16 days and 1.1 resubmissions on average is among the best reasons to equip development teams with effective security testing and trainingthey can and did improve the state of software security quickly when properly informed. Recommendation: Equip development teams with the appropriate application security resources and knowledge and plan for security verification and remediation in the project timeline from the outset. 5. Cloud/Web applications were the most requested third-party assessments Assessments of third-party applications at the request of a purchasing organization have grown linearly over the past 6 quarters, reflecting the increased concern over the security of software in the supply chain and the availability of effective, new technologies such as cloud-based, static binary analysis that make third-party assessments possible without requiring source code or tools. In a new section of the report, Veracode explored the types of applications most often reviewed by request. As Figure 8 shows, suppliers of cloud and web applications made up nearly 60% of all third-party assessments requested, while integrators and commercial software providers made up most of the rest in equal parts. Since cloud-based applications are relatively new, their significant presence indicates the reasonable security concerns they raise and the criticality of the work they perform. Like other third-party software, these assessments resulted in low levels of acceptable security and rapid remediation. Recommendation: Require Third-party Cloud/Web application and service providers to demonstrate verification of application security quality.
1 2
www.safecode.org www.theregister.co.uk/2010/07/12/secunia_threat_report
6. No single method of application security testing is adequate by itself Others have reported this year on the inadequacy of web application scanning.3 Veracodes code-level analysis of vulnerabilities using multiple testing techniques on the same applications confirms that dynamic web application scanning tools are not sufficient as the sole testing method. Similarly, manual penetration testing, while necessary to fully comply with policies such as the OWASP Top 10 and the CWE/SANS Top 25, lacks consistency of coverage and will rarely detect all instances of commonly occurring vulnerabilities. However, while the evidence shows that static binary analysis provides the most consistent breadth and depth of coverage, it is also true that not all design and business logic vulnerabilities are discoverable with static methods alone. Recommendation: CISOs and CIOs should view different testing techniques as operating controls that each play an important role in a comprehensive policy driven program. Multiple testing techniques should be adopted based on application business criticality and type of application. The use of multiple techniques is the only way to comply with industry standard security polices such as the OWASP Top 10 and the CWE/SANS Top 25 Most Dangerous Software Errors. 7. The security quality of applications from Banks, Insurance, and Financial Services industries was not commensurate with their business criticality In a very interesting dichotomy, Financial Industry applications were found to have the best raw code-level security scores of any industry but only average levels of acceptability when the business criticality of an application was considered. This speaks to the high degree of awareness such firms have about code-level threats but also to the inadequate application risk management practices employed relative to the importance of these applications. Financial Services applications in particular demonstrated an exceptionally low prevalence of the most common vulnerabilitiesless than half the rate of Cross-site Scripting errors as compared to Banks and Insurance (Table 7). The implication is that training, testing, and a high degree of focus on specific types of errors can make a significant difference. The net result is both encouraging because improvement is possible; and sobering because the most critical of applications remain too insecure. Recommendation: Inventory and classify the application inventory based on business criticality. In the absence of this business context, an understanding of the code-level security quality is insufficient. What seems to be good code-level security quality may still not render the application fit for purpose when business criticality is taken into account.
www.darkreading.com/vulnerability_management/security/app-security/showArticle.jhtml?articleID=222601207
For CIOs and CISOs, the evidence continues to point to an increasing percentage of software infrastructure and associated liability coming from unknown and unmanaged third-parties.
For CIOs and CISOs, the evidence continues to point to an increasing percentage of software infrastructure and associated liability coming from unknown and unmanaged third-parties. While nearly a third of all applications submitted to Veracode were identified as third-party, code-level analysis reveals that third-party code in the supply chain is significantly understated by most organizations.
Veracode sampling found as much as 76% of code submitted as Internally Developed was identifiably from third-parties, most often in the form of Open Source components and Commercial shared libraries and components. Furthermore, there was a nesting effect as third-party components themselves often contained other third-party components.
Applications by Supplier
22% 71% 6% 1%
Internally Developed Commercial Open Source Outsourced
Very High
17%
80%
2% 1% 1% 4% 1% 2%
High
26%
63%
10%
Medium
21%
74%
Low
27%
71%
Very Low
100%
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Other 2% 3% 0% 5%
Table 1 illustrates that nearly one third of commercially developed applications and over half of open source applications are written in C/C++ indicating a significant reliance on this language platform by these types of software suppliers. It further indicates that over 65% of the software developed by these same suppliers are non-web applications, while Internally Developed and Outsourced suppliers are relied on for web applications to about the same degree. The language and type of application differences among suppliers allows for policies and acceptance criteria to be tailored to the most prevalent risks Support for C/C++ and and, among other things, clearly indicates the requirement for C/C++ non-web applications is language and non-web application support when choosing security testing required when choosing approaches to third-party software.
Overall
43%
57%
Outsourced *
7%
93%
Open Source
42%
58%
Internally Developed
46%
54%
Commercial
35%
65%
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Applications that do not achieve an acceptable level of security on first submission are returned to the supplier with potential vulnerabilities identified by location in the code and with remediation instructions. Of those applications that were remediated and resubmitted, Figure 4 shows that most achieved acceptable levels of security within 16 days and in 1.1 builds (i.e. resubmissions following the initial analysis of the application). These encouraging results point to the effects of independent, cloud-based security testing. With a similar approach across supply chain participants, CIOs and CISOs can use this information to quantify application security risk versus the cost to mitigate, better estimate software development project costs and schedules, and control rework charges associated with security vulnerabilities in third-party agreements.
Commercial
Open Source
Overall
REMEDIATION SUBMISSION TO PASS
15 10 5 0
Open Source
40%
60%
Internally Developed
12%
88%
Commercial
7%
93%
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
www.veracode.com/directory/VERAFIED-logo-program.html
10
Figure 5 shows the percentage of web applications that met the OWASP Top 10 (2010) policy by supplier. An application was labeled Not Acceptable if it contained any vulnerabilities defined in the standard lists. The number of Commercial and Internally developed web applications that were not acceptable is staggering at more than 80%. The difference between this extraordinary indicator of insecurity when compared to the bad but much higher acceptable levels of security identified earlier is largely explained by the high number of web applications that were submitted as lower business criticality. Another contributing factor may be due to the increasing number of microsites that are generally developed on behalf of large enterprises to support time-based marketing or commercial More than 8 out of 10 initiatives where time-to-market is the most important driver. Given the commercial and interally level of interconnectedness of software in most organizations Veracode developed web applications observes that low business criticality values for web applications or the failed against OWASP Top temporal nature of their existence probably understates the risk and 10 upon first submission. encourages customer to adopt more stringent policies such as the OWASP Top 10 for all web applications. Figure 6 examines suppliers ability to deliver applications as measured by compliance against the CWE/SANS Top 25 Most Dangerous Software Errors. All applications both web and non-web were included in this analysis. Commercial and Internally developed applications performed the best with about 50% and 52% of applications meeting acceptance respectively. The difference in the ranking of open source applications as worse in the ranking when compared to their performance against OWASP may be due to the fact that most open source applications analyzed in the dataset are non-web applications.
CWE/SANS Top 25 Compliance by Supplier on First Submission
Acceptable Not Acceptable
Outsourced *
20%
80%
Open Source
38%
62%
Internally Developed
52%
48%
Commercial
50%
50%
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
11
Commercial
Cross-site Scripting (XSS) Information Leakage CRLF Injection Cryptographic Issues 56%
Open Source
CRLF Injection 15%
Outsourced
Cross-site Scripting (XSS) Directory Traversal Cryptographic Issues Time and State 31%
14% 10% 6%
16% 6% 5%
Numeric Errors Buffer Mgmt Errors Cross-site Scripting (XSS) Cryptographic Issues Error Handling Buffer Overflow Time and State Directory Traversal
SQL Injection Directory Traversal Buffer Overflow Potential Backdoor Untrusted Search Path Time and State
5% 3% 3% 2% 2%
Directory Traversal SQL Injection Buffer Overflow Potential Backdoor Numeric Errors
4% 4% 2% 2% 2%
12% 9% 9% 4% 4%
Information Leakage Credentials Mgmt API Abuse CRLF Injection SQL Injection
9% 8% 6% 3% 2%
2%
Error Handling
2%
Potential Backdoor
1%
Insufficient Input Validation Error Handling Session Fixation OS Command Injection Other Race Conditions
<1%
1% 1%
1%
1% 1%
<1% <1%
<1%
<1%
<1% <1%
<1% <1%
<1% <1%
<1% <1%
12
Figure 7 shows the types of enterprises that are requesting third-party assessments. They are predominantly in the Financial (including Banks, Insurance, and Financial Services) or Software/IT Services market categories where this category represents enterprises that are both software producers and providers of IT services and equipment.
Requester Distribution by Industry
28%
Software/IT Services
17% 55%
Financial Other
One of the most striking themes from these assessments is the implication for cloud-based services. Figure 8 shows that Vendors that provide cloud based services, either in Cloud only or Cloud as an option (Cloud+Deployment) accounted for almost 60% of all reviewed third-party applications. The other Vendor Types for which reviews were requested were Cloud only or Cloud as an option general ISVs or companies that specialize in integrating disparate (Cloud + Deployment) accounted components from several sourcesall of which are likely for almost 60% of all reviewed participants in cloud-based solutions.
third-party applications.
13
The relative proportion of third-party reviews broken down by application functional area is provided in Figure 9. In this diagram, the categories used for functional area are derived from the Balanced Scorecard model (BSC), a widely-used strategic planning and management system.5 BSC identifies four functional perspectives by which to view and measure an organization: Financial, Customer, Operations, and Learning and Growth. Any application that deals with day-to-day business activity is included in the Operations category shown in Figure 9. This includes business process management applications, product development, information management utilities, IT management tools, and applications to support all non-financial governance functions such as legal and operational risk management. The Customer category includes all content management, customer relationship management and web-facing services provided to customers. The Learning and Growth category includes applications to support HR, training, and human capital management. Financial applications include traditional accounting and finance functions as well as an important and growing class of application that provides mobile access for banking and other finance related tasks. It is interesting to note that Operations is the leading functional area for third-party assessments which comprises about the same portion of requests as the combination of Finance and Customer applications. This indicates that companies are proactively requiring assessments of applications across a wide variety of internal applications (Operations and Finance) as well as external customer-facing web sites.
Companies are proactively requiring assessments of applications across a wide variety of internal applications (Operations and Finance) as well as external customer-facing web sites.
29%
Operations
Figure 9: Requested Third-party Assessments by Application Purpose Application Type Definitions: Operations category includes applications supporting day-to-day non-financial business activity such as product development, information management utilities, IT management tools etc.; Financial category traditional accounting and finance applications and newer mobile banking applications; Customer category includes customer relationship management and content management applications and web customer support applications; Learning and Growth includes applications to support HR, training and human capital management.
The Balanced Scorecard (BSC) was originated in the 1990s by Drs. Robert Kaplan (Harvard Business School) and David Norton as a performance measurement framework to enrich traditional financial performance measures with strategic non-financial performance measures, thereby giving a more balanced view of organizational performance. See www.balancedscorecard.org for additional information
14
Figure 10 reveals that, like third-party supplier code in general, third-party risk assessments result in high rates of unacceptable security on first submission. 4 out of 5 assessments failed to achieve acceptable levels of security on first review. Most third-party assessed suppliers also remediated faster than applications on average, with three-quarters of all applications requiring only 11 days to achieve acceptable levels of security quality. It should be noted that many customers implementing a third-party risk management program employ a customer success program manger or an internal resource High ROI with minimal impact that is tasked with policy creation, coordination of third-parties and to timeline from third-party risk program execution. This focus may be contributing to a relatively assessments: Three-quarters short amount of time for achieving compliance. The fast turnaround required less than 11 days to further implies that requiring a third-party assessment does not result achieve security quality level in delayed deployment of more than a couple of weeks, making it required by requesting enterprise. worth the trade-off.
19% 81%
A PROFILE IN VERIFICATION
Third-party assessments is one of the fastest growing types of security programs as CIOs and CISOs become aware of the unbounded risk inherent in the software supply chain. At one company, a facilitated engagement with third-parties improved the state of software security for all parties. Program Time 6 months Third-Parties Assessed Close to 40 applications from distinct vendors (in excess of 50 million lines of code) Vulnerabilities Remediated Over 500 Severity 5 and 4 vulnerabilities (over 7000 vulnerabilities in total) Lessons Learned The impossible is possible. Facilitated independent verification improved security for a large number of third-party applications in a short timeframe. Next Steps Additional third-parties are proactively pursuing verification and the company is using the intelligence gained so far to revise third-party acceptance policies.
15
Security of Applications
The previous section presented information from the Software Supplier and Purchaser perspectives in an attempt to help enterprises properly manage application risk in the software supply chain. In this section of the report we explore security risks related to web and non web applications, programming languages, types of vulnerabilities, and industry alignment. New in this report, we further consider the effectiveness of multiple security testing techniques and provide a deeper investigation of application security in Banking, Insurance, and Financial Services companies. As background, software vulnerabilities are the attack points in applications used by hackers to compromise a system. Different types of applications have different attack points. For example, web applications have different attack surfaces than desktop software or databases. Additionally, vulnerabilities can vary significantly by programming language and platforms such as the Windows versus BlackBerry operating systems. It is also possible for applications in different industries to have different vulnerabilities based on the secure coding skills of the engineering population serving those industries (e.g. Financial Services versus Retail) and the sophistication of their software development practices or central security teams. While no software will ever be perfectly secure, understanding what makes applications more or less vulnerable provides the basis for CIOs, CISOs, and software professionals to manage application portfolio risk rather than remain blindly susceptible to catastrophic loss of information, business continuity, and reputation.
44% 56%
16
Java
<1%
1%
In our last report we showed the relative distributions of three development platformsJava, C/C++, and .NET. Java still leads at 50%, up slightly from 47% in our last report. However, C/C++ and .NET have swapped positions, and we are now seeing .NET applications leading C/C++ by a factor of 3 to 2. New in this report are two new platforms, ColdFusion and PHP, which account for 1.4% and 0.7% of all applications, respectively. These numbers should not be used as a representation of the market share of these two platforms because Veracode only recently developed the capabilities required to analyze them. We expect that over time, these percentages will increase to better approximate the real-world distribution of these platforms in the enterprise.
Our data shows that all applications, no matter what language is used, require secure development practices to be secure.
To better understand the impact of programming language on application security, Table 3 shows the median flaw density for each. The median flaws per thousand lines of code (KLOC) for Java, C/C++, and .NET are similar. Many people ask whether switching languages will improve application security. Our data shows that all applications, no matter what language is used, require secure development practices to be secure.
17
ColdFusion was very different with a median of 5.2 security flaws per KLOC. While ColdFusion applications were a small percentage of the total number of applications assessed in this period, more than 35 applications were included. The ColdFusion Markup Language is very compact relative to Java and .NET, which may explain most of this difference. The simplicity of CFML also allows less accomplished programmersand even non-programmers to develop web applications, so it stands to reason that developer inexperience is another contributing factor to ColdFusions flaw density.
Flaw Density by Language First Quartile C/C++ ColdFusion Java .Net
Table 3: Flaw Density by Language
18
Cross-site Scripting (XSS) Information Leakage CRLF Injection Cryptographic Issues SQL Injection Directory Traversal Buffer Overflow Potential Backdoor Time and State Error Handling Credentials Management Numeric Errors Untrusted Search Path API Abuse Encapsulation 0% 2% 2% 2% 1% 1% 1% 1% 1% 1% 5% 10% 15% 20% 25% 30% 35% 40% 45% 50% 4% 4% 6% 12% 11%
51%
55%
Even though a category may account for a small percentage of the total vulnerabilities, the frequency with which it appears across different applications may be a more illuminating statistic. Viewing the vulnerabilities by affected applications, Cryptographic Issues remains atop the list, with 41% of all applications containing one or more vulnerabilities in this category. This category once again comprised insufficient entropy, plain text storage of sensitive data, use of hardcoded cryptographic keys, and use of algorithms with inadequate encryption strength. The unnerving part of this statistic is that while static analysis can uncover a variety of cryptographic flaws, there are far more complex mistakes that can only be detected by a skilled practitioner, either through design review or a focused code review. If automated scanning is uncovering simple cryptographic mistakes at a rate that affects over 40% of all applications, one has to wonder how many other cryptographic issues are lurking beneath the surface. Once again, this statistic underscores the need for developers to become better educated with this less publicized but still prevalent issue in order to safely incorporate cryptographic mechanisms into their applications.
19
Cryptographic Issues Information Leakage Cross-site Scripting (XSS) Directory Traversal CRLF Injection SQL Injection Time and State Credentials Management API Abuse Encapsulation Insufficient Input Validation Error Handling Potential Backdoor Buffer Overflow OS Command Injection 0% 5% 9% 8% 8% 8% 8% 7% 10% 15% 20% 25% 30% 35% 40% 12% 20% 18% 27% 26% 24% 34%
41% 40%
45%
20
21
The problem with over-relying on one method is that there is no single testing methodology that can detect all of the important vulnerability types with sufficient depth and breadththere is no silver bullet. For example, conducting a manual penetration test while ignoring automated testing is not ideal; penetration testing can identify complex security issues but it generally provides spotty application coverage, particularly within a single vulnerability category. Similarly, relying solely on automated static analysis provides excellent coverage but does not account for business logic, design flaws or environment and configuration issues. Meanwhile, dynamic analysis only tests code paths that it can discover externally which, as benchmarking comparisons of dynamic web application scanners have shown, can lead to embarrassing results.6 While most security experts would agree with these points anecdotally, they generally lacked hard data until now. The following table depicts the top 10 vulnerability categories by prevalence, for each analysis type. This allows us to see what vulnerabilities automated static binary analysis, automated dynamic analysis, and manual penetration testing find most frequently. The first thing to notice is that many of the most common vulnerability types are present in all three tablesCross-site Scripting, SQL Injection, and Information Leakage, to name a few. However, there are vulnerability types that are most frequently detected using one particular method, for example, Buffer Overflows (static), Server Configurations (dynamic) and Authorization Issues (manual).
www.darkreading.com/vulnerability_management/security/app-security/showArticle.jhtml?articleID=222601207
22
The previous table provided a high-level view into the types of vulnerabilities that were most frequently detected by different analysis methods, for all applications in the data set. However, we can learn more by drilling down into the subset of the web applications in the data set that were subjected to both automated static and automated dynamic testing at customer request. These applications represented 21% of the total web applications analyzed in the past 18 months. In these cases, dynamic analysis came up empty for CRLF Injection and nearly empty for Cryptographic Errors. Its not impossible for dynamic testing to find some varieties of CRLF InjectionHTTP Response Splitting is one examplebut the bulk of that category in this application set, which we know because it was found by static binary analysis, was Log Injection vulnerabilities. These simply cannot be detected by any dynamic method except in rare circumstances. Furthermore, its a striking statistic that static binary analysis detected over 20 times more XSS vulnerabilities and nearly twice as many SQL injection vulnerabilities than dynamic analysis across these applications, on average. What accounts for the disparity between static and dynamic methods, independent of vendor? One major contributing factor is that static analysis provides comprehensive coverage of the application whereas dynamic analysis only tests code paths that it can discover externally. Often, dynamic (and even manual) testing completely overlooks portions of the application that are only reachable under certain circumstances. For example, application functionality may be gated behind a series of forms that trigger different behavior depending on how they are filled out. Also, applications that support different types of users (e.g. view-only, author, editor, administrator, power user, etc.) often restrict the functionality that each user level can access, meaning that the application must be scanned multiple times, iterating over all of the user roles, in order to maximize coverage. However, while coverage may be an issue, dynamic analysis is performed against a live application instance, so a higher percentage of its reported vulnerabilities may be demonstrably exploitable. Sacrificing coverage in order to reduce the vulnerability triage effort is a risky tradeoff but it is a tradeoff that some enterprises may choose to make during the early stages of an application security program. The lesson for CISOs and CIOs is that a robust application security program must incorporate multiple testing methods in order to ensure that applications are assessed with sufficient coverage, measured by both depth and breadth. Becoming overly dependent on too few analysis methodologies guarantees blind spots when assessing overall application risk.
23
Software
Cross-site Scripting (XSS) Information Leakage Cryptographic Issues CRLF Injection Directory Traversal SQL Injection Numeric Errors Buffer Overflow Error Handling Potential Backdoor Time and State Buffer Mgmt Errors Credentials Mgmt API Abuse Encapsulation 30% 19% 10% 8% 7% 5% 4% 4% 3% 3% 2% 2% 1% 1%
Government
Cross-site Scripting (XSS) SQL Injection CRLF Injection Information Leakage Cryptographic Issues OS Command Injection Time and State Directory Traversal Credentials Mgmt Encapsulation API Abuse Error Handling Insufficient Input Validation Race Conditions Buffer Mgmt Errors 87% 7% 2% 1% 1%
Other
Cross-site Scripting (XSS) CRLF Injection Information Leakage Cryptographic Issues Directory Traversal SQL Injection Untrusted Search Path Buffer Overflow Potential Backdoor Time and State Error Handling Credentials Mgmt API Abuse Encapsulation Insufficient Input Validation 45% 20% 10% 6% 3% 3% 3% 3% 2% 2% 2% 1% 1% 1%
<1% <1% <1% <1% <1% <1% <1% <1% <1% <1%
<1%
<1%
24
Industry group definitions The Finance-related industries group combines applications from the Financial Service, Insurance, and Banking industries (self identified); the Software industries category combines applications from the Computer Software, Computer Services, and Security Products and Services industries (self identified); Other combines applications from all other industries including Energy, Healthcare, Pharmaceuticals, Media and Entertainment, Computer Hardware, Manufacturing, Education, Aerospace and Defense and Telecommunications (self identified).
Banks, insurance, and financial services companies have among the best raw security quality scores.
Financial Services
Insurance
25
However, when business criticality of the applications is taken into consideration these organizations fare no better than all applications, with 56% found unacceptable on first submission as shown in Figure 16. Not surprisingly, this lower level of acceptability when compared to the high raw scores reflects the high level of business criticality assigned to these sensitive applications. Worse, more than 60% of banking and insurance applications were unacceptable on first submission, while Financial Services companies were modestly but significantly better than applications overall at 54% unacceptable.
Overall
44%
56%
Insurance
35%
65%
Financial Services
46%
54%
Bank
37%
63%
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Figure 16: Financial Sub-segment Performance on First Submission (Adjusted for Business Criticality)
Among the most encouraging of all findings related to Financial Industry applications is the striking reduction by Financial Services companies in the most persistent and numerous type of vulnerability, Cross-site Scripting. In Table 7 the type of vulnerabilities found in Banking and Insurance are generally the same as in all applications, with Cross-site Scripting making up over 70% of all vulnerabilities. Its pervasiveness continues in these companies and applications in general despite its widely publicized role in breached applications. By comparison, Cross-site Scripting vulnerabilities in Financial Services companies (credit cards, payment processors, brokerages, etc.) were only 33% of all vulnerabilities. This significant difference is evidence of both the concern Financial Services companies have following sensational headlines on past breaches and the rapid improvement submitting companies made as they educated development teams and expanded the number of applications tested. The lesson for all companies is that rapid improvement in secure development is possible with training and by applying the lessons learned from initial independent security verification projects to the larger application portfolio.
26
Insurance Cross-site Scripting (XSS) Information Leakage CRLF Leakage SQL Injection Cryptographic Issues Encapsulation Directory Traversal Time and State Credentials Mgmt Insufficient Input Validation API Abuse Race Conditions Other OS Command Injection Authentication Issues 71% 10% 6% 6% 3% 1% 1% 1% <1% <1% <1% 0% 0% 0% 0%
Bank Cross-site Scripting (XSS) Information Leakage Cryptographic Issues Directory Traversal Buffer Overflow SQL Injection Error Handling CRLF Leakage Time and State Encapsulation Potential Backdoor Credentials Mgmt Server Configuration Insufficient Input Validation Buffer Mgmt Erros 72% 8% 4% 3% 3% 2% 1% 1% 1% 1% <1% <1% <1% <1% <1%
Financial Services Cross-site Scripting (XSS) Information Leakage Cryptographic Issues CRLF Injection Directory Traversal Buffer Overflow SQL Injection Time and State Potential Backdoor Insufficient Input Validation Credentials Mgmt Error Handling Encapsulation Buffer Mgmt Errors API Abuse 33% 26% 11% 8% 6% 4% 4% 2% 1% 1% 1% <1% <1% <1% <1%
27
Very High
32%
68%
High
38%
62%
Medium
58%
42%
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
We explored the impact of industry on the application performance above, given the potential that some industry verticals could have more security-aware development teams and more formal development practices. The results of our analysis in Figure 18 show Software-related Industries continue to fare the worst with only 40% found to be acceptable. Government and Financial continue to maintain the top two spots however, as discussed above, the criticality of applications factors significantly into Financial application acceptance levels. The data continues to underscore that all industries have work to do to improve the security performance of their applications.
All Industries
43%
57%
Finance
44%
56%
Government
57%
43%
Software
40%
60%
Other
43%
57%
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Figure 18: Application Performance by Industry on First Submission (Adjusted for Business Criticality)
28
Within the past few months, backdoors have been in the headlines yet again, with the discovery of a worm targeting a SCADA product written by Siemens. The backdoor exploited by the worm was a hard-coded default password that had been known publicly for over two years but was never patched. At a time when critical infrastructure systems are being widely acknowledged as a weak link in our national defense, SCADA software and similar products lacking robust security design should be scrutinized more carefully than ever for common coding errors as well as malicious backdoors.
Major changes in the way software is developed, tested, and distributed will be needed to prevent the 2010s from being the decade of mobile insecurity.
29
We have also seen developments in how software companies interact with the vulnerability research community. Google and Mozilla increased bounty payments to over $3,000 per serious bug for researchers who report vulnerabilities without releasing details to the public. Its likely that over time, others will introduce similar programs as one facet of a proactive product security strategy. Another noteworthy development was a subtle change to the TippingPoint Zero Day Initiative (ZDI), a program that compensates researchers for security vulnerabilities and then engages with the software vendors on the reporters behalf. In response to a growing backlog of high-risk vulnerabilities being ignored by vendors, sometimes for years, ZDI updated its disclosure policy to give vendors six months to produce a fix before technical details are released. This puts mild pressure on the vendor to take action and ultimately helps enterprises and consumers better understand and quantify the risks introduced by vulnerable third-party software. Another platform trend that is impacting application security is the move to cloud based applications. We are seeing an uptick on the percentage of applications we review, especially for third-parties, that are applications deployed in the cloud. With nearly 60% of all thirdparty assessment requests targeting applications identified as cloud or as having a cloud option (cloud+deployed) it appears that many customers are more concerned about the security of software they are using that is deployed on a cloud platform rather than purchased and deployed on premise.
Many customers are more concerned about the security of software they are using that is deployed on a cloud platform rather than purchased and deployed on premise.
Overall, it has been a good year for application security awareness. More organizations are getting up to speed on static analysis that had relied previously only on dynamic analysis and the awareness and remediation of common vulnerability categories such as SQL injection and XSS is on the rise in mature organizations. On the other hand, while software on mature platforms, such as on-premise Windows and Unix, get more security testing, software on new platforms such as mobile and cloud are barely getting started.
30
Addendum
Methodology
About Veracodes Risk Adjusted Verification Methodology The Veracode SecurityReview uses static and dynamic analysis (for web applications) to inspect executables and identify security vulnerabilities in applications. Using both static and dynamic analysis helps reduce false negatives and detect a broader range of security vulnerabilities. The static binary analysis engine creates a model of the data and control flow of the binary executable; the model is then verified for security vulnerabilities using a set of automated security scans. Dynamic analysis uses an automated web scanning technique to detect security vulnerabilities in a web application at runtime. Once the automated process is complete, a security analyst verifies the output to ensure the lowest false positive rates in the industry. The end result is an accurate list of security vulnerabilities for the classes of automated scans applied to the application. About Software Assurance Levels The foundation of the Veracode rating system is the concept that higher assurance applications require higher security quality scores to be acceptable risks. Lower assurance applications can tolerate lower security quality. The assurance level is dictated by the typical deployed environment and the value of data used by the application. Factors that determine assurance level include reputation damage, financial loss, operational risk, sensitive information disclosure, personal safety, and legal violations. About the Data Set The data represents 2,922 applications submitted for analysis by large and small companies, commercial software providers, open source projects, and software outsourcers. An application was counted only once even if it was submitted multiple times as vulnerabilities were remediated and new versions uploaded. The report contains findings about applications that were subjected to static, dynamic, or manual analysis through the Veracode SecurityReview Platform. The report considers data that was provided by Veracodes customers (application portfolio information such as assurance level, industry, application origin) and information that was calculated or derived in the course of Veracodes analysis (application size, application compiler and platform, types of vulnerabilities, Veracode rating). In any study of this size there is a risk that sampling issues will arise because of the nature of the way the data was collected. For instance, it should be kept in mind that all the applications in this study came from organizations that were motivated enough about application security to engage Veracode for an independent assessment of software risk. Care has been taken to only present comparisons where a statistically significant sample size was present About the Findings Unless otherwise stated, all comparisons are made on the basis of the count of unique application builds submitted and rated.
31
Table 8: Business Criticality Descriptions Source: U.S. Government. OMB Memorandum M-04-04; NIST FIPS Pub. 199
Very High (AL5) This is typically an application where the safety of life or limb is dependent on the system; it is mission critical the application maintain 100% availability for the long term viability of the project or business. Examples are control software for industrial, transportation or medical equipment or critical business systems such as financial trading systems. High (AL4) This is typically an important multi-user business application reachable from the Internet and is critical that the application maintain high availability to accomplish its mission. Exploitation of high assurance applications cause serious brand damage and business/financial loss and could lead to long term business impact. Exploitation is a result of a breach in any two impact categories of confidentiality, integrity and availability of the application. Medium (AL3) This is typically a multi-user application connected to the Internet or any system that processes financial or private customer information. Exploitation of medium assurance applications typically result in material business impact resulting in some financial loss, brand damage or business liability. Exploitation is a result of a breach in confidentiality, integrity or availability of the application. An example is a financial services companys internal 401K management system. Low (AL2) This is typically an internal only application that requires low levels of application security such as authentication to protect access to non-critical business information and prevent IT disruptions. Exploitation of low assurance applications may lead to minor levels of inconvenience, distress or IT disruption. An example internal system is a conference room reservation or business card order system. Very Low (AL1) Applications that have no material business impact should its confidentiality, data integrity and availability be affected. Code security analysis is not required for this assurance level and security spending should be directed to other higher level assurance applications.
32
Veracode, Inc. 4 Van de Graaff Drive Burlington, MA 01803 Tel +1.781.425.6040 Fax +1.781.425.6039 www.veracode.com 2010 Veracode, Inc. All rights reserved.
SSSR /0910
ABOUT VERACODE
Veracode is the worlds leader in cloud-based application risk management. Veracode SecurityReview is the industrys first solution to use patented binary code analysis, dynamic web assessments, and partner or Veracode delivered manual penetration testing, combined with developer e-learning and access to open source security ratings to independently assess and manage application risk across internally developed applications and third-party software without exposing a companys source code. Delivered as a cloud-based service, Veracode provides the simplest, most complete, and most accurate way to implement security best practices, reduce operational cost and comply with internal security policies or external standards such as OWASP Top 10, CWE/SANS Top 25 and PCI.