---
meta:
  author: "Christoph Hansen"
  description: None
  enabled: true
  name: 942240.yaml
tests:
  - test_title: 942240-1
    desc: "Detects MySQL charset switch and MSSQL DoS attempts"
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Host: localhost
            method: POST
            port: 80
            uri: "/"
            data: "%22+WAITFOR+DELAY+%27%0A"
            version: HTTP/1.0
          output:
            log_contains: id "942240"
  - test_title: 942240-2
    desc: "Detects MySQL charset switch and MSSQL DoS attempts"
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Host: localhost
            method: POST
            port: 80
            uri: "/"
            data: "%22%3Bwaitfor+delay+%27%0A"
            version: HTTP/1.0
          output:
            log_contains: id "942240"
  - test_title: 942240-3
    desc: "Detects MySQL charset switch and MSSQL DoS attempts"
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Host: localhost
            method: POST
            port: 80
            uri: "/"
            data: "%27%3BWAITFOR+DELAY+%27%0A"
            version: HTTP/1.0
          output:
            log_contains: id "942240"
  - test_title: 942240-4
    desc: "Detects MySQL charset switch and MSSQL DoS attempts"
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Host: localhost
            method: POST
            port: 80
            uri: "/"
            data: "%27%3B+waitfor+delay+%27%0A"
            version: HTTP/1.0
          output:
            log_contains: id "942240"
  - test_title: 942240-5
    desc: "Detects MySQL charset switch and MSSQL DoS attempts"
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Host: localhost
            method: POST
            port: 80
            uri: "/"
            data: "%27+waitfor+delay+%27%0A"
            version: HTTP/1.0
          output:
            log_contains: id "942240"
  - test_title: 942240-6
    desc: "Detects MySQL charset switch and MSSQL DoS attempts"
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Host: localhost
            method: POST
            port: 80
            uri: "/"
            data: "%27%3B+WAITFOR+DELAY+%27%0A"
            version: HTTP/1.0
          output:
            log_contains: id "942240"
  - test_title: 942240-7
    desc: "Detects MySQL charset switch and MSSQL DoS attempts"
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Host: localhost
            method: POST
            port: 80
            uri: "/"
            data: "%22+WAITFOR+DELAY+%27%0A"
            version: HTTP/1.0
          output:
            log_contains: id "942240"
  - test_title: 942240-8
    desc: "Detects MySQL charset switch and MSSQL DoS attempts"
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Host: localhost
            method: POST
            port: 80
            uri: "/"
            data: "%22%3BWAITFOR+DELAY+%27%0A"
            version: HTTP/1.0
          output:
            log_contains: id "942240"
  - test_title: 942240-9
    desc: "Detects MySQL charset switch and MSSQL DoS attempts"
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Host: localhost
            method: POST
            port: 80
            uri: "/"
            data: "pay=%22%3Bwaitfor+delay+%27%0A"
            version: HTTP/1.0
          output:
            log_contains: id "942240"
  - test_title: 942240-10
    desc: "Detects MySQL charset switch and MSSQL DoS attempts"
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Host: localhost
            method: POST
            port: 80
            uri: "/"
            data: "pay=ALTER+TABLE+%60mass_mails%60+CHANGE+%60receivers%60+%60receivers%60+ENUM%28%27FACILITIES%27%2C%27APPLICATION_2015%27%2C%27APPLICATION_2016%27%29+CHARACTER+SET+utf8%0A"
            version: HTTP/1.0
          output:
            log_contains: id "942240"
  - test_title: 942240-11
    desc: "Detects MySQL charset switch and MSSQL DoS attempts"
    stages:
      - stage:
          input:
            dest_addr: 127.0.0.1
            headers:
              Host: localhost
            method: POST
            port: 80
            uri: "/"
            data: "ALTER+TABLE+%60tx_v3appointment_domain_model_appointment%60+ADD+%60video%60+TEXT+CHARACTER+SET+latin1%0A"
            version: HTTP/1.0
          output:
            log_contains: id "942240"
