A Python-based Network Vulnerability Scanner designed to identify potential security risks in networked systems through port scanning, banner grabbing, service enumeration, operating system detection, and vulnerability assessment using Nmap.
This project demonstrates fundamental cybersecurity concepts including reconnaissance, vulnerability assessment, network enumeration, and secure scanning practices.
- Scans a specified range of TCP ports
- Identifies open ports on the target host
- Provides quick visibility into exposed services
- Connects to open ports
- Retrieves service banners when available
- Helps identify running applications and service versions
- Detects active network services
- Assists in identifying exposed applications
- Uses Nmap OS fingerprinting
- Attempts to identify the target operating system
- Uses Nmap NSE Vulnerability Scripts
- Detects known vulnerabilities when supported
- Provides additional security insights into exposed services
- Measures scan start and end times
- Displays total scan duration
This project demonstrates several cybersecurity concepts:
- Network Reconnaissance
- Port Scanning
- Service Enumeration
- Banner Grabbing
- Operating System Fingerprinting
- Vulnerability Assessment
- Attack Surface Discovery
- Security Auditing
- Nmap Scripting Engine (NSE)
- Network Security Fundamentals
- Python 3.x
- Socket Programming
- Nmap
- python-nmap
- Datetime Module
- Git & GitHub
vulnerability-scanner/
│
├── app.py
├── README.md
├── requirements.txt
├── .gitignore
├── LICENSE
│
└── screenshots/
└── demo.png
git clone https://github.com/asif-visionary/vulnerability-scanner.git
cd vulnerability-scannerpython -m venv .venvActivate:
.venv\Scripts\activatepython3 -m venv .venvActivate:
source .venv/bin/activatepip install -r requirements.txtThis project requires Nmap to be installed on your system.
Download and install Nmap:
https://nmap.org/download.html
Verify installation:
nmap --versionsudo apt update
sudo apt install nmapVerify:
nmap --versionpip install -r requirements.txtpython app.pyExample:
Enter the target IP or Hostname: scanme.nmap.org
Enter the starting port for scanning: 20
Enter the ending port for scanning: 100
Starting network scan for target: scanme.nmap.org...
Open ports found: [22, 80]
Banner for scanme.nmap.org:22
SSH Service Detected
Banner for scanme.nmap.org:80
HTTP Service Detected
Operating System:
Linux
Scan completed in:
0:00:15.234567
The scanner performs the following steps:
- Scans the specified port range.
- Identifies open ports.
- Attempts banner grabbing on detected services.
- Performs service and OS detection using Nmap.
- Executes Nmap vulnerability scripts.
- Displays scan findings and execution time.
Through this project, users can learn:
- Network Scanning Techniques
- TCP Port Enumeration
- Service Discovery
- Banner Grabbing Methodology
- Operating System Fingerprinting
- Vulnerability Detection
- Nmap Automation with Python
- Cybersecurity Assessment Fundamentals
- Secure Network Auditing Practices
Possible future improvements:
- Multi-threaded Port Scanning
- Web-based Dashboard
- PDF Report Generation
- Export Results to JSON/CSV
- CVE Mapping Integration
- Risk Scoring System
- Scan History Tracking
- Automated Remediation Recommendations
This project is intended solely for educational purposes and authorized security testing.
Users must obtain explicit permission before scanning, testing, or assessing any network, system, or service.
Unauthorized scanning may violate local laws, organizational policies, or service agreements.
The author assumes no responsibility for misuse, damage, or legal consequences resulting from the use of this software.
Always perform security testing responsibly and ethically.
This project is licensed under the MIT License.
Mohamed Asif
Cybersecurity Enthusiast | SOC | Cloud Security | Application Security