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,discovery

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: 490a00463044022045e490df13fbf99ad53fc50e084c461c7c8d7f41097edf240a9e8a76b264eeb4022033dde4d5a6b6f502b1236f4fe5b5a9536b192f7cad3f631d6e4b97c1dc5d78d0:922c64590222798bb761d5b6d8e72950