id: gcp-bucket-enum

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

self-contained: true

variables:
  BaseDNS: "storage.googleapis.com"

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

    redirects: false

    attack: batteringram
    threads: 10

    matchers:
      - type: status
        name: "Open GCP Bucket"
        status:
          - 200

      - type: status
        name: "Protected GCP Bucket"
        status:
          - 403
# digest: 4b0a00483046022100f0faf908cbb5f61d20b65f332ad44de601d17049e4cf11b1859b65769a191e09022100c2e00fcfcd4e31c19378a99d4c2e11dd14993b4ccc6cb2b5a66668a2cb4b6f09:922c64590222798bb761d5b6d8e72950