Skip to content

Commit 2e3734e

Browse files
sshnirothc202
authored andcommittedJan 20, 2020
Adding advanced section for active scan (#15)
* Adding advanced section for active scan
1 parent a6ee472 commit 2e3734e

6 files changed

+59
-5
lines changed
 
42.7 KB
Loading
Loading
56.6 KB
Loading
35.8 KB
Loading

‎source/images/ascan_advanced_tech.png

31 KB
Loading

‎source/includes/advanced.md

+59-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ The following image shows the advanced configurations tab of Spider in the deskt
88

99
![spider_advanced](../images/spider_advanced.png)
1010

11-
Use the [setOptionMaxDepth](#spideractionsetoptionmaxdepth) to set the maximum depth the spider can crawl, where 0 refers to unlimited depth.
12-
The [setOptionMaxChildren](#spideractionsetoptionmaxchildren) sets the maximum number of child nodes (per node) that can be crawled,
11+
Use the [setOptionMaxDepth](#spideractionsetoptionmaxdepth) API to set the maximum depth the spider can crawl, where 0 refers to unlimited depth.
12+
The [setOptionMaxChildren](#spideractionsetoptionmaxchildren) API sets the maximum number of child nodes (per node) that can be crawled,
1313
where 0 means no limit. The [setOptionMaxDuration](#spideractionsetoptionmaxduration) API can be used to set the maximum duration the Spider will run.
14-
Use the [setOptionMaxParseSizeBytes](#spideractionsetoptionmaxparsesizebytes) to limit the amount of data parsed by the spider.
14+
Use the [setOptionMaxParseSizeBytes](#spideractionsetoptionmaxparsesizebytes) API to limit the amount of data parsed by the spider.
1515
This allows the spider to skip big responses/files.
1616

1717
View the [Spider section](#spider) in the API Catalogue for additional APIs.
@@ -26,7 +26,7 @@ Similar to the Spider API, the Ajax spider also provides APIs to set the [maximu
2626

2727
## Passive Scan Settings
2828

29-
The scanning rules can be enabled/disabled using the [enableScanners](#pscanactionenablescanners) and [disableScanners]((#pscanactiondisablescanners)) API.
29+
The scanning rules can be enabled/disabled using the [enableScanners](#pscanactionenablescanners) and [disableScanners]((#pscanactiondisablescanners)) APIs.
3030
Also use the [setScanOnlyInScope](#pscanviewscanonlyinscope) API to limit the passive scanning to a scope. View
3131
the advanced section to learn how to configure a context or scope using ZAP APIs.
3232

@@ -35,5 +35,59 @@ automatic tagging are provided by default. These can be changed, deleted or adde
3535

3636
## Active Scan Settings
3737

38-
Content in progress!
38+
### General Options
3939

40+
The general options for Active Scan can be configured using the options tab in the desktop UI shown below.
41+
42+
![options](../images/ascan_advanced_options.png)
43+
44+
Use the [setOptionMaxScanDurationInMins](#ascanactionsetoptionmaxscandurationinmins) API to limit the duration of scan and
45+
[setOptionMaxRuleDurationInMins](#ascanactionsetoptionmaxruledurationinmins) API to limit the time of individual active scan rules.
46+
This can be used to prevent rules from running for an excessive amount of time.
47+
48+
Use the [setOptionHostPerScan](#ascanactionsetoptionhostperscan) API to set the maximum number of hosts that will be scanned at the same time.
49+
Furthermore, use the [setOptionThreadPerHost](#ascanactionsetoptionthreadperhost) API to set the number of threads the scanner will use per host.
50+
Increasing both of these values will reduce the active scanning time but this may put extra strain on the server ZAP is running on.
51+
52+
Use the [setOptionDelayInMs](#ascanactionsetoptiondelayinms) API to delay each request from ZAP in milliseconds. Setting this to a non zero value will increase
53+
the time an active scan takes, but will put less of a strain on the target host. View the [Active Scan](#zap-api-ascan) section in
54+
the API Catalogue for additional information regarding the APIs.
55+
56+
### Input Vectors
57+
58+
Input vectors refers to the elements that Active Scan will target. Specifying the exact elements to target will improve the
59+
scanning time and accuracy of the results. For example, for the following configuration the [optionTargetParamsInjectable](#ascanviewoptiontargetparamsinjectable) and
60+
[optionTargetParamsEnabledRPC](#ascanviewoptiontargetparamsenabledrpc) will yield the results of 11 and 39.
61+
The numbers can be deconstructed in the following manner:
62+
63+
- 1+2+8 = 11 [Query String(1), Post Data(2), HTTP Headers(8)]
64+
- 1+2+4+32 = 39 [Multipart (1), XML (2), JSON (4), DWR (32)]
65+
66+
![input_vectors_code](../images/ascan_advanced_input_vectors_code.png)
67+
68+
Thus, to change the values of `Injectable targets` and `Input Vector Handlers` calculate the exact values and
69+
use the [setoptiontargetparamsinjectable](#ascanactionsetoptiontargetparamsinjectable) and [setoptiontargetparamsenabledrpc](#ascanactionsetoptiontargetparamsenabledrpc) APIs accordingly.
70+
71+
The `Add URL query parameter` option under the `Injectable Tragets` sets whether or not the active scanner should add a query param
72+
to GET requests which do not have parameters to start with. This option can be enabled using the [setoptionaddqueryparam](#ascanactionsetoptionaddqueryparam) API.
73+
74+
### Technology
75+
76+
![technology](../images/ascan_advanced_tech.png)
77+
78+
The Technology tab allows you to specify which types of technologies to scan. Un-selecting technologies that you know are
79+
not present in the target application may speed up the scan, as rules which target that technology can skip those tests.
80+
For an example, if the target web application does not have a database then removing it will increase the performance of the Active Scan.
81+
82+
Use the [includeContextTechnologies](#contextactionincludecontexttechnologies) and [excludeContextTechnologies](#contextactionexcludecontexttechnologies)
83+
API endpoints to include and exclude the technology list from the context.
84+
85+
### Policy
86+
87+
A scan policy defines exactly which rules are run as part of an active scan. It also defines how these rules run influencing
88+
how many requests are made and how likely potential issues are to be flagged. You can define as many scan policies as you
89+
like and select the most appropriate one when you start the scan via the Active Scan.
90+
91+
![policy](../images/ascan_advanced_policy.png)
92+
93+
The Policy tab shown in the above image allows you to override any of the settings specified in the selected scan policy.

0 commit comments

Comments
 (0)
Please sign in to comment.