id: default-glassfish-server-page

info:
  name: GlassFish Server Default Page
  author: dhiyaneshDk,righettod
  severity: info
  classification:
    cpe: cpe:2.3:a:oracle:glassfish_server:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: oracle
    product: glassfish_server
    shodan-query: http.title:"GlassFish Server - Server Running"
  tags: tech,glassfish,discovery

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

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_any(to_lower(body), "glassfish server - server running", "glassfish server with premier support", "<b>glassfish server</b>", "glassfish server installation directory")'
        condition: and

    extractors:
      - type: regex
        part: header
        group: 1
        regex:
          - 'GlassFish\s+Server\s+([A-Za-z0-9\s.]+)(\n|\r)'
# digest: 4a0a00473045022006cb238e624a74dc6b60239c3db5d36139cef41ef0b96dcacc12d931c8670126022100fb823361bccbe9582b95ad185b05f6a92c69bc8dc119125f4a79c3198781b094:922c64590222798bb761d5b6d8e72950