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

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