Skip to content

Soumit-Santra/Network-Web-Vulnerability-Assessment-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Vulnerability Scanner

Python Platform Security License

Created by Soumit Santra β€” Network & Web Vulnerability Assessment Tool
Β© 2026 Soumit Santra. All rights reserved.


⚠️ CRITICAL LEGAL & ETHICAL NOTICE

THIS TOOL IS STRICTLY FOR AUTHORIZED SECURITY TESTING ONLY!

  • DO NOT USE on systems you don't own or without explicit written permission
  • UNAUTHORIZED SCANNING is illegal under Computer Fraud and Abuse Act (USA), Computer Misuse Act (UK), and similar laws worldwide
  • OBTAIN WRITTEN AUTHORIZATION before testing any third-party systems
  • THE AUTHOR IS NOT RESPONSIBLE for misuse, damages, legal consequences, or illegal activities
  • VIOLATORS FACE CRIMINAL PROSECUTION including fines and imprisonment

Ethical Use Only:

  • Authorized penetration testing with written permission
  • Security auditing of systems you own
  • Educational learning in controlled lab environments
  • Professional security assessments with proper contracts
  • Bug bounty programs with explicit authorization
  • Never use against systems without explicit written permission

πŸ“š Educational Purpose

This tool is designed to help security professionals, students, and system administrators understand:

  • Network reconnaissance techniques and methodologies
  • Common web application vulnerabilities
  • Security header configurations and best practices
  • Port scanning and service enumeration
  • Information gathering techniques
  • Vulnerability assessment workflows

✨ Features

🌐 Network Reconnaissance

  • IP Address Resolution - DNS lookup with reverse DNS
  • Top-Level Domain Analysis - TLD extraction and nameserver discovery
  • Port Scanning - Comprehensive Nmap-based service detection
  • WHOIS Lookup - Domain registration and ownership information

πŸ” Web Vulnerability Assessment

  • Security Headers Analysis - Missing/misconfigured HTTP security headers
  • SSL/TLS Configuration - Certificate and cipher suite analysis
  • XSS Detection - Cross-Site Scripting vulnerability testing
  • SQL Injection Testing - Database injection point identification
  • Command Injection - OS command injection detection
  • SSRF Testing - Server-Side Request Forgery checks
  • Path Traversal - Directory traversal vulnerability detection
  • CORS Misconfiguration - Cross-Origin Resource Sharing issues
  • Information Disclosure - Sensitive data exposure detection

πŸ•΅οΈ Information Gathering

  • Robots.txt Analysis - Parse and identify sensitive paths
  • API Endpoint Discovery - Detect REST/GraphQL endpoints
  • Web Service Detection - Identify CMS, frameworks, and services
  • HTTP Method Enumeration - Test for dangerous HTTP methods
  • Sensitive File Detection - Search for configuration and backup files

πŸ“Š Reporting & Output

  • Comprehensive Reports - Detailed multi-section security assessment
  • Color-coded Terminal Output - Easy-to-read formatted results
  • Progress Indicators - Real-time scan progress with tqdm
  • Custom Save Locations - Flexible result storage options
  • Individual Scan Results - Save specific scan outputs separately

πŸ› οΈ Requirements

  • Python 3.6+
  • Nmap must be installed on your system
  • The script automatically installs required Python packages:
    • requests
    • python-whois
    • dnspython
    • python-nmap
    • colorama
    • tqdm
    • beautifulsoup4
    • urllib3

Installing Nmap

Linux:

sudo apt-get update
sudo apt-get install nmap

macOS:

brew install nmap

Windows: Download from nmap.org


πŸ’» Installation

Installation Options

Option 1: Auto-install (Recommended for Beginners)

  1. Download the script
  2. Run with Python:
    python3 scanner.py
  3. Dependencies install automatically on first run
  4. Restart the script if prompted after installation

Option 2: Manual Installation (Recommended for Advanced Users)

# Clone or download the repository
git clone https://github.com/yourusername/vulnerability-scanner.git
cd vulnerability-scanner

# Create virtual environment (optional but recommended)
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies from requirements.txt
pip install -r requirements.txt

# Make executable (Linux/macOS)
chmod +x scanner.py

# Run the tool
python3 scanner.py

Why Two Options?

  • Auto-install: Convenient for quick testing and beginners
  • Manual install: Better for production, virtual environments, and version control

🚦 Usage

Interactive Menu System

Run the script and choose from 7 different security assessment operations:

PORT SCANNER MENU
══════════════════════════════════════════════════════════
  1. Analyze Top-Level Domain
  2. Get IP Address Information
  3. Run Nmap Port Scan
  4. Check robots.txt
  5. Get WHOIS Information
  6. Run Web Vulnerability Scan
  7. Run Comprehensive Scan (All of the above)
  0. Exit
══════════════════════════════════════════════════════════

Command Line Usage

Interactive Mode:

python3 scanner.py
# Enter target when prompted

Direct Target Specification:

# Scan a domain
python3 scanner.py example.com

# Scan an IP address
python3 scanner.py 192.168.1.100

# Scan a URL
python3 scanner.py https://example.com

Example Workflows

Quick Domain Scan:

python3 scanner.py example.com
Select option: 2  # Get IP information
Select option: 4  # Check robots.txt

Comprehensive Security Assessment:

python3 scanner.py target-domain.com
Select option: 7  # Run all scans
Save report? (y/n): y
Enter save location: /path/to/reports/

Port Scan with Service Detection:

python3 scanner.py 192.168.1.50
Select option: 3  # Nmap scan
[Scanning with progress bar...]
Save result? (y/n): y

πŸ“Š Output & Reports

Terminal Output Features

  • Color-coded Results - Easy visual identification
    • Green: Success and open ports
    • Blue: Information messages
    • Yellow: Warnings
    • Red: Errors and closed ports
    • Cyan: Debug information
  • Progress Bars - Real-time scan progress
  • Formatted Sections - Clear headers and separators
  • Symbol Legend - Port state indicators

Report Structure

Default Save Location:

results_<target>_YYYYMMDD_HHMMSS/
β”œβ”€β”€ tld_analysis.txt          # Domain structure analysis
β”œβ”€β”€ ip_address.txt            # IP resolution details
β”œβ”€β”€ nmap_scan.txt             # Port scan results
β”œβ”€β”€ robots_txt.txt            # Robots.txt findings
β”œβ”€β”€ whois_info.txt            # WHOIS data
β”œβ”€β”€ web_vulns.txt             # Vulnerability scan results
└── comprehensive_report.txt  # Complete assessment

Comprehensive Report Sections:

  1. Summary - Executive overview with key findings
  2. IP Address Information - Network details
  3. Top-Level Domain Information - DNS structure
  4. WHOIS Information - Registration data
  5. Robots.txt Analysis - Sensitive path discovery
  6. Port Scan Results - Open services and versions
  7. Web Vulnerability Results - Security assessment

πŸŽ“ Learning Objectives

This tool helps security professionals understand:

  1. Reconnaissance Techniques - Information gathering methodologies
  2. Vulnerability Assessment - Common web application flaws
  3. Security Best Practices - Proper header configuration
  4. Network Scanning - Port scanning and service enumeration
  5. Reporting - Professional security assessment documentation

πŸ”’ Security Features

Security Headers Checked

  • X-Content-Type-Options
  • X-Frame-Options
  • Strict-Transport-Security (HSTS)
  • Content-Security-Policy (CSP)
  • X-XSS-Protection
  • Referrer-Policy
  • Feature-Policy
  • Cache-Control
  • X-Permitted-Cross-Domain-Policies

Vulnerability Tests

  • XSS payloads (10+ variants)
  • SQL injection (12+ payloads)
  • Command injection (8+ techniques)
  • Path traversal (6+ methods)
  • SSRF endpoints (AWS, GCP, Azure metadata)
  • Directory traversal detection
  • API endpoint discovery
  • Information disclosure patterns

βš–οΈ Legal Considerations

Allowed Uses

  • βœ… Authorized penetration testing with written permission
  • βœ… Security auditing of your own systems
  • βœ… Bug bounty programs with explicit scope
  • βœ… Educational use in controlled lab environments
  • βœ… Professional security assessments with contracts

Prohibited Uses

  • ❌ Unauthorized network scanning
  • ❌ Testing systems without permission
  • ❌ Exploiting discovered vulnerabilities
  • ❌ Circumventing security measures
  • ❌ Any malicious or harmful activities

Legal Frameworks

Be aware of these laws in your jurisdiction:

  • Computer Fraud and Abuse Act (CFAA) - USA
  • Computer Misuse Act - UK
  • Cybercrime Act - Various countries
  • GDPR and data protection laws - EU
  • Local cybersecurity legislation

πŸ›‘οΈ Responsible Disclosure

If you discover vulnerabilities during authorized testing:

  1. Document carefully - Note all details without exploiting
  2. Report responsibly - Contact system owner immediately
  3. Follow disclosure guidelines - Respect coordinated disclosure
  4. Provide remediation advice - Help fix the issue
  5. Maintain confidentiality - Don't publicize until fixed

🚨 Troubleshooting

Common Issues

Nmap Not Found:

# Verify Nmap installation
nmap --version

# Install if missing
sudo apt-get install nmap  # Linux
brew install nmap          # macOS

Permission Denied:

# Some scans require elevated privileges
sudo python3 scanner.py

Module Import Errors:

# Force reinstall dependencies
pip install --force-reinstall -r requirements.txt

# Or let script auto-install
python3 scanner.py  # Will check and install

Timeout Errors:

  • Target may be blocking scans
  • Firewall may be interfering
  • Network connectivity issues
  • Adjust timeout values in code if needed

SSL Certificate Errors:

  • Scanner disables SSL verification for testing
  • This is intentional for security assessment
  • Not recommended for production use

🀝 Contributing

Contributions welcome for:

  • Additional vulnerability tests
  • Improved detection accuracy
  • Better reporting formats
  • Performance optimizations
  • Bug fixes and stability improvements
  • Documentation enhancements

Guidelines:

  • Follow PEP 8 style conventions
  • Add docstrings to new functions
  • Test thoroughly before submitting
  • Update documentation for new features
  • Maintain ethical use focus

πŸ“š Further Reading

Recommended Resources:

  • OWASP Testing Guide
  • "The Web Application Hacker's Handbook" by Stuttard & Pinto
  • "Nmap Network Scanning" by Gordon Lyon
  • NIST Cybersecurity Framework
  • SANS Penetration Testing Resources
  • CVE Database and vulnerability research

⚠️ Final Warning

This tool performs active security testing that may:

  • Trigger intrusion detection systems
  • Be logged and monitored by target systems
  • Violate terms of service
  • Result in criminal prosecution if used without authorization
  • Cause service disruption if misconfigured

Remember:

  • Authorization is MANDATORY
  • Documentation is ESSENTIAL
  • Ethical conduct is NON-NEGOTIABLE
  • Legal compliance is YOUR RESPONSIBILITY

When in doubt, DON'T SCAN. Always obtain explicit written permission.


πŸ“„ License

MIT License - See LICENSE file for details

This tool is provided "as is" without warranty. Users are solely responsible for ensuring their use complies with all applicable laws and regulations.


"Security tools are like lock picks - powerful when used by professionals for legitimate purposes, dangerous when misused. Always choose the ethical path."

About

Advanced CLI-based network and web vulnerability scanner with port scanning, WHOIS, DNS analysis, and detection of XSS, SQLi, SSRF, and misconfigurations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages