id: openam-panel

info:
  name: OpenAM Login Panel - Detect
  author: philippedelteil
  severity: info
  description: OpenAM 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:forgerock:openam:*:*:*:*:*:*:*:*
  metadata:
    max-request: 20
    vendor: forgerock
    product: openam
    shodan-query:
      - http.title:"OpenAM"
      - http.title:"openam"
    fofa-query: title="openam"
    google-query: intitle:"openam"
  tags: panel,openam,opensso,login,forgerock,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}{{paths}}"
    payloads:
      paths:
        - "/openam/XUI"
        - "/XUI"
        - "/XUI/#login"
        - "/UI"
        - "/sso/XUI"
        - "/sso/UI"
        - "/sso/UI/#login"
        - "/opensso/UI/Login"
        - "/openam/UI/login"
        - "/openam/UI/#loginlogin"
        - "/openam/UI/Login"
        - "/openam/XUI/Login"
        - "/openam/XUI/login"
        - "/openam/XUI/#login"
        - "/am/UI/Login"
        - "/am/UI/#login"
        - "/am/XUI/"
        - "/am/XUI/Login"
        - "/am/json/serverinfo/*"
        - "/openam/json/serverinfo/*"

    host-redirects: true
    stop-at-first-match: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: word
        words:
          - 'urlArgs: "v='
          - 'Sign in to OpenAM'
          - 'ForgeRock'
          - 'forgerock'
          - 'FRForgotUsername'
          - 'successfulUserRegistrationDestination'
        condition: or

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - 'urlArgs: "v=([0-9.abcd]+)'
# digest: 4b0a00483046022100e34ddded4e55bfaa38794fd0e8134199ace2cc7647219fd20dbfd12c7ebd1abe022100a0f28f2a366852170592d6674f478e12494ea06c95c327fffdaae6607edc5383:922c64590222798bb761d5b6d8e72950