id: s3-detect

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

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: 490a0046304402202bec8c6eda4aa9b8ed57be982dd8df8786322f16902e853d0e43326db517352402201040681c75b8e81cd6aecf1be4e980efc0437249c0f1a22cb42a101cc3c2e6b6:922c64590222798bb761d5b6d8e72950