id: cups-detect

info:
  name: CUPS - Detect
  author: rxerium
  severity: info
  description: |
    An instance running CUPS was detected.
  metadata:
    verified: true
    max-request: 1
    shodan-query: product:"CUPS (IPP)"
  tags: cups,tech,detect

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

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Web Interface is Disabled - CUPS"
          - "Forbidden - CUPS"
          - "Server: CUPS"
        condition: or

      - type: status
        status:
          - 200
          - 404
          - 403
        condition: or

    extractors:
      - type: regex
        part: body
        name: version
        regex:
          - 'CUPS v([0-9.]+)>'
# digest: 4a0a0047304502204f668d35f2d1e3f40efbb6fcfedfd96834b3c20e0f899c0f0c0786eff1b231de022100ff9a2418718dfd1c06b523ae82217294e86234bed07f7acd1ca0a41d2b98c710:922c64590222798bb761d5b6d8e72950