A powerful, unique vulnerability scanner built with Python and Bash that combines multiple scanning techniques to identify security issues in networks and applications.
- Port Scanner - Identifies open ports and running services
- SSL/TLS Scanner - Detects expired certificates, weak protocols, and cipher vulnerabilities
- HTTPS Verification - Validates certificate chains and expiration dates
-
Dependency Scanner - Scans for outdated and vulnerable packages in:
- Python (requirements.txt)
- Node.js (package.json)
- Ruby (Gemfile)
- Java (pom.xml)
- Go (go.mod)
-
File Permission Scanner - Detects insecure file permissions:
- World-readable sensitive files
- SUID/SGID binaries
- World-writable executables
-
System Scanner - Checks for:
- Outdated system packages
- Vulnerable running services
- Known CVEs
- SQLite Database Integration - Persistent storage of scan results
- Multi-Format Reporting - JSON, CSV, and HTML reports
- Bash Integration - System-level utilities for advanced scanning
- File Integrity Monitoring - Hash-based file change detection
- Interactive CLI Menu - User-friendly interface
- Modular Architecture - Easy to extend with custom scanners
- Python 3.7 or higher
- pip3
- Bash shell
- macOS or Linux
- Clone/Navigate to project directory:
cd "Vulnerability scanner"- Run setup script:
bash setup.shThe setup script will:
- Check Python/pip installation
- Create optional virtual environment
- Install dependencies
- Set up directories
- Make bash scripts executable
- Verify installation:
python3 main.py versionbash bash_scripts/main_scanner.shThis opens an interactive menu with options to:
- Scan network hosts
- Scan directories
- Run network utilities
- Check file integrity
- View reports
- Configure scanner
# Basic port and SSL scan
python3 main.py scan-host -t 192.168.1.100
# Port only
python3 main.py scan-host -t example.com --ports
# SSL/TLS only
python3 main.py scan-host -t example.com --ssl
# Custom report formats
python3 main.py scan-host -t example.com -f json csv html# Scan for dependencies, file permissions, and system issues
python3 main.py scan-dir -d /path/to/project
# Dependency scanning only
python3 main.py scan-dir -d /path/to/project --dependencies
# File permission scanning only
python3 main.py scan-dir -d /path/to/project --files
# All scanners with custom formats
python3 main.py scan-dir -d /path/to/project -fmt json html# View current configuration
python3 main.py config --show
# Set a configuration value
python3 main.py config --set scanner.timeout 45
# Reset to defaults
python3 main.py config --resetbash bash_scripts/network_utilities.sh --help
# Get system information
bash bash_scripts/network_utilities.sh --system
# Check listening ports
bash bash_scripts/network_utilities.sh --ports
# Check running processes
bash bash_scripts/network_utilities.sh --processes
# Check for system updates
bash bash_scripts/network_utilities.sh --updates
# Run all checks
bash bash_scripts/network_utilities.sh --allbash bash_scripts/file_integrity_checker.sh help
# Find dangerous permissions
bash bash_scripts/file_integrity_checker.sh find-dangerous /path/to/dir
# Find sensitive files
bash bash_scripts/file_integrity_checker.sh find-sensitive /path/to/dir
# Check file integrity hash
bash bash_scripts/file_integrity_checker.sh check-integrity /path/to/file
# Monitor directory for changes
bash bash_scripts/file_integrity_checker.sh monitor /path/to/dir 5-
JSON Report - Machine-readable format suitable for parsing and integration
{ "scan_id": "20260327_153022_542", "target": "192.168.1.100", "vulnerabilities": [ { "type": "OPEN_PORT", "severity": "HIGH", "description": "Port 22 (SSH) is open", "remediation": "Review firewall rules" } ] } -
CSV Report - Tabular format for spreadsheet analysis
Type,Severity,Description,Affected Item,Remediation OPEN_PORT,HIGH,Port 22 (SSH) is open,192.168.1.100:22,Review firewall rules -
HTML Report - Beautiful, interactive report with visualization
- Color-coded severity levels
- Sortable vulnerability list
- Executive summary
- Scan metadata
All reports are saved in the output/ directory with timestamps.
Vulnerability scanner/
βββ main.py # Main CLI entry point
βββ setup.sh # Installation script
βββ requirements.txt # Python dependencies
βββ config/
β βββ config.json # Scanner configuration
βββ src/
β βββ __init__.py
β βββ database.py # SQLite database manager
β βββ config.py # Configuration manager
β βββ scanner.py # Main scanner coordinator
β βββ utils/
β β βββ __init__.py
β β βββ logging.py # Logging utilities
β βββ scanners/
β β βββ __init__.py
β β βββ port_scanner.py # Port scanning module
β β βββ ssl_tls_scanner.py # SSL/TLS scanning module
β β βββ dependency_scanner.py # Dependency analysis
β β βββ file_scanner.py # File permission scanner
β β βββ system_scanner.py # System vulnerability scanner
β βββ reports/
β βββ __init__.py
β βββ report_generator.py # Multi-format report generation
βββ bash_scripts/
β βββ main_scanner.sh # Interactive menu launcher
β βββ network_utilities.sh # Network scanning utilities
β βββ file_integrity_checker.sh # File integrity monitoring
βββ output/ # Generated reports
βββ logs/ # Application logs
βββ tests/ # Unit tests
Edit config/config.json to customize scanner behavior:
{
"scanner": {
"timeout": 30, // Connection timeout in seconds
"threads": 4, // Number of parallel threads
"retry_attempts": 3 // Retry failed connections
},
"scanners": {
"port_scanner": {
"enabled": true,
"common_ports": [22, 80, 443, 3306, 5432, 8080]
},
"ssl_tls_scanner": {
"enabled": true,
"check_certificate_validity": true,
"check_weak_ciphers": true
}
}
}- Scans common and custom ports
- Identifies running services
- Maps known vulnerabilities to open ports
- Severity levels based on port type
- Validates certificate validity
- Checks expiration dates
- Detects weak cipher suites
- Identifies outdated protocol versions
- CRITICAL alerts for expired certificates
- Parses multiple dependency formats
- Checks for known vulnerable packages
- Identifies outdated dependencies
- Supports 5+ package managers
- Detects world-readable/writable files
- Identifies sensitive exposed files (.env, .aws, .ssh)
- Finds dangerous SUID/SGID binaries
- Recursive directory traversal
- Checks for outdated system packages
- Verifies OpenSSL, OpenSSH, curl versions
- Detects running insecure services
- Compares against known vulnerability databases
- CRITICAL π΄ - Immediate action required
- HIGH π - Important, address soon
- MEDIUM π‘ - Should be addressed
- LOW π’ - Minor concern
- INFO π΅ - Informational
# Scan host, generate all formats, and automatically open HTML report
python3 main.py scan-host -t target.com -f json csv html && \
open output/report_*.html
# Scan directory and export to CSV for further analysis
python3 main.py scan-dir -d . -fmt csv && \
cat output/report_*.csv | grep CRITICAL#!/bin/bash
# Fail if any critical vulnerabilities found
python3 main.py scan-dir -d . -fmt json
if grep -q '"severity": "CRITICAL"' output/*.json; then
echo "Critical vulnerabilities found!"
exit 1
fi# Add to crontab for daily scans
0 2 * * * cd /path/to/scanner && python3 main.py scan-dir -d /app -fmt html > /var/log/scan.log 2>&1# Install Python 3
# macOS: brew install python3
# Ubuntu/Debian: sudo apt-get install python3 python3-pipchmod +x bash_scripts/*.shThe scanner intentionally disables SSL verification to detect certificate issues. This is intentional behavior.
Verify:
- Host is reachable (
pingtarget) - Firewall allows outbound connections
- Adjust timeout in config if network is slow
CRITICAL: Expired SSL certificate for example.com
HIGH: Port 23 (Telnet) is open - should be closed
MEDIUM: Django version 1.11.0 is vulnerable to CVE-2019-14234
MEDIUM: Requirements.txt with outdated packages detected
LOW: File /app/.env has world-readable permissions
INFO: OpenSSH version 7.4 detected
To add custom scanners:
- Create new file in
src/scanners/ - Implement scanner class with
scan()method - Return dict with vulnerabilities list
- Add to main scanner in
src/scanner.py
Example:
class CustomScanner:
def scan(self, target):
vulnerabilities = []
# Your scanning logic
return {'vulnerabilities': vulnerabilities}This project is provided as-is for security testing and educational purposes.
This tool should only be used on systems you own or have explicit permission to test. Unauthorized security testing is illegal.
- Python Security: https://www.python.org/community/security/
- OWASP Top 10: https://owasp.org/www-project-top-ten/
- CVE Database: https://cve.mitre.org/
- SSL Labs: https://www.ssllabs.com/
For issues or questions:
- Check the troubleshooting section
- Review configuration settings
- Check logs in
logs/directory - Verify all dependencies are installed
Vulnerability Scanner v1.0.0 - Built for comprehensive security assessment