id: jupyter-notebook

info:
  name: Jupyter Notebook Login Panel - Detect
  author: hakimkt,arafatansari
  severity: info
  description: |
    Jupyter Notebook login panel was detected.
  reference:
    - https://www.exploit-db.com/ghdb/7970
  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:jupyter:notebook:*:*:*:*:*:*:*:*
  metadata:
    max-request: 4
    shodan-query: http.html:"JupyterHub"
    product: notebook
    vendor: jupyter
  tags: edb,panel,jupyter,notebook,exposure

http:
  - method: GET
    path:
      - "{{BaseURL}}/jupyter/login"
      - "{{BaseURL}}/jupyter/lab"
      - "{{BaseURL}}/jupyter/hub/lti/launch"
      - "{{BaseURL}}/hub/login"

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

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '/jupyter/static/base/images/logo.png'
          - '/jupyter/hub/logo'
          - 'Select items to perform actions on them.'
          - 'JupyterHub'
        condition: or

      - type: status
        status:
          - 200
# digest: 4a0a00473045022017a0cd815dc6751a5b4e7d052a469a5e67d0afc2717974f8b04b2c88bc3c426c022100bccd7706e0a7d77f2db14d1ba3fc8b17bc1e86267afcb6394d0dcd6e16c2055e:922c64590222798bb761d5b6d8e72950