id: etcd-version

info:
  name: Etcd Version - Detect
  author: pussycat0x
  severity: info
  description: Template detects Etcd version.
  reference:
    - https://etcd.io/
  metadata:
    verified: true
    max-request: 1
    shodan-query: product:"etcd"
  tags: tech,k8s,kubernetes,devops,etcd,discovery

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

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"etcdserver"'
          - '"etcdcluster"'
        condition: and

      - type: word
        part: header
        words:
          - "application/json"

      - type: status
        status:
          - 200

    extractors:
      - type: dsl
        dsl:
          - 'trim(body,"{}")'
# digest: 4b0a00483046022100dcbc423241a47dd2216c1578abb449271229024802279691c28eb76df5ff314a022100b51922b041dbdbd7b773c48561d7f97570954384e26a0b70b9f0e9529ab54907:922c64590222798bb761d5b6d8e72950