id: aws-object-listing

info:
  name: AWS bucket with Object listing
  author: pdteam
  severity: low
  description: Object listing is enabled in AWS bucket.
  reference:
    - https://mikey96.medium.com/cloud-based-storage-misconfigurations-critical-bounties-361647f78a29
  metadata:
    max-request: 1
  tags: aws,misconfig,bucket,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    max-size: 1000

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<ListBucketResult xmlns='

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

      - type: word
        part: header
        words:
          - "x-goog-metageneration"
          - "x-goog-generation"
        case-insensitive: true
        negative: true

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '<Name>([a-z0-9-._]+)'
# digest: 490a0046304402203054924f3f7581915c1a235416a1872de7a463e128e5be0784ca841c46618c10022044500befaaa794a6315e58a7c87fec7f66c300bc71e3e68b03e905fac688ad9f:922c64590222798bb761d5b6d8e72950