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,discovery

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: 490a0046304402200114309aeaf2410b61c8c68372309c838d246a5c8ba43c64980b97bd4dd2d6380220541c7eb661e18da8c417108fd3f5f1c136c9024097bbf892fadfcf5cc6ac4c3d:922c64590222798bb761d5b6d8e72950