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,discovery

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