Skip to content

Commit 543b4c6

Browse files
authored
Merge pull request #6389 from YashArote/fix-alert-page
websocket: link rules to help
2 parents 9717540 + 3f1983b commit 543b4c6

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

addOns/websocket/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ All notable changes to this add-on will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

66
## Unreleased
7-
7+
### Changed
8+
- Add website alert links to the help page (Issue 8189).
89

910
## [32] - 2025-01-10
1011
### Changed

addOns/websocket/src/main/java/org/zaproxy/zap/extension/websocket/pscan/scripts/WebSocketPassiveScript.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ default String getName() {
5858
return ScriptsWebSocketPassiveScanner.PLUGIN_NAME;
5959
}
6060

61+
default String getHelpLink() {
62+
return "https://www.zaproxy.org/docs/desktop/addons/websockets/pscanrules/#id-" + getId();
63+
}
64+
6165
@Override
6266
default List<Alert> getExampleAlerts() {
6367
return Collections.emptyList();

addOns/websocket/src/main/javahelp/org/zaproxy/zap/extension/websocket/resources/help/contents/pscanrules.html

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <H1>WebSocket Passive Scan Rules</H1>
1111
<h2 id="scripts">Scripts</h2>
1212
Scripts which are included by default in the add-on and they implement the following WebSocket passive scan rules:
1313

14-
<h3>Base64 Disclosure</h3>
14+
<h3 id="id-110002">Base64 Disclosure</h3>
1515

1616
This script analyzes incoming WebSocket message payload for Base64 strings. The encoded information may include sensitive data which may not specifically meant for end user consumption.<br>
1717

@@ -32,9 +32,10 @@ <h3>Base64 Disclosure</h3>
3232
<table border="1" width = "500">
3333
<tr><td><strong>Risk</strong></td><td>Info</td></tr>
3434
<tr><td><strong>Confidence</strong></td><td>Medium</td></tr>
35+
<tr><td><strong>Alert ID:</strong></td><td><a href="https://www.zaproxy.org/docs/alerts/110002/">110002</a></td></tr>
3536
</table>
3637

37-
<h3>Information Disclosure: Application Errors</h3>
38+
<h3 id="id-110001">Information Disclosure: Application Errors</h3>
3839

3940
This passive scanner checks incoming WebSocket message payload for known Application Error messages. Access to such details may provide a malicious individual with means by which to further abuse the web site. They may also leak data not specifically meant for end user consumption.<br>
4041

@@ -53,9 +54,10 @@ <h3>Information Disclosure: Application Errors</h3>
5354
<tr><td><strong>Confidence</strong></td><td>Medium</td></tr>
5455
<tr><td><strong>CWE ID</strong></td><td>209: Information Exposure Through an Error Message</td></tr>
5556
<tr><td><strong>WASC ID</strong></td><td>13: Information Leakage</td></tr>
57+
<tr><td><strong>Alert ID:</strong></td><td><a href="https://www.zaproxy.org/docs/alerts/110001/">110001</a></td></tr>
5658
</table>
5759

58-
<h3>Information Disclosure: Credit Card Number</h3>
60+
<h3 id="id-110005">Information Disclosure: Credit Card Number</h3>
5961

6062
This script scans for the presence of Personally Information Identifiable in incoming WebSocket message payload.
6163
More specifically, it passively scans payload for credit card numbers. The available scans are for the following credit card types:
@@ -76,9 +78,10 @@ <h3>Information Disclosure: Credit Card Number</h3>
7678
<tr><td><strong>Confidence</strong></td><td>High</td></tr>
7779
<tr><td><strong>CWE ID</strong></td><td>359: Exposure of Private Information ('Privacy Violation')</td></tr>
7880
<tr><td><strong>WASC ID</strong></td><td>13: Information Leakage</td></tr>
81+
<tr><td><strong>Alert ID:</strong></td><td><a href="https://www.zaproxy.org/docs/alerts/110005/">110005</a></td></tr>
7982
</table>
8083

81-
<h3>Information Disclosure: Debug Errors</h3>
84+
<h3 id="id-110003">Information Disclosure: Debug Errors</h3>
8285

8386
This script checks the incoming WebSocket message payload for known Debug Error message fragments. Access to such details may provide a malicious individual with means by which to further abuse the web site. They may also leak data not specifically meant for end user consumption.<br>
8487

@@ -97,9 +100,10 @@ <h3>Information Disclosure: Debug Errors</h3>
97100
<tr><td><strong>Confidence</strong></td><td>Medium</td></tr>
98101
<tr><td><strong>CWE ID</strong></td><td>200: Information Exposure</td></tr>
99102
<tr><td><strong>WASC ID</strong></td><td>13: Info Leakage</td></tr>
103+
<tr><td><strong>Alert ID:</strong></td><td><a href="https://www.zaproxy.org/docs/alerts/110003/">110003</a></td></tr>
100104
</table>
101105

102-
<h3>Information Disclosure: Email address</h3>
106+
<h3 id="id-110004">Information Disclosure: Email address</h3>
103107

104108
This script scans incoming WebSocket messages for email addresses. Email addresses may be not specifically meant for end user consumption.<br>
105109

@@ -110,9 +114,10 @@ <h3>Information Disclosure: Email address</h3>
110114
<tr><td><strong>Confidence</strong></td><td>Info</td></tr>
111115
<tr><td><strong>CWE ID</strong></td><td>200: Information Exposure</td></tr>
112116
<tr><td><strong>WASC ID</strong></td><td>13: Information Leakage</td></tr>
117+
<tr><td><strong>Alert ID:</strong></td><td><a href="https://www.zaproxy.org/docs/alerts/110004/">110004</a></td></tr>
113118
</table>
114119

115-
<h3>Information Disclosure: Suspicious XML Comments</h3>
120+
<h3 id="id-110008">Information Disclosure: Suspicious XML Comments</h3>
116121

117122
This script checks incoming WebSocket messages payloads, which are XML formatted, for suspicious comments. The comments it is searching for are relevant to components with which an attacker can extract useful information. Comments like FIXME, BUG, etc. might be helpful for further attacks targeting the weaknesses of the web application.<br>
118123

@@ -137,9 +142,10 @@ <h3>Information Disclosure: Suspicious XML Comments</h3>
137142
<tr><td><strong>Confidence</strong></td><td>Medium</td></tr>
138143
<tr><td><strong>CWE ID</strong></td><td>200: Information Exposure</td></tr>
139144
<tr><td><strong>WASC ID</strong></td><td>13: Info Leakage</td></tr>
145+
<tr><td><strong>Alert ID:</strong></td><td><a href="https://www.zaproxy.org/docs/alerts/110008/">110008</a></td></tr>
140146
</table>
141147

142-
<h3 id="ip_add_disc">Private Address Disclosure</h3>
148+
<h3 id="id-110006">Private Address Disclosure</h3>
143149
Checks incoming WebSocket message payload for inclusion of RFC 1918 IPv4 addresses as well as Amazon EC2 private hostnames (for example, ip-10-0-56-78). This information can give an attacker useful information about the IP address scheme of the internal network, and might be helpful for further attacks targeting internal systems. <br>
144150

145151
This passive scanner may generate false positives in the case of larger dotted numeric strings, such as vp09.02.51.10.01.09.16, where the latter 4 octets appear to be a RFC 1918 IPv4 address. After review an analyst can mark such alerts as False Positives in ZAP.<br>
@@ -155,9 +161,10 @@ <h3 id="ip_add_disc">Private Address Disclosure</h3>
155161
<table border="1" width = "200">
156162
<tr><td><strong>Risk</strong></td><td>Low</td></tr>
157163
<tr><td><strong>Confidence</strong></td><td>Medium</td></tr>
164+
<tr><td><strong>Alert ID:</strong></td><td><a href="https://www.zaproxy.org/docs/alerts/110006/">110006</a></td></tr>
158165
</table>
159166

160-
<h3>Username Disclosure</h3>
167+
<h3 id="id-110007">Username Disclosure</h3>
161168

162169
Checks incoming WebSocket message payload for usernames. This script can find usernames which are hashed with the following methods:
163170
{MD2, MD5, SHA256, SHA384, SHA512}. The usernames have to be defined in any context before. In order to a add user in a Context follow the steps below:
@@ -173,6 +180,7 @@ <h3>Username Disclosure</h3>
173180
<tr><td><strong>Confidence</strong></td><td>High</td></tr>
174181
<tr><td><strong>CWE ID</strong></td><td>284: Improper Access Control</td></tr>
175182
<tr><td><strong>WASC ID</strong></td><td>2: Insufficient Authorization</td></tr>
183+
<tr><td><strong>Alert ID:</strong></td><td><a href="https://www.zaproxy.org/docs/alerts/110007/">110007</a></td></tr>
176184
</table>
177185

178186
</BODY>

0 commit comments

Comments
 (0)