CVE-2017-7921 Elastic Security · Elastic

Detect Hikvision Improper Authentication Exploitation (CVE-2017-7921) in Elastic Security

Detects exploitation attempts targeting CVE-2017-7921, an improper authentication vulnerability (CWE-287) in Hikvision IP cameras and multiple products. This vulnerability allows unauthenticated attackers to bypass authentication and gain unauthorized access to camera streams, configurations, and credentials by manipulating URL parameters. Listed on CISA KEV, indicating active exploitation in the wild. Attackers commonly use this to gain persistent access to surveillance infrastructure, pivot within networks, or exfiltrate sensitive footage.

MITRE ATT&CK

Tactic
Initial Access Persistence Credential Access Collection

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by source.ip with maxspan=5m
  [network where
    destination.port in (80, 443, 8000, 8080, 8443) and
    (
      url.path like~ "*/onvif/*" or
      url.path like~ "*/ISAPI/*" or
      url.path like~ "*/cgi-bin/*" or
      url.path like~ "*/SDK/*"
    ) and
    (
      url.query like~ "*auth=*" or
      url.query like~ "*ismerge=1*" or
      url.path like~ "*configurationFile*" or
      url.path like~ "*/Security/users*" or
      url.path like~ "*userCheck*"
    )
  ]
  [network where
    destination.port in (80, 443, 8000, 8080, 8443) and
    http.response.status_code in (200, 206)
  ]
critical severity high confidence

Elastic EQL sequence detection correlating a Hikvision auth-bypass request with a successful HTTP 200/206 response, indicating successful exploitation of CVE-2017-7921.

Data Sources

Elastic Agent Network EventsPacketbeatZeek HTTP Logs

Required Tables

logs-network.*packetbeat-*filebeat-*

False Positives & Tuning

  • Legitimate VMS software making successful API calls to authorized camera endpoints
  • Security audit tools with proper authorization receiving successful responses during assessments
  • Camera firmware update services accessing configuration endpoints with valid sessions

Other platforms for CVE-2017-7921


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Hikvision Auth Bypass via URL Parameter

    Expected signal: HTTP GET request to /ISAPI/Security/users with auth= query parameter visible in proxy/firewall logs; HTTP 200 response body containing XML user data if device is vulnerable

  2. Test 2Hikvision Configuration File Exfiltration

    Expected signal: HTTP GET request to /System/configurationFile with auth= parameter in proxy logs; if vulnerable, a binary configuration file download (often large, >100KB) in response

  3. Test 3Hikvision Default Credential Base64 Bypass

    Expected signal: Multiple HTTP GET requests to Hikvision ISAPI endpoints across one or more camera IPs with identical base64 auth parameter; sequential probing pattern visible in proxy logs

  4. Test 4RTSP Stream Access Post-Exploitation

    Expected signal: RTSP connection attempt to port 554 on camera IP with credentials in the URL; network logs show TCP session establishment on port 554 from non-standard client

Unlock Pro Content

Get the full detection package for CVE-2017-7921 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections