id: thruk-panel

info:
  name: Thruk Login Panel - Detect
  author: ffffffff0x,righettod
  severity: info
  description: Thruk Monitoring panel was detected.
  reference:
    - https://thruk.org/
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cwe-id: CWE-200
    cpe: cpe:2.3:a:thruk:thruk:*:*:*:*:*:*:*:*
  metadata:
    max-request: 6
    vendor: thruk
    product: thruk
    fofa-query:
      - title=="Thruk Monitoring Webinterface"
      - title=="thruk monitoring webinterface"
      - body="thruk"
    shodan-query: http.html:"thruk" || http.title:"thruk monitoring webinterface"
  tags: thruk,panel,login,discovery

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

    redirects: true
    max-redirects: 6

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - 'contains_any(to_lower(body), "<title>thruk monitoring webinterface", "<title>thruk - monitoring webinterface", "thruk_static_export")'
          - 'contains_any(to_lower(header), "x-thruk-auth-key", "thruk_test=")'
        condition: or

      - type: dsl
        dsl:
          - 'status_code == 200 || status_code == 401'

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '(?i)version_info\s*=\s*.?([a-z0-9./\s.-]+).?'
# digest: 4b0a00483046022100b3227f3560607f8ad386bd8b7bfa4be7960e5f7f2672f123af22a05089135700022100b2bb07c5c62718a881723310df3c87127fe2bcfad94c8643d9c59cf3765885ca:922c64590222798bb761d5b6d8e72950