id: forgerock-ig-panel

info:
  name: ForgeRock IG Login/Welcome Page - Detect
  author: r3dg33k
  severity: info
  description: |
    Detects ForgeRock Identity Gateway login or welcome page and extracts version number
  metadata:
    verified: true
    max-request: 1
    fofa-query: body="ForgeRock Identity Platform"
    shodan-query: html:"ForgeRock Identity Platform"
  tags: forgerock,ig,login,identity-gateway,detect,discovery

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

    redirects: true

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(tolower(body), "forgerock")'
          - 'contains_any(tolower(body), "<title>ig", "identity gateway", "forgerock identity platform", "welcome to identity gateway")'
        condition: and

    extractors:
      - type: regex
        name: ig_version
        part: body
        regex:
          - 'Identity Gateway (\d+\.\d+(\.\d+)?)'   # Extracts version like 7.2 or 7.2.0
# digest: 4a0a00473045022100a8ff50251e05d43bd603a78176d16050a48f28eed3b7d9c1461e1603e86f095a02206623c142b452df61747cab0bdf6ffbbfeeaa76b3f30916f8806c6a0fc5b2617c:922c64590222798bb761d5b6d8e72950