id: kubernetes-version

info:
  name: Kubernetes Version Exposure
  author: raesene,idealphase
  severity: info
  description: Searches for exposed Kubernetes API servers which return version information unauthenticated. For Google Kubernetes Engine (GKE) and Amazon Elastic Kubernetes Service (EKS) this template will extract default patch version for you.
  reference:
    - https://cloud.google.com/kubernetes-engine/docs/release-notes
    - https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html
  metadata:
    max-request: 1
    shodan-query: product:"Kubernetes" version:"1.21.5-eks-bc4871b"
  tags: tech,k8s,kubernetes,devops,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/version"

    matchers:
      - type: word
        words:
          - "gitVersion"
          - "goVersion"
          - "platform"
        condition: and

    extractors:
      - type: json
        json:
          - '.gitVersion'
# digest: 4a0a0047304502203ab3c01aef875290a3ea06126277bcbdd62fcd99807b0fb72773a79458d526eb02210081ad34fe0916c6b4c2cabebd5059c319c73adc9792fc9652e1f0828d82b4835c:922c64590222798bb761d5b6d8e72950