---
title: "5. ZAP Scanner"
date: 2024-09-24
draft: false
---

## Spider

Let's start with `ZAP Spider`, which is similar to the Crawler feature in Burp.

To start a Spider scan on any website, we can locate a request from our History tab and select (`Attack>Spider`) from the right-click menu. Another option is to use the HUD in the pre-configured browser. Once we visit the page or website we want to start our Spider scan on, we can click on the second button on the right pane (`Spider Start`), which would prompt us to start the scan:

![](/img/Pasted image 20240924231847.png)
```bash
Note: When we click on the Spider button, ZAP may tell us that the current website is not in our scope, and will ask us to automatically add it to the scope before starting the scan, to which we can say 'Yes'. The Scope is the set of URLs ZAP will test if we start a generic scan, and it can be customized by us to scan multiple websites and URLs. Try to add multiple targets to the scope to see how the scan would run differently.
```

Once we click on `Start` on the pop-up window, our Spider scan should start spidering the website by looking for links and validating them, very similar to how Burp Crawler works. 
We can see the progress of the spider scan both in the HUD on the `Spider` button or in the main ZAP UI, which should automatically switch to the current Spider tab to show the progress and sent requests. 

When our scan is complete, we can check the Sites tab on the main ZAP UI, or we can click on the first button on the right pane (`Sites Tree`), which should show us an expandable tree-list view of all identified websites and their sub-directories:

![](/img/Pasted image 20240924232036.png)

ZAP also has Ajax spider 
- difference: 
- tries to ID links requested through JS AJAX requests which may be running on page even after it runs. 

---

**Passive scanner**
Automatically running its passive scanner to ID issues from source code like missing sec headers or DOM-based XSS vulns. 
Even before running active scan, we may see some alerts. 
Alerts on left pane of HUD shows issues in current page while right pane shows overall alerts on web app. (found on other pages)

**Active scanner**
Once our site's tree is populated, we can click on the `Active Scan` button on the right pane to start an active scan on all identified pages. If we have not yet run a Spider Scan on the web application, ZAP will automatically run it to build a site tree as a scan target. Once the Active Scan starts, we can see its progress similarly to how we did with the Spider Scan:


The Active Scanner will try various types of attacks against all identified pages and HTTP parameters to identify as many vulnerabilities as it can. This is why the Active Scanner will take longer to complete. As the Active Scan runs, we will see the alerts button start to get populated with more alerts as ZAP uncovers more issues. Furthermore, we can check the main ZAP UI for more details on the running scan and can view the various requests sent by ZAP:



Some extensions worth checking out include, but are not limited to:

