---
meta:
  author: "csanders-git"
  enabled: true
  name: "941170.yaml"
  description: "Tests to trigger, or not trigger 941170"
tests:
  - test_title: 941170-1
    desc: XSS in XML Test as described in http://www.client9.com/article/five-interesting-injection-attacks/
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            method: GET
            port: 80
            uri: '/char_test?mime=text/xml&body=%3Cx:script%20xmlns:x=%22http://www.w3.org/1999/xhtml%22%20src=%22data:,alert(1)%22%20/%3E'
            headers:
              User-Agent: ModSecurity CRS 3 Tests
              Host: localhost
          output:
            log_contains: id "941170"
  - test_title: 941170-2
    desc: "XSS test based on portswigger XSS cheatsheet"
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            method: POST
            port: 80
            headers:
              User-Agent: ModSecurity CRS 3 Tests
              Host: localhost
            uri: '/'
            data: "payload=javascript:/*--></title></style></textarea></script></xmp><svg/onload='+/\"/+/onmouseover=1/+/[*/[]/+alert(1)//'></a>"
          output:
            log_contains: id "941170"
