id: s3-detect

info:
  name: Detect Amazon-S3 Bucket
  author: melbadry9
  severity: info
  metadata:
    max-request: 1
  tags: aws,s3,bucket,tech,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/%c0"

    matchers-condition: or
    matchers:
      - type: regex
        part: body
        regex:
          - "(?:InvalidURI|InvalidArgument|NoSuchBucket)"

      - type: dsl
        dsl:
          - 'contains(to_lower(server), "amazons3")'
          - 'contains(to_lower(header), "x-amz-id")'
          - 'contains(to_lower(header), "x-amz-request-id")'
# digest: 490a004630440220030f609581eb3bcb4332594c53fdaae82b6b08f2fb9e6c8f79a0e417b3e1d64802205ef7981a5ae2d4adc1028a3c4b3b2e1af2a1131713cd0906b6ca62c7a9ae8306:922c64590222798bb761d5b6d8e72950