id: keycloak-admin-panel

info:
  name: Keycloak Admin Login Panel - Detect
  author: incogbyte,righettod,daffainfo
  severity: info
  description: Keycloak admin login panel was detected.
  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:redhat:keycloak:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 3
    vendor: redhat
    product: keycloak
    shodan-query:
      - http.favicon.hash:-1105083093
      - http.title:"keycloak"
      - http.html:"keycloak"
    fofa-query:
      - icon_hash=-1105083093
      - body="keycloak"
      - title="keycloak"
    google-query: intitle:"keycloak"
  tags: panel,keycloak,redhat,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}"
      - "{{BaseURL}}/auth/admin"
      - "{{BaseURL}}/auth/admin/master/console/"
      - "{{BaseURL}}/admin"
      - "{{BaseURL}}/admin/master/console/"

    stop-at-first-match: true

    host-redirects: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "<span>Keycloak</span>"
          - "alt=\"Keycloak"
          - "kc-form-buttons"
          - "/keycloak/img/favicon.ico"
          - "/admin/keycloak/"
        condition: or

      - type: status
        status:
          - 200
# digest: 490a00463044021f76fb0bec3bbe6499d260c3cce723f779bf7f2813035d44f655c5bc52603c6b022100f3783335c90bde9bcb4d48150627998fb4a6a6190485e28d55d99efcc68c52f1:922c64590222798bb761d5b6d8e72950