id: checkmk-login

info:
  name: Checkmk Login Panel - Detect
  author: princechaddha,righettod
  severity: info
  description: Checkmk login panel was detected.
  reference:
    - https://checkmk.com/
  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:checkmk:checkmk:*:*:*:*:*:*:*:*
  metadata:
    max-request: 5
    vendor: checkmk
    product: checkmk
    verified: true
    shodan-query: http.title:"Check_MK"
  tags: panel,checkmk,detect,login

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

    redirects: true
    max-redirects: 5
    stop-at-first-match: true
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200 || status_code == 401'
          - 'contains_any(to_lower(body), "check_mk multisite login", "checkmk", "check_mk mobile")'
        condition: and

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '<div id="version">([0-9.a-z]+)<\/div>'
          - '<div id="foot">Version: ([0-9.a-z]+)'
# digest: 4a0a00473045022100e398791004172bb3c10e995310a7238bd3a7f646688e29e12b9b626c4bdc049602203864df48f32a514361be229124769345460ccdc95b5cda699260fe6b258affc0:922c64590222798bb761d5b6d8e72950