id: caprover-default-login

info:
  name: Caprover - Default Login
  author: ritikchaddha
  severity: high
  description: |
    Caprover defaultl login has been detected.
  metadata:
    verified: true
    max-request: 1
    shodan-query: http.favicon.hash:988422585
  tags: caprover,default-login,misconfig,vuln

variables:
  password: captain42

http:
  - raw:
      - |
        POST /api/v2/login HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json
        x-namespace: captain

        {"password":"{{password}}"}

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "status\":100", "Login succeeded", "token\":")'
          - 'contains(header, "application/json")'
          - 'status_code == 200'
        condition: and
# digest: 490a00463044022000fe24ef30d5492834f292a86dfdcafe5b2983a8937c6b9a853ee8cd775d152f0220119fb7c6ff85db1e7cc49d52c3dbf97380019c93e6546c4af09eb815bf9eb72c:922c64590222798bb761d5b6d8e72950