id: apache-hive-detect

info:
  name: Apache Hive - Detect
  author: icarot
  severity: info
  description: |
    Apache Hive web application was detected, a data warehouse software facilitates reading, writing, and managing large datasets residing in distributed storage using SQL.
  reference:
    - https://github.com/apache/hive
  classification:
    cpe: cpe:2.3:a:apache:hive:4.6.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: apache
    product: hive
    shodan-query: title:"HiveServer2"
  tags: tech,apache,hive,detect,discovery

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

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<title>HiveServer2</title>'
          - 'hiveserver2'
        condition: and

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        name: version
        group: 1
        part: body
        regex:
          - "<td>([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}), \\S+</td>\\n\\s+<td>Hive version and revision</td>"
# digest: 4a0a00473045022048e62c6d827a95200169763450b5bdcf36d4cd9df0df575942f9888f5f360e930221008db66ee990966f6b8e3bbd9e29eb65d870a2f01c4f5acfc1688b0b962b315056:922c64590222798bb761d5b6d8e72950