id: aws-s3-bucket-enum

info:
  name: AWS S3 Buckets - Cloud Enumeration
  author: initstring
  severity: info
  description: |
    Searches for open and protected buckets in AWS S3
  metadata:
    verified: true
    max-request: 1
  tags: cloud,enum,cloud-enum,aws,discovery

self-contained: true

variables:
  BaseDNS: "s3.amazonaws.com"

http:
  - raw:
      - |
        GET http://{{wordlist}}.{{BaseDNS}} HTTP/1.1
        Host: {{wordlist}}.{{BaseDNS}}

    redirects: false

    attack: batteringram
    threads: 10

    matchers-condition: or
    matchers:
      - type: status
        name: "Open AWS S3 Bucket"
        status:
          - 200

      - type: status
        name: "Protected AWS S3 Bucket"
        status:
          - 403
# digest: 4a0a00473045022040330052e09b20ab8d7ce1876fa078a1d9561e6f80c536d599acbd71957fd618022100ee73a27026a07d4ee42e6f938ec0799946111aa9c771840ca9bbd22324910300:922c64590222798bb761d5b6d8e72950