Application Security Testing Tools Study and Proposal
Total Page:16
File Type:pdf, Size:1020Kb
Application Security Testing Tools Study and Proposal Miro Casanova Páez Máster Universitario en Seguridad de las Tecnologías de la Información y de las Comunicaciones. (MISTIC) Seguridad Empresarial Pau del Canto Rodrigo Victor Garcia Font 12/2020 i Esta obra está sujeta a una licencia de Reconocimiento-NoComercial- SinObraDerivada 3.0 España de Creative Commons ii FICHA DEL TRABAJO FINAL Título del trabajo: Application Security Testing Tools Study and Proposal Nombre del autor: Miro Casanova Páez Nombre del consultor/a: Pau del Canto Rodrigo Nombre del PRA: Victor Garcia Font Fecha de entrega: 12/2020 Titulación: Máster Universitario en Seguridad de las Tecnologías de la Información y de las Comunicaciones (MISTIC) Área del Trabajo Final: Seguridad Empresarial Idioma del trabajo: Inglés Palabras clave SAST, DAST Resumen del Trabajo Hoy en día es una evidencia la necesidad de un menor tiempo de lanzamiento al mercado de las aplicaciones. Sin embargo, aunque el tiempo necesario para desarrollarlas se reduzca, todavía se necesita poder ofrecer aplicaciones con- fiables y seguras. Esto era ya es una tarea difícil, y ahora lo es aún más con las restricciones de tiempo y la rápida evolución de las tecnologías. Los erro- res ocultos en el software pueden traducirse en vulnerabilidades de seguridad que potencialmente permitan a los atacantes poner en peligro los sistemas y aplicaciones. Hay hackers y crackers que pueden estar al acecho para obtener nuestra valiosa información personal. Por lo tanto, estas aplicaciones deben ser seguras y con- fiables ya que nuestra información o documentos privados se almacenan en es- tas aplicaciones de n capas. Cada año miles de estas vulnerabilidades se des- velan públicamente en el Common Vulnerabilities and Exposures database [23]. Estas vulnerabilidades son a menudo ocasionadas por errores sutiles cometidos por programadores y pueden propagarse rápidamente debido a la prevalencia del software de código abierto así como a la reutilización de código. Nos enfrentamos al dilema de la necesidad de acelerar el proceso de desarro- llo de software y al mismo tiempo el requisito de ofrecer aplicaciones fiables y seguras. Hay muchos enfoques para abordar este problema que van desde adaptar el proceso de desarrollo de software a soluciones técnicas más concre- tas. En este TFM intentaremos analizar el uso de una o varias herramientas automatizadas para verificar si las aplicaciones en construcción tienen el nivel de seguridad requerido mediante la detección de posibles vulnerabilidades o errores que podría causar un funcionamiento no deseado. Este enfoque aborda la detección de código vulnerable durante el curso del ciclo de desarrollo de software. Abstract: iii Nowadays the need for a shorter time-to-market of applications is evident. How- ever, even though the time needed for developing them gets reduced, we still need to be able to deliver reliable and secure apps. This was already a challen- ging task, and it is even more so with the time restrictions and the rapidly evolving technologies. Hidden flaws in software can result in security vulnerabilities that potentially allow attackers to compromise systems and applications. There are hackers and crackers who may be keeping an eye on our valuable personal information. Hence, these applications need to be secured and should be reliable since our private and important information or documents are stored on the back end of these n-tiered applications. Each year thousands of such vulnerabilities are reported publicly to the Common Vulnerabilities and Exposures database [23]. These vulnerabilities are often caused by subtle errors made by programmers and can propagate quickly due to the prevalence of open-source software and code reuse. We are confronted with the dilemma of the need for speeding up the software de- velopment process while at the same time the requirement of delivering reliable and secure applications. There are many approaches for tackling this problem which range from adapting the software development process to more concrete technical solutions. In this TFM we will try to analyse the use of one or several automatized software tools for verifying whether the application under construc- tion has the required level of security by detecting potential vulnerabilities or flaws that could cause an undesired misfunction. This approach addresses the detec- tion of vulnerable code during the course of the software development cycle. iv Contents List of Figures vi 1 Introduction1 1.1 Context and motivation . .1 1.2 Objectives . .1 1.3 Methodology . .3 1.4 Planning . .3 1.5 Summary of the obtained product . .4 1.6 Description next chapters of this work . .4 2 State of the art5 2.1 SAST, DAST, IAST, SCA Overview . .6 2.2 SAST . .7 2.2.1 SAST tools on the market . .8 SonarQube . .9 Coverity . .9 SpotBugs . .9 AppScan Source . 10 CheckMarx . 10 2.3 DAST . 11 2.3.1 DAST tools on the market . 12 AppScan Standard . 12 Managed DAST Synopsys . 12 OWASP Zed Attack Proxy (ZAP) . 13 Arachni . 14 Subgraph Vega . 15 2.4 IAST . 17 2.4.1 IAST tools on the market . 17 Contrast Assess . 17 Synopsys Seeker . 18 2.5 SCA . 18 2.5.1 SCA tools on the market . 19 OWASP dependency check . 20 OWASP Dependency Track . 21 Synopsys Black Duck . 22 Snyk............................. 22 2.6 Table: Summary of tools . 23 v 3 Benchmarks 24 3.1 OWASP Benchmark . 24 3.2 WAVSEP . 27 3.3 SAMATE . 30 3.4 Other benchmarks . 31 4 Software Security Assurance Tools Selection 36 4.1 Selection criteria . 36 4.2 Organisation’s ecosystem . 39 4.3 Selection and exclusion of tools . 40 4.3.1 SAST selection . 40 4.3.2 DAST selection . 41 4.3.3 IAST selection . 42 4.3.4 SCA selection . 42 4.4 Summary of selection . 43 4.5 Implementation of Quick Wins . 43 4.5.1 SonarQube . 43 4.5.2 SpotBugs . 45 4.5.3 Find Security Bugs . 46 5 Conclusions 47 Bibliography 53 vi List of Figures 2.1 Spotbugs Maven GUI - Scan OWASP Benchmark project . 10 2.2 OWASP ZAP Desktop Interface - Quick scan . 13 2.3 OWASP ZAP Quick scan Alert . 14 2.4 Arachni scanning www.uoc.edu . 15 2.5 Vega scanning overview . 16 2.6 Vega scanning - detail on high risk XSS vulnerability . 16 2.7 OWASP dependency check on OWASP Benchmark project . 20 2.8 OWASP dependency check details . 21 3.1 Diagram OWASP Benchmark true and false positives . 25 3.2 OWASP Benchmark results . 26 3.3 Results of the Julia tool with OWASP Benchmark . 27 3.4 Excerpt of WAVSEP results . 28 3.5 TP, FP, TN results in Idrissi et al. 29 3.6 Overview of the metrics results in Idrissi et al. 30 3.7 Parfait tool results . 31 3.8 Benchmark results of Bermejo et al. for TP and FP . 32 3.9 Metrics obtained for the different tools . 33 3.10 Lab environment used for penetration testing . 34 4.1 SonarQube tool analysing some projects . 44 4.2 SonarQube vulnerability details of one project . 44 4.3 Signature of method . 45 4.4 SpotBugs for Intellij . 45 4.5 SpotBugs - Issues by severity . 45 4.6 FindSecurityBugs - Issues . 46 4.7 FindSecurityBugs - Issues by severity . 46 1 Chapter 1 Introduction 1.1 Context and motivation Nowadays, the need for a shorter time-to-market of applications is evident. However, even though the time needed for developing them gets reduced, we still need to be able to deliver reliable and secure apps. This was already a challenging task, and it is even more so with the time restrictions and the rapidly evolving technologies. Hidden flaws in software can result in secur- ity vulnerabilities that potentially allow attackers to compromise systems and applications. Some hackers and crackers may be keeping an eye on our valuable personal information. Hence, these applications need to be secured and should be reliable since our private and important information or docu- ments are stored on the back end of these n-tiered applications. Each year thousands of such vulnerabilities are reported publicly to the Common Vulner- abilities and Exposures database [23]. These vulnerabilities are often caused by subtle errors made by programmers and can propagate quickly due to the prevalence of open-source software and code reuse. We are confronted with the dilemma of the need for speeding up the soft- ware development process while at the same time the requirement of deliver- ing reliable and secure applications. There are many approaches for tackling this problem which range from adapting the software development process to more concrete technical solutions. In this TFM we will try to analyse the use of one or several automatised software tools for verifying whether the application under construction has the required level of security by detecting potential vulnerabilities or flaws that could cause an undesired misfunction. This approach addresses the detection of vulnerable code during the course of the software development cycle. 1.2 Objectives The first objective of this TFM is to propose a suitable solution for using one or many of the tools, reviewed in this document, to be incorporated in the software development cycle for improving the delivery of more reliable and secure applications, according to a set of criteria to be defined below. These Chapter 1. Introduction 2 criteria are based on the current situation of the organisation where we cur- rently work. To be able to attain the previous objective, we need to perform a profound literature study of the different tools (and kinds of tools) available in the mar- ket that can be applicable to solve the aforementioned problem. We will also search for benchmarks and comparisons of these tools to analyse their ad- vantages and disadvantages with respect to each other.