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/"

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