id: roundcube-webmail-portal

info:
  name: Roundcube webmail
  author: ritikchaddha
  severity: info
  classification:
    cpe: cpe:2.3:a:roundcube:webmail:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: roundcube
    product: webmail
    shodan-query: http.component:"RoundCube"
  tags: roundcube,portal,tech,discovery

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

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

    matchers-condition: and
    matchers:
      - type: regex
        regex:
          - '"rcversion":\d\d\d\d'
          - '(?i)roundcube'
        condition: and

      - type: status
        status:
          - 200
    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '"rcversion":(\d+)'
        internal: true
        name: raw_version

      - type: dsl
        dsl:
          - 'concat(to_number(substr(raw_version, 0, 1)), ".", to_number(substr(raw_version, 1, 3)), ".", to_number(substr(raw_version, 3)))'
# digest: 490a00463044022066849961672053f7fce8937eba82b6e99e45d2e758ce5f9e3c92ba6c25d01dcc02202eab4fbb615d17d49c060378478dca13c406419b8fa02231eb1d03f0d11668f1:922c64590222798bb761d5b6d8e72950