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

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