id: gcp-firebase-rtdb-enum

info:
  name: GCP Firebase Realtime Database - Cloud Enumeration
  author: initstring
  severity: info
  description: |
    Searches for Firebase Realtime Databases in GCP.
  metadata:
    verified: true
    max-request: 1
  tags: enum,cloud,cloud-enum,gcp,discovery

self-contained: true

variables:
  BaseDNS: "firebaseio.com"

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

    redirects: false

    attack: batteringram
    threads: 10

    matchers-condition: or
    matchers:
      - type: status
        name: "Open GCP Firebase RTDB"
        status:
          - 200

      - type: status
        name: "Protected GCP Firebase RTDB"
        status:
          - 401

      - type: status
        name: "Payment GCP on Google Firebase RTDB"
        status:
          - 402

      - type: status
        name: "Deactivated GCP Firebase RTDB"
        status:
          - 423
# digest: 4b0a00483046022100b6b2896f4ce1e6a9837be3607a820f1bb941f25bde1af51e9660f64416928fe4022100e967115e55f332bf5b90d6801318bdf25c8c15edb0b4367bc61e2fb618e5381c:922c64590222798bb761d5b6d8e72950