id: apache-tika-detect

info:
  name: Apache Tika - Detection
  author: icarot
  severity: info
  description: |
    Detects an Apache Tika server, a toolkit that detects and extracts metadata and text from over a thousand different file types (such as PPT, XLS, and PDF).
  reference:
    - https://github.com/apache/tika/
  classification:
    cpe: cpe:2.3:a:apache:tika:*:*:*:*:*:*:*:*
  metadata:
    max-request: 3
    shodan-query: title:"Welcome to the Apache Tika"
    vendor: apache
    product: tika
  tags: tech,tika,apache,detect

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

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - 'Apache Tika'
          - 'apache.tika'
        condition: and

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: response
        regex:
          - "Apache Tika [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}"
# digest: 4b0a00483046022100d58f592660ee64caa083da64c183f110aed1836bba26c79246e6137c2de578e0022100c358c5c6320215e8484a37040a0f97d23e0906e42573569116468563cbe80a54:922c64590222798bb761d5b6d8e72950