id: wordpress-db-backup-listing

info:
  name: WordPress DB Backup
  author: Suman_Kar
  severity: medium
  description: WordPress DB Backup plugin exposes db file along with directory listing.
  metadata:
    max-request: 1
  tags: wordpress,backup

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/uploads/database-backups/"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "Index of /"
          - "wp-content/uploads/database-backups"
          - ".sql"
        condition: and
        part: body

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