Detect Hikvision Improper Authentication Exploitation (CVE-2017-7921) in Microsoft Sentinel
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
KQL Detection Query
union DeviceNetworkEvents, CommonSecurityLog
| where TimeGenerated > ago(24h)
| where DestinationPort in (80, 443, 8000, 8080, 8443)
| where RequestURL has_any ("/onvif/", "/ISAPI/", "/cgi-bin/", "/SDK/", "/snapshot")
| where RequestURL has_any ("?auth=", "&auth=", "ismerge=1", "/Security/users", "/userCheck", "/configurationFile")
| extend SuspiciousPattern = case(
RequestURL has "?auth=YWRtaW46MTEQ", "Default-credential-bypass",
RequestURL has "configurationFile", "Config-exfil-attempt",
RequestURL has "/Security/users" and RequestMethod == "GET", "User-enumeration",
RequestURL has "ismerge=1", "Auth-bypass-param",
"Suspicious-Hikvision-Request"
)
| where isnotempty(SuspiciousPattern)
| summarize
RequestCount = count(),
DistinctURLs = dcount(RequestURL),
FirstSeen = min(TimeGenerated),
LastSeen = max(TimeGenerated),
SampleURLs = make_set(RequestURL, 5)
by SourceIP, DestinationIP, SuspiciousPattern
| where RequestCount >= 1
| extend RiskScore = case(
SuspiciousPattern == "Default-credential-bypass", 90,
SuspiciousPattern == "Config-exfil-attempt", 85,
SuspiciousPattern == "Auth-bypass-param", 80,
70
)
| sort by RiskScore desc Detects HTTP requests to Hikvision camera endpoints that match known CVE-2017-7921 authentication bypass patterns, including default credential base64 strings, configuration file access, and authentication parameter manipulation.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate ONVIF integration tools used by security management software performing routine polling
- Network vulnerability scanners (Nessus, Qualys, Rapid7) performing scheduled assessments of camera infrastructure
- Hikvision iVMS or other legitimate management software accessing ISAPI endpoints for configuration
- Security researchers performing authorized penetration tests against camera systems
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.
- 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
- 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
- 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
- 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.