Skip to content

Commit

Permalink
Create 5.2.5.1.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: AmirHossein Raeisi <[email protected]>
  • Loading branch information
Ahsraeisi authored Nov 1, 2024
1 parent e683faa commit 82231c8
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions templates/dast/5.2.5.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
id: ASVS-4-0-3-V5-2-5-1

info:
name: ASVS 5.2.5.1 (Reflected SSTI) Check
author: AmirHossein Raeisi
severity: high
classification:
cwe-id: CWE-94
reference:
- https://github.com/zaproxy/zap-extensions/blob/2d9898900abe85a47b9fe0ceb85ec39070816b98/addOns/ascanrulesAlpha/src/main/java/org/zaproxy/zap/extension/ascanrulesAlpha/SstiScanRule.java
- https://github.com/DiogoMRSilva/websitesVulnerableToSSTI#list-of-seversneeds-update
- https://snbig.github.io/Vulnerable-Pages/ASVS_5_2_5/
- https://github.com/projectdiscovery/nuclei-templates/blob/main/dast/vulnerabilities/ssti/reflection-ssti.yaml
tags: asvs,5.2.5
description: |
Verify that the application protects against template injection attacks by ensuring that any user input being included is sanitized or sandboxed.
variables:
first: "{{rand_int(1000, 9999)}}"
second: "{{rand_int(1000, 9999)}}"
result: "{{to_number(first)*to_number(second)}}"

http:
- pre-condition:
- type: dsl
dsl:
- 'method == "GET"'

skip-variables-check: true
payloads:
ssti:
- '{{concat("${", "{{first}}*{{second}}", "}")}}'
- '{{concat("{{", "{{first}}*{{second}}", "}}")}}'
- '{{concat("<%=", "{{first}}*{{second}}", "%>")}}'
- '{{concat("{", "{{first}}*{{second}}", "}")}}'
- '{{concat("{{{", "{{first}}*{{second}}", "}}}")}}'
- '{{concat("${{", "{{first}}*{{second}}", "}}")}}'
- '{{concat("#{", "{{first}}*{{second}}", "}")}}'
- '{{concat("[[", "{{first}}*{{second}}", "]]")}}'
- '{{concat("{{=", "{{first}}*{{second}}", "}}")}}'
- '{{concat("[[${", "{{first}}*{{second}}", "}]]")}}'
- '{{concat("${xyz|", "{{first}}*{{second}}", "}")}}'
- '{{concat("#set($x=", "{{first}}*{{second}}", ")${x}")}}'
- '{{concat("@(", "{{first}}*{{second}}", ")")}}'
- '{{concat("{@", "{{first}}*{{second}}", "}")}}'

fuzzing:
- part: query
type: postfix
fuzz:
- "{{ssti}}"

stop-at-first-match: true
matchers:
- type: word
part: body
words:
- "{{result}}"

0 comments on commit 82231c8

Please sign in to comment.