id: zimbra-detect

info:
  name: Zimbra Detect
  author: UdinChan
  severity: info
  description: Send a GET request to js file on Zimbra server to obtain version information
  metadata:
    max-request: 1
  tags: tech,zimbra

http:
  - method: GET
    path:
      - "{{BaseURL}}/js/zimbraMail/share/model/ZmSettings.js"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Zimbra Collaboration Suite Web Client"

      - type: word
        part: header
        words:
          - "application/x-javascript"

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - 'CLIENT_VERSION\",					{type:ZmSetting.T_CONFIG, defaultValue:\"(.*?)"'
# digest: 4a0a0047304502204d5c0ec11cf99c3ebbbdccf3b5f61768cc2f56d2d23fd7926c24d758ac362a26022100cef2baa3c4fb0017b6302b4830d111600c4e6b7dfbe75f167bbf27f03ac6692c:922c64590222798bb761d5b6d8e72950