The NetRiskScanner is an advanced Python-based network scanning and risk assessment tool. Below is a detailed explanation of all its features and functionalities:
The NetRiskScanner leverages the Nmap utility to perform advanced network scanning. It simplifies Nmap’s powerful functionalities through a graphical user interface (GUI).
- Ping Scan (
-sn): Quickly checks whether hosts in a network are active without scanning ports. - SYN Scan (
-sS): Performs stealthy port scanning by sending SYN packets and analyzing responses. It does not complete the TCP handshake. - TCP Connect Scan (
-sT): Establishes full TCP connections to detect open ports, useful when SYN Scan isn’t available. - UDP Scan (
-sU): Detects open UDP ports by sending UDP packets and analyzing responses. - Null Scan (
-sN): Sends packets with no flags to detect closed ports. - FIN Scan (
-sF): Sends packets with only the FIN flag to detect closed ports. - Xmas Scan (
-sX): Sends packets with FIN, PSH, and URG flags set to detect closed ports. - ACK Scan (
-sA): Maps firewall rules by sending ACK packets. - Window Scan (
-sW): Explores firewalls using TCP Window size. - IP Protocol Scan (
-sO): Identifies supported IP protocols on a target.
- OS Detection (
-O): Identifies the operating system running on the target machine. - Service Scan (
-sV): Detects the versions of services running on open ports. - Aggressive Scan (
-A): Combines OS detection, service detection, and traceroute. - Disable Ping (
-Pn): Skips host discovery and scans all provided targets. - Verbose Mode (
-v): Provides detailed scan output in real-time.
These options are presented in dropdown menus and checkboxes, allowing users to customize scans easily.
- Left Panel: Displays live scan results as they are received. This allows users to monitor scans in real-time without waiting for the entire process to complete.
- Right Panel: Shows a detailed risk assessment based on the vulnerabilities identified during the scan.
- Progress Bar: Provides a visual representation of scan progress. It updates dynamically as the scan progresses, giving users real-time feedback on the operation's status.
- Status Bar: Displays text-based status updates, such as “Scanning,” “Analysis Complete,” or error messages.
This feature uses Google’s Generative AI to analyze scan results and provide detailed risk assessments. The analysis includes:
-
Input Parsing:
- Parses the Nmap output to identify open ports, running services, and their versions.
- Uses vulnerability databases (e.g., CVE) to cross-reference findings.
-
Risk Levels:
- Assigns severity scores to vulnerabilities (Low, Medium, High, Critical).
- Categorizes risks for each service and port.
-
Report Structure:
- Executive Summary: Highlights critical risks and provides a summary of scan findings.
- Identified Vulnerabilities: Lists detailed descriptions of vulnerabilities and their impacts.
- Risk Levels Table: Organizes findings in a table format for clarity:
- Port
- Service
- Risk Level
- Description
- Recommendations:
- Immediate actions (e.g., applying patches, configuring firewalls).
- Short-term strategies (e.g., vulnerability scanning).
- Long-term strategies (e.g., penetration testing).
-
Dynamic Updates:
- The Risk Assessment section is automatically updated when analysis is complete.
- Analysis Button: Disabled until a scan is completed.
- Save Button: Disabled until the Risk Assessment section contains valid data.
- Clear Results Button: Clears both scan results and risk assessments and disables dependent buttons.
This ensures that buttons are context-aware, reducing the chances of errors or unnecessary actions.
- Users can save scan results and risk assessments to a
.txtfile for documentation and sharing.
- Users can save the Risk Assessment report to a
.txtfile. - Includes a dialog box to specify file location and name.
- Displays the exact Nmap command being executed based on user inputs.
- Allows users to copy the command for use in a terminal or script.
- Ensures that target IPs, domains, and port ranges are correctly formatted.
- Displays error messages if inputs are invalid.
- Catches unexpected errors during scanning or risk analysis and provides detailed error messages.
- Offers two themes:
- Cyborg (Dark Mode): Ideal for low-light environments.
- United (Light Mode): Provides high visibility in bright settings.
- Accepts:
- Single IP or domain.
- IP ranges (e.g.,
192.168.1.1-10). - CIDR notation (e.g.,
192.168.1.0/24).
- Dropdown menus and checkboxes simplify selecting scan types and advanced options.
- Results and risk assessments are displayed side-by-side for quick reference.
- Scrollbars ensure all content is accessible.
- Clears both panels and disables dependent buttons.
- Resets the state of the application for a new scan.
Ensure the following are installed and set up on your system:
- Python 3.8 or higher is required. Download it from Python Official Website.
- Ensure Nmap is installed on your system. Download it from Nmap Official Website.
- Verify installation by running:
nmap --version
- The required Python libraries are listed in the
requirements.txtfile. They include:ttkbootstrapfor modern GUI components.tkinterfor core GUI functionalities.
Follow these steps to set up and run the NetRiskScanner:
git clone https://github.com/0xmfbk/NetRiskScanner-Tool.gitcd NetRiskScannerpip install --break-system-packages -r requirements.txtnmap --versionRun the tool with the command:
python NetRiskScanner.pyEnter Target Information:
- Specify the target IP address, domain name, or CIDR range in the Target field.
- Optionally, specify a port range (e.g., 20-80) and spoof MAC address.
- Select Scan Type:
- Choose from the available scan types (e.g., SYN Scan, TCP Connect, UDP Scan) in the dropdown menu.
- Enable Advanced Options:
- Enable features like OS detection, service scan, verbose output, or disable ping.
- Click the Start Scan button to begin scanning.
- Monitor the scan progress with the progress bar.
- View:
- Scan Results in the left panel.
- Risk Assessment in the right panel.
Save results by navigating to:
File > Export Results
- .txt (plaintext format)
- .json (structured format)
- Nmap_Main.py: Main application file for the GUI interface.
- utils: helper functions for Tool.
validator.py: Validates target inputs like IP addresses, port ranges, and MAC spoofing.nmap_runner.py: Builds and executes Nmap commands.
requirements.txt: Contains all necessary Python dependencies.
