id: apache-filename-enum

info:
  name: Apache Filename Enumeration
  author: geeknik
  severity: low
  description: If the client provides an invalid Accept header, the server will respond with a 406 Not Acceptable error containing a pseudo directory listing.
  reference:
    - https://hackerone.com/reports/210238
    - https://www.acunetix.com/vulnerabilities/web/apache-mod_negotiation-filename-bruteforcing/
  metadata:
    max-request: 1
  tags: apache,misconfig,hackerone

http:
  - method: GET

    headers:
      Accept: "fake/value"
    path:
      - "{{BaseURL}}/index"

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 406

      - type: word
        words:
          - "Not Acceptable"
          - "Available variants:"
          - "<address>Apache Server at"
        condition: and
# digest: 4a0a0047304502203e734793535f2b117756856e4c502b483402fc63495b28e73de3fb17fc6ed967022100dcaba327a5b921703e1a811c155db4369b3160282f1247f8d822fc3305211160:922c64590222798bb761d5b6d8e72950