Dynamic Application Security Testing (DAST) tools are tools used to identify vulnerabilities in running applications. They operate by examining an application's runtime inputs and outputs; testing the application's performance by sending it a range of inputs, including malicious input, SQL injection attacks, and cross-site scripting attacks. By doing so, they can identify vulnerabilities that may not be apparent during static analysis or code reviews.

Semaphore
6 min readJun 15, 2023

--

The importance of DAST tools in the DevSecOps pipeline cannot be overstated. Software is being released at an increasingly rapid rate in the current, fast-paced development environment. This means that security testing must be incorporated into the development process to guarantee that flaws are detected and corrected as soon as possible. As they may offer immediate feedback on an application's security posture, DAST tools are a crucial part of this approach.

This article will walk you through:

  • An in-depth understanding of DAST tools and how to choose the right one for your security operations.
  • Running an automated full scan on a deployed application to check for vulnerabilities, using Semaphore pipelines.

Understanding Dynamic Application Security Testing

DAST testing involves analyzing an application for vulnerabilities while it is running. In other words, DAST tools test the security of an application in real-time, by simulating attacks and analyzing the application's response. DAST tools can also be used to scan APIs, mobile applications, and web services.

Key features of DAST tools include:

  • Automation: DAST tools are highly automated, allowing for quick and efficient scanning of applications. This makes them ideal for use in continuous integration and continuous delivery (CI/CD) pipelines.
  • Comprehensive reporting: DAST tools generate comprehensive reports that provide detailed information about any vulnerabilities found in an application. These reports typically include information about the severity of the vulnerability, the location of the vulnerability, and recommended remediation steps.
  • Integration with other tools: DAST tools can be integrated with other security tools, such as Static Application Security Testing (SAST) tools and web application firewalls (WAFs), to provide more comprehensive security.

Compared to other security testing tools, such as SAST and manual testing, DAST tools have several advantages. One of the main advantages of DAST is that they can detect vulnerabilities that might be missed by other types of testing. However, DAST is no silver bullet, so it is often recommended to use them in a combination of testing methods to ensure comprehensive application security.

Types of DAST tools

There are three main types of DAST tools: black-box, grey-box, and white-box testing tools. Each type of tool has its own unique features, advantages, and disadvantages.

  • Black-box testing tools: these tools simulate an external attacker with no knowledge of the application's internal structure. They do not have access to the source code or any other internal information about the application. Black-box testing tools rely solely on the application's inputs and outputs to identify vulnerabilities. They are particularly useful for testing externally-facing applications such as web applications.
  • Grey-box testing tools: these tools simulate an attacker with limited knowledge of the application's internal structure. They have some access to the application's internal workings, such as the database schema or API endpoints, but do not have access to the source code. Grey-box testing tools are handy for testing web applications and APIs.
  • White-box testing tools: these tools have full access to the application's internal structure, including the source code. They analyze the application's code to identify potential vulnerabilities. White-box testing tools are handy for testing custom-built applications.

To sum up, black-box testing tools are useful for testing externally facing applications, grey-box testing tools are useful for testing web applications and APIs, and white-box testing tools are useful for testing custom-built applications.

Understanding the strengths and weaknesses of each type of tool can help you choose the most appropriate tool for your specific needs.

Popular DAST Tools

There are many DAST tools available, each with its own strengths and weaknesses. Here is an overview of some of the most popular DAST tools and their key features:

  • OWASP ZAP: OWASP Zed Attack Proxy (ZAP) is a free and open-source DAST tool. It is widely used by security professionals and developers alike. ZAP provides a comprehensive set of features, including active and passive scanning, advanced spidering, and scriptable attacks. It also has a powerful API that allows for easy integration with other tools.
  • Burp Suite: Burp Suite is a popular commercial DAST tool. It provides a comprehensive set of features for web application security testing, including automated scanning, manual testing, and advanced penetration testing. Burp Suite also has a robust API that allows for easy integration with other tools.
  • Acunetix: Acunetix is a commercial DAST tool that provides comprehensive web application security testing. It includes a powerful scanner that can detect a wide range of vulnerabilities, including SQL injection and cross-site scripting (XSS). Acunetix also includes advanced reporting and integration capabilities.
  • AppSpider: AppSpider is a commercial DAST tool that provides comprehensive web application security testing. It includes advanced scanning capabilities that can detect a wide range of vulnerabilities, including SQL injection and cross-site scripting (XSS). AppSpider also includes advanced reporting and integration capabilities.

When comparing DAST tools, here are some key factors to consider:

  • Features: different DAST tools offer different features. Consider the specific features you need for your application security testing.
  • Ease of use: some DAST tools can be complex to set up and use. Consider the ease of use of the tool when making a selection.
  • Integration capabilities: DAST tools should integrate with your existing toolset. Look for tools that can easily integrate with your other security tools.
  • Reporting capabilities: DAST tools should provide clear and actionable reports. Look for tools that provide detailed vulnerability information and recommendations for remediation.
  • Cost: commercial DAST tools can be expensive. Consider the cost of the tool when making a selection.

In this article we will be using OWASP ZAP and integrating it into our Semaphore pipeline.

Hands-on: integration of DAST tools into a DevSecOps pipeline

To get started with this, you need to log in to your Semaphore account and create a new pipeline. If this is your first time using Semaphore, check out the getting started tutorial.

Choose the repository you want to integrate DAST with and make sure you have given Semaphore access to your repositories, and continue to set up the workflow.

We will edit the CI/CD workflow to add Scanning jobs. The name of the job as OWASP ZAP Scan, because the commands following will install OWASP ZAP Scan and run a full scan on our deployed application.

These commands are a series of terminal commands that are used to install and configure the OWASP ZAP (Zed Attack Proxy) tool on a Linux operating system.

Here's a breakdown of each command:

sudo apt-get install -y default-jdk

This command installs the default Java Development Kit (JDK) using the apt-get package manager. The -y flag is used to automatically answer "yes" to any prompts that may appear during the installation. You need to install the default JDK (Java Development Kit) to run the OWASP ZAP tool on your pipeline because ZAP is a Java-based application.

wget https://github.com/zaproxy/zaproxy/releases/download/v2.11.0/ZAP_2.11.0_Linux.tar.gz

This command downloads the OWASP ZAP tool from its official GitHub repository. wget is a command-line utility that is used to download files from the internet.

tar -xzf ZAP_2.11.0_Linux.tar.gz

This command extracts the contents of the downloaded tar.gz file. tar is a command-line utility that is used to create and extract archive files.

export PATH=$PATH:/home/semaphore/ZAP_2.11.0

This command adds the ZAP installation directory to the system's PATH environment variable. This ensures that the ZAP executable can be run from any directory without having to specify its full path.

zap.sh -cmd -config api.disablekey=true -config scanner.attackOnStart=true -config view.mode=attack -quickurl http://example.com -quickout /tmp/results.xml -quickprogress

This command runs ZAP inline (i.e. to exit when command line options complete) and configures it with various options, such as disabling the API key requirement (api.disablekey=true), enabling the active scanner to start immediately (scanner.attackOnStart=true), setting view mode to attack mode (view.mode=attack), and specifying a target URL ( http://example.com) and output file for scan results (/tmp/results.xml).

--

--

Semaphore
Semaphore

Written by Semaphore

Supporting developers with insights and tutorials on delivering good software. · https://semaphoreci.com

No responses yet