id: nextcloud-install

info:
  name: Nextcloud Exposed Installation
  author: skeltavik
  severity: high
  description: Nextcloud installation is exposed.
  reference:
    - https://docs.nextcloud.com/server/latest/admin_manual/installation/installation_wizard.html
  metadata:
    max-request: 1
  tags: tech,nextcloud,storage,misconfig,vuln

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

    host-redirects: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<fieldset id="adminaccount"><legend>Create an <strong>admin account</strong></legend>'
          - '<legend><a id="showAdvanced" tabindex="0" href="#">Storage &amp; database'
        condition: and

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