id: gocd-encryption-key

info:
  name: GoCd Encryption Key
  author: dhiyaneshDk
  severity: low
  description: GoCd Encryption Key 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
  metadata:
    max-request: 1
    shodan-query: http.title:"Create a pipeline - Go",html:"GoCD Version"
  tags: go,gocd,exposure,misconfig

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

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

      - type: regex
        regex:
          - "([a-z0-9]){32}"

      - type: word
        part: header
        words:
          - "text/plain"

    extractors:
      - type: regex
        regex:
          - "([a-z0-9]){32}"
# digest: 490a0046304402205ac41f33e34d969b020ee864720a58cdc98c17066213906ca0a6703759bee6260220648ad5ffaa33adc1a318395cd2da424417fb64cf1ed962a0bb6da6cf73514c09:922c64590222798bb761d5b6d8e72950