-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
From: zaproxy/zap-admin@7d1b80f with just `pscan`. Signed-off-by: thc202 <[email protected]>
- Loading branch information
Showing
9 changed files
with
197 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
# This page was generated from the add-on. | ||
title: Passive Scanner API | ||
type: userguide | ||
weight: 1 | ||
--- | ||
|
||
# Passive Scanner API | ||
|
||
The following operations are added to the API: | ||
|
||
### Actions | ||
|
||
* clearQueue: Clears the passive scan queue. | ||
* disableAllScanners: Disables all passive scan rules. | ||
* disableAllTags: Disables all passive scan tags. | ||
* disableScanners (ids\*): Disables passive scan rules. | ||
* ids: A comma separated list of scan rule IDs. | ||
* enableAllScanners: Enables all passive scan rules. | ||
* enableAllTags: Enables all passive scan tags. | ||
* enableScanners (ids\*): Enables passive scan rules. | ||
* ids: A comma separated list of scan rule IDs. | ||
* setEnabled (enabled\*): Sets whether or not the passive scanning is enabled (Note: the enabled state is not persisted). | ||
* enabled: The enabled state, true or false. | ||
* setMaxAlertsPerRule (maxAlerts\*): Sets the maximum number of alerts a passive scan rule can raise. | ||
* maxAlerts: The maximum number of alerts. | ||
* setScanOnlyInScope (onlyInScope\*): Sets whether or not the passive scan should be performed only on messages that are in scope. | ||
* onlyInScope: The scan state, true or false. | ||
* setScannerAlertThreshold (id\* alertThreshold\*): Sets the alert threshold of a passive scan rule. | ||
* id: The ID of the scan rule. | ||
* alertThreshold: The alert threshold: OFF, DEFAULT, LOW, MEDIUM and HIGH | ||
|
||
### Views | ||
|
||
* currentTasks: Shows information about the passive scan tasks currently being run (if any). | ||
* maxAlertsPerRule: Gets the maximum number of alerts a passive scan rule should raise. | ||
* recordsToScan: The number of records the passive scanner still has to scan. | ||
* scanOnlyInScope: Tells whether or not the passive scan should be performed only on messages that are in scope. | ||
* scanners: Lists all passive scan rules with their ID, name, enabled state, and alert threshold. | ||
|
||
## See also | ||
|
||
| | | | | ||
|---|----------------------------------------------------------|--------------------------------------------| | ||
| | [Passive Scanner](/docs/desktop/addons/passive-scanner/) | the introduction to Passive Scanner add-on | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
site/content/docs/desktop/addons/passive-scanner/options/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
# This page was generated from the add-on. | ||
title: Options | ||
type: userguide | ||
weight: 3 | ||
--- | ||
|
||
# Options | ||
|
||
The Passive Scanner add-on provides the following options screens: | ||
|
||
| | | | | ||
|---|---------------------------------------------------------------------------|---------------------------------------------------------------------| | ||
| | [Passive Scanner](/docs/desktop/addons/passive-scanner/options/scanner/) | Allows to configure the passive scanner. | | ||
| | [Passive Scan Rules](/docs/desktop/addons/passive-scanner/options/rules/) | Allows to configure the passive scan rules. | | ||
| | [Passive Scan Tags](/docs/desktop/addons/passive-scanner/options/tags/) | Allows to configure the tags that are added by the passive scanner. | | ||
|
||
## See also | ||
|
||
| | | | | ||
|---|----------------------------------------------------------|--------------------------------------------| | ||
| | [Passive Scanner](/docs/desktop/addons/passive-scanner/) | the introduction to Passive Scanner add-on | |
25 changes: 25 additions & 0 deletions
25
site/content/docs/desktop/addons/passive-scanner/options/rules.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
# This page was generated from the add-on. | ||
title: Passive Scan Rules | ||
type: userguide | ||
weight: 2 | ||
--- | ||
|
||
# Passive Scan Rules | ||
|
||
|
||
This screen allows you to configure the passive scan rules. | ||
|
||
### Threshold | ||
|
||
This controls how likely ZAP is to report potential vulnerabilities. | ||
|
||
* If you select Off then the scan rule won't run. | ||
* If you select Low then more potential issues will be raised which may increase the number of false positives. | ||
* If you select High then fewer potential issues will be raised which may mean that some real issues are missed (false negatives). | ||
|
||
## See also | ||
|
||
| | | | | ||
|---|----------------------------------------------------------|--------------------------------------------| | ||
| | [Passive Scanner](/docs/desktop/addons/passive-scanner/) | the introduction to Passive Scanner add-on | |
27 changes: 27 additions & 0 deletions
27
site/content/docs/desktop/addons/passive-scanner/options/scanner.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
# This page was generated from the add-on. | ||
title: Passive Scanner | ||
type: userguide | ||
weight: 1 | ||
--- | ||
|
||
# Passive Scanner | ||
|
||
|
||
This screen allows you to configure the passive scanner. | ||
|
||
## Configuration Options | ||
|
||
| Field | Details | Default | Config File | | ||
|-------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|---------------------------------------------------------------------------------------| | ||
| Only scan messages in scope | Sets whether or not the passive scan should be performed only on messages that are in scope. | Deselected | Key: `pscans.scanOnlyInScope` Values: `true` or `false` | | ||
| Include traffic from the Fuzzer when passive scanning | Sets whether or not the passive scanning should be performed on messages generated by the Fuzzer. | Deselected | Key: `pscans.scanFuzzerMessages` Values: `true` or `false` | | ||
| Max alerts any rule can raise | Sets the maximum number of alerts a passive scan rule should raise. This may be slightly exceeded due to threading. This setting is typically only useful for automated scanning. Scan rules that exceed this value will be disabled and will need to be manually enabled if a new session is started. | 0 (unset) | Key: `pscans.maxAlertsPerRule` Values: `0`: unset or the maximum number of alerts | | ||
| Max body size in bytes to scan | Sets the maximum size request or response body size in bytes that the passive scanner will scan. This can be used if passive scan rules take too long scanning very large requests or responses. If set the number of ignored requests and responses are recorded in the stats using the keys `stats.pscan.reqBodyTooBig` and `stats.pscan.respBodyTooBig` respectively. | 0 (unset) | Key: `pscans.maxBodySizeInBytes` Values: `0`: unset or the maximum body size in bytes | | ||
| Clear Queue | Empties the passive scan queue without passively scanning the messages. Currently running rules will run to completion but new rules will only be run when new messages are added to the queue. | | | | ||
|
||
## See also | ||
|
||
| | | | | ||
|---|----------------------------------------------------------|--------------------------------------------| | ||
| | [Passive Scanner](/docs/desktop/addons/passive-scanner/) | the introduction to Passive Scanner add-on | |
33 changes: 33 additions & 0 deletions
33
site/content/docs/desktop/addons/passive-scanner/options/tags.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
# This page was generated from the add-on. | ||
title: Passive Scan Tags | ||
type: userguide | ||
weight: 3 | ||
--- | ||
|
||
# Passive Scan Tags | ||
|
||
|
||
This screen allows you to configure the tags that are added by the passive scanner. | ||
You can add, modify and remove the tags via the appropriate buttons. | ||
|
||
## Tag Interpolation | ||
|
||
In order to allow some flexibility in Tag creation and content it is possible for the user to specify a regular expression with capturing groups which will be used to replace the group identifiers (ex: $1) in the resulting tag. | ||
|
||
|
||
For example, a tag could be defined as follows: | ||
|
||
| Field | Value | Note | | ||
|----------------------|------------|----------------------------------------------------------------------| | ||
| Name: | Test | | | ||
| Tag: | $1-SOMETAG | | | ||
| Response Body Regex: | (\\d{3}) | Find strings of 3 numbers, using a capturing group (round brackets). | | ||
|
||
**Result:** When 3 digit strings are passively identified in response body content (the regex matches) the messages will be tagged such as "123-SOMETAG", "345-SOMETAG", etc. | ||
|
||
## See also | ||
|
||
| | | | | ||
|---|----------------------------------------------------------|--------------------------------------------| | ||
| | [Passive Scanner](/docs/desktop/addons/passive-scanner/) | the introduction to Passive Scanner add-on | |