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

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: 4a0a0047304502200f726d59ae92f35b41374c196f8b7e21e9ab177d8c2b509d12a54423bcaec40a0221009ade9fd4433dbf69ba90e2945860d702fc1fe45efc419e2d9d98cf9ab6d76c7b:922c64590222798bb761d5b6d8e72950