id: gcp-app-engine-enum

info:
  name: GCP App Engine (Appspot) - Cloud Enumeration
  author: initstring
  severity: info
  description: |
    Searches for App Engine Apps in GCP.
  metadata:
    verified: true
    max-request: 1
  tags: enum,cloud,cloud-enum,gcp,discovery

self-contained: true

variables:
  BaseDNS: "appspot.com"
  loginRedirect: "accounts.google.com"

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

    redirects: false

    attack: batteringram
    threads: 10

    matchers:
      - type: dsl
        name: "Open GCP App Engine App"
        dsl:
          - "status_code==200"

      - type: dsl
        name: "Protected GCP App Engine App"
        dsl:
          - "status_code==302"
          - contains(location, "login")
        condition: and
# digest: 4b0a00483046022100b7ca6a5620e553021c93b3a71a9afb91726a420ca8cbe42fe1b43debb214b2600221009f199a7494eab9c50e752fa60040ebaf0831b622d5734eb8b3c1d4bf9cb971d4:922c64590222798bb761d5b6d8e72950