NetGuard is a multi-threaded network reconnaissance tool developed in Python. It is designed to assist Network Administrators and Security Analysts in automating the identification of active network services. The tool performs rapid TCP port scanning, executes service banner grabbing to identify software versions, and aggregates findings into a structured PDF audit report.
- Multi-Threaded Execution: Utilizes Python's concurrent.futures module to manage a thread pool of 100 workers, allowing for rapid scanning of port ranges without significant latency.
- Socket-Based Enumeration: Implements raw socket connections to determine port states (Open/Closed/Filtered) based on TCP handshake responses.
- Banner Grabbing: Automatically attempts to retrieve the service header (first 1024 bytes) from active ports to aid in version detection.
- Automated Reporting: Generates a timestamped, non-editable PDF report containing scan metadata and a summary table of vulnerable points.
- Error Handling: Includes robust exception handling for network timeouts, socket errors, and user interruptions.
- Python 3.10 or higher
- pip (Python Package Installer)
-
Clone the repository to your local machine:
git clone [https://github.com/your-username/NetGuard.git](https://github.com/your-username/NetGuard.git) cd NetGuard -
Install the required dependencies using the requirements file:
pip install -r requirements.txt
-
Create the virtual environment and install dependencies:
.\setup_env.ps1
-
Activate the virtual environment:
.\.venv\Scripts\Activate.ps1
-
Run the scanner:
python scanner.py <TARGET_IP_ADDRESS> # Example: python scanner.py 127.0.0.1
Notes:
- The PDF report is always saved as
netguard_last_scan.pdfand will be overwritten on each run. - If VS Code's Pylance still flags imports, set the interpreter to
./.venv/Scripts/python.exe(Command Palette > Python: Select Interpreter).
To execute a scan, run the script from the command line interface (CLI) with the target IP address as an argument.
Command Syntax:
python scanner.py <TARGET_IP_ADDRESS>A comprehensive walkthrough of the tool's functionality, including a safe localhost scan and report generation, can be viewed below.
- YouTube Demonstration: Watch Video Demo
- Local Video File:
demo.mp4(Located in the root directory)
For a detailed technical breakdown, architectural diagrams, and code explanation, please refer to the full system documentation located in the docs folder.