-
Notifications
You must be signed in to change notification settings - Fork 0
/
DOM XSS Sinks.bcheck
47 lines (42 loc) · 1.54 KB
/
DOM XSS Sinks.bcheck
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
metadata:
language: v2-beta
name: "DOM XSS Sinks"
description: "Detects xss sinks"
author: "DemonGod"
tags: "xss", "passive", "javascript", "bce"
given response then
if {latest.response.body} matches "\++ ?location.(href|hash|search|pathname)" then
report issue and continue:
severity: low
confidence: tentative
detail: "potential location misuse"
remediation: "verify input is sanitized"
end if
if {latest.response.body} matches "\++ ?document.URL" then
report issue and continue:
severity: low
confidence: tentative
detail: "potential document.url misuse"
remediation: "verify input is sanitized"
end if
if {latest.response.body} matches "\++ ?window.name" then
report issue and continue:
severity: low
confidence: tentative
detail: "potential window.name misuse"
remediation: "verify input is sanitized"
end if
if {latest.response.body} matches "\++ ?document.(referrer|documentURI|baseURI|cookie)" then
report issue and continue:
severity: low
confidence: tentative
detail: "potential document misuse"
remediation: "verify input is sanitized"
end if
if {latest.response.body} matches "\.(insertAdjacentHTML|innerHTML|setHTMLUnsafe|parseHTMLUnsafe)\(" then
report issue and continue:
severity: medium
confidence: tentative
detail: "Found dangerous HTML output method usage"
remediation: "verify input is sanitized"
end if