Ingram is a powerful Webcam Vulnerability Scanning Tool designed to identify security weaknesses in network cameras. It is engineered to scan for vulnerabilities in popular webcam brands like Hikvision, Dahua, Uniview, and D-Link, making it an essential asset for cybersecurity professionals and network administrators.
Introduction to Webcam Vulnerability Scanning
In today’s interconnected world, webcams are ubiquitous, serving various purposes from home security to business surveillance. However, their widespread use also makes them potential targets for cyberattacks. Vulnerable webcams can be exploited to gain unauthorized access, leading to privacy breaches, data theft, or even as entry points into larger network compromises. This highlights the critical need for robust webcam vulnerability scanning tools to proactively identify and mitigate these risks.
Ingram emerges as a specialized framework focused on addressing these security concerns. It automates the process of vulnerability detection, allowing users to efficiently assess the security posture of their network cameras. By leveraging Ingram, users can identify potential weaknesses before they are exploited by malicious actors, strengthening their overall security defenses.
Demonstration of Ingram webcam vulnerability scanner performing a scan.
Installation Guide for Ingram
To begin using this webcam vulnerability scanning tool, ensure your system meets the following prerequisites:
System Requirements:
- Operating System: Linux or macOS are recommended for optimal performance and compatibility.
- Python Version: Python 3.8 or higher is required. It’s advisable to avoid version 3.11 due to potential compatibility issues with certain packages.
Installation Steps:
-
Clone the Repository:
Start by cloning the Ingram repository from GitHub using the following command:git clone https://github.com/jorhelp/Ingram.git
-
Navigate to the Project Directory and Set Up Virtual Environment:
Change your current directory to the newly cloned Ingram folder. Create and activate a virtual environment to isolate the tool’s dependencies:cd Ingram pip3 install virtualenv python3 -m virtualenv venv source venv/bin/activate
Using a virtual environment is a best practice to prevent conflicts with other Python projects and maintain a clean installation.
-
Install Dependencies:
Install the necessary Python packages listed in therequirements.txt
file:pip3 install -r requirements.txt
With these steps completed, Ingram, your webcam vulnerability scanning tool, is successfully installed and ready for operation.
Running Ingram: Executing Webcam Scans
To effectively utilize Ingram for webcam vulnerability scanning, follow these operational guidelines:
Preparation and Execution:
-
Activate Virtual Environment:
Before each use, ensure your virtual environment is activated:source venv/bin/activate
-
Prepare Target File:
Create a target file (e.g.,targets.txt
) listing the IP addresses or IP ranges of the webcams you intend to scan. Each target should be on a new line, with the following supported formats:# Comments can be added using the '#' symbol # Single IP address 192.168.0.1 # IP address with a specific port 192.168.0.2:80 # IP range with CIDR notation 192.168.0.0/16 # IP range with hyphen notation 192.168.0.0-192.168.255.255
-
Run Ingram Scan:
Execute the scan using therun_ingram.py
script, specifying the input target file and output directory:python3 run_ingram.py -i targets.txt -o output_folder
-
Port Specification (Optional):
If a port is specified in thetargets.txt
file (e.g.,192.168.6.6:8000
), Ingram will scan that particular port. Otherwise, it defaults to scanning common ports defined inIngram/config.py
. To scan custom ports, use the-p
argument:python3 run_ingram.py -i targets.txt -o output_folder -p 80 81 8000
-
Concurrency Adjustment (Optional):
The default concurrency is set to 300 threads. Adjust this based on your machine’s capabilities and network speed using the-t
parameter:python3 run_ingram.py -i targets.txt -o output_folder -t 500
Ingram supports scan interruption and resumption. While not real-time, it periodically saves progress, allowing you to continue scans by re-running the same command if interrupted.
Available Arguments:
For a comprehensive list of arguments, run:
python3 run_ingram.py -h
This will display help information including optional arguments such as input file (-i
), output directory (-o
), ports (-p
), threads (-t
), timeout (-T
), disabling snapshots (-D
), and debug mode (--debug
).
Enhancing Scans with a Port Scanner
Integrating a robust port scanner like Masscan can significantly enhance Ingram’s efficiency. By pre-scanning targets to identify active hosts and open ports, you can narrow down Ingram’s focus, leading to faster and more accurate webcam vulnerability scanning.
Using Masscan with Ingram:
-
Port Scan with Masscan:
Use Masscan to scan for open ports (e.g., 80, 8000-8008) on your target IPs. For example:masscan -p80,8000-8008 -iL target_ip_list.txt -oL masscan_result.txt --rate 8000
-
Format Masscan Output:
Process the Masscan output to extract open IP addresses and ports in the formatip:port
for Ingram:grep 'open' masscan_result.txt | awk '{printf"%s:%sn", $4, $3}' > targets_for_ingram.txt
-
Run Ingram on Filtered Targets:
Use the processedtargets_for_ingram.txt
file as input for Ingram:python3 run_ingram.py -i targets_for_ingram.txt -o ingram_output
By using Masscan to pre-filter targets, you ensure Ingram focuses on potentially vulnerable webcams, optimizing the webcam vulnerability scanning process.
Interpreting Ingram Scan Results
After running Ingram, the results are organized in the output directory you specified. Key files and folders include:
output_folder/
├── not_vulnerable.csv
├── results.csv
├── snapshots/
└── log.txt
results.csv
: This CSV file contains the detailed scan results, listing each IP address, port, detected device type, default credentials (username/password if found), and identified vulnerabilities.
Example results.csv
file showing identified webcam vulnerabilities and default credentials.
not_vulnerable.csv
: This file lists devices that were scanned but did not exhibit any detected vulnerabilities.snapshots/
: This directory contains snapshots captured from some of the scanned webcams, providing visual evidence and context for identified vulnerabilities.
Example snapshots
folder showing captured images from vulnerable webcams.
log.txt
: This log file contains detailed logs of the scan process, useful for debugging or reviewing the tool’s operation.
Disclaimer
Ingram is intended solely for ethical security testing and vulnerability research. It should not be used for illegal purposes or without proper authorization. The developers are not responsible for any misuse or damage caused by this tool. Users are expected to comply with all applicable laws and regulations when using Ingram.
Acknowledgements
We extend our gratitude to the following projects and individuals for their contributions and resources that have been instrumental in the development of Ingram:
- Aiminsun for CVE-2021-36260 vulnerability research.
- chrisjd20 for the Hikvision config file decryptor.
- mcw0 for DahuaConsole, aiding in Dahua device analysis.