id: pulse-secure-version

info:
  name: Pulse Secure Version
  author: dadevel
  severity: info
  classification:
    cpe: cpe:2.3:a:pulsesecure:pulse_connect_secure:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    product: pulse_connect_secure
    vendor: pulsesecure
  tags: pulse,panel,pulsesecure

http:
  - method: GET
    path:
      - "{{BaseURL}}/dana-na/nc/nc_gina_ver.txt" # not present in newer release
      - "{{BaseURL}}/dana-cached/hc/HostCheckerInstaller.osx"

    stop-at-first-match: true

    matchers-condition: or
    matchers:
      - type: word
        part: body
        words:
          - 'NAME="ProductVersion"'
          - "<key>version</key>"
        condition: or
        case-insensitive: true

    extractors:
      - type: regex
        group: 1
        part: body
        regex:
          - '(?i)NAME="ProductVersion"\s+?VALUE="([^"]+)"'

      - type: regex
        group: 1
        part: body
        regex:
          - "(?i)<string>([^<]+)</string>"
# digest: 4a0a00473045022100ba2e53c4a8a2f89b2fb45104b736c3736e2f9bababf81e68d4412ed7f53b5e850220496afc5a26c505ae2d94a2152bf3e4bbca6630f09784a2ed39d23ef82f207eaf:922c64590222798bb761d5b6d8e72950