id: puppetserver-detect

info:
  name: Puppetserver Detection
  author: c-sh0
  severity: info
  reference:
    - https://insinuator.net/2020/09/puppet-assessment-techniques/
  metadata:
    max-request: 1
  tags: tech,puppet,exposure,intrusive

http:
  - method: GET
    path:
      - "{{BaseURL}}/puppet-ca/v1/certificate_request/{{randstr}}"

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 404

      - type: word
        part: header
        words:
          - "x-puppet-version"
        case-insensitive: true

      - type: word
        part: body
        words:
          - "{{randstr}}"

    extractors:
      - type: kval
        kval:
          - x_puppet_version
# digest: 4a0a0047304502210087eae1fbf5f600d0b8f8d4e32a0423f0642d8fa0df34ae5c823c7f011ad73ad00220451bed10156ea7e4416fb6ee872ee0e9743f65429e0ffd7724139d7209b8e4d8:922c64590222798bb761d5b6d8e72950