id: jupyter-notebooks-exposed

info:
  name: Jupyter notebooks exposed to reading and writing
  author: johnk3r
  severity: high
  description: Jupyter notebooks are exposed.
  reference:
    - https://blog.aquasec.com/python-ransomware-jupyter-notebook
  classification:
    cpe: cpe:2.3:a:jupyter:notebook:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: jupyter
    product: notebook
    shodan-query: title:"Home Page - Select or create a notebook"
  tags: jupyter,misconfig

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

    host-redirects: true
    max-redirects: 1

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200

      - type: word
        part: body
        words:
          - '<title>Home Page - Select or create a notebook</title>'
          - '<div> There are no notebooks running. </div>'
        condition: or
# digest: 4a0a0047304502205ffe1e37d86fd82e149941aaab6def95797ef29af66cfcf2de730bd88fd59b900221008047f16e39cbe963ce74c499950e025e2a11f701deebe6cf29c607b29d04c549:922c64590222798bb761d5b6d8e72950