id: gcloud-access-token

info:
  name: Google Cloud Access Token
  author: DhiyaneshDK
  severity: medium
  description: Internal Google Cloud access tokens are exposed.
  metadata:
    verified: true
    max-request: 2
    shodan-query: html:"access_tokens.db"
  tags: google,cloud,devops,exposure,files

http:
  - method: GET
    path:
      - "{{BaseURL}}/access_tokens.db"
      - "{{BaseURL}}/.config/gcloud/access_tokens.db"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - 'SQLite'
          - 'access_token'
        condition: and

      - type: word
        part: header
        words:
          - 'application/octet-stream'

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100b7550a8fd9507e8e0c83181e81a861612212ee584a7da96eedf10470ffdd4556022003aa2c325c1fcc3f11289e4ff7b9ed1ec2126eb48c4196e8af95a42a9b13db2a:922c64590222798bb761d5b6d8e72950