id: netgear-router-exposure

info:
  name: NETGEAR Routers - Serial Number Disclosure
  author: geeknik
  severity: medium
  description: |
    Multiple NETGEAR router models disclose their serial number which can be used to obtain the admin password if password recovery is enabled.
  reference:
    - https://www.exploit-db.com/exploits/47117
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    cvss-score: 5.3
    cwe-id: CWE-200
  metadata:
    max-request: 1
  tags: edb,netgear,exposure,iot,router,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/rootDesc.xml"

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200
          - 501
        condition: or

      - type: word
        words:
          - "<serialNumber>"
          - "<deviceType>"
          - "<modelNumber>"
        condition: and

      - type: word
        part: header
        words:
          - text/xml

    extractors:
      - type: regex
        group: 1
        regex:
          - "<serialNumber>([A-Z0-9]+)<\\/serialNumber>"
# digest: 4a0a0047304502201de4dfaed249dc3d32d9d806da2491b186a48fb7a5cc65082945f1349aa5fc36022100810c67e4717f80f5c95dc0fe331d487cbb9735d4241203b52096a597cb85882c:922c64590222798bb761d5b6d8e72950