id: h2console-panel

info:
  name: H2 Console Web Login Panel - Detect
  author: righettod
  severity: info
  description: H2 Console Web login panel was detected.
  reference:
    - https://mp.weixin.qq.com/s/Yn5U8WHGJZbTJsxwUU3UiQ
    - https://jfrog.com/blog/the-jndi-strikes-back-unauthenticated-rce-in-h2-database-console
  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:h2database:h2:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: h2database
    product: h2
    shodan-query:
      - http.title:"H2 Console"
      - http.title:"h2 console"
      - cpe:"cpe:2.3:a:h2database:h2"
    fofa-query: title="h2 console"
    google-query: intitle:"h2 console"
  tags: panel,h2,console,h2database,discovery

http:
  - method: GET
    path:
      - '{{BaseURL}}/h2-console/login.jsp'

    matchers:
      - type: dsl
        dsl:
          - "status_code==200"
          - "contains(tolower(body), '<title>h2 console</title>')"
        condition: and
# digest: 4b0a00483046022100d7e84662885506466091fc86069a4e428c318e2aeda1da2a49060cf180c4e8af022100c57c8f9d315df6995c83192d4c029b59dca1f57d7b9a6cb6937024154da71d83:922c64590222798bb761d5b6d8e72950