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

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: 4b0a00483046022100d4a1efeb5a3c952da76caf750fcf7adbee87fd014d3cbffc7bb5503b87d91c38022100c7b8f1a6f61056aca30f16ff02320a46c32b728276b8eaaaca7d653dfa2d2f8f:922c64590222798bb761d5b6d8e72950