A comprehensive cybersecurity toolkit with a web-based interface for analyzing files, networks, memory, registry, URLs, and system vulnerabilities on Windows systems.
β οΈ Note: This project is designed for Windows only and does not support Linux. Support for other operating systems may be added in the future.
Open Command Prompt or PowerShell and run:
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python app.py
The application will start at http://127.0.0.1:5000
Open your browser and navigate to:
http://127.0.0.1:5000
CyberShield is a Flask-based web application that provides multiple security scanning and analysis tools. It combines various security utilities into a unified web interface for easy access and comprehensive system analysis.
Purpose: Analyzes suspicious files for malware, packed executables, and embedded threats.
Key Features:
- File Identification: Detect file type, format, and calculate MD5/SHA256 hashes
- Entropy Analysis: Calculate Shannon entropy to detect packed/encrypted files (>7.2 = suspicious)
- Extension Spoofing Detection: Identify files that are actually executables disguised with other extensions
- PE (Portable Executable) Analysis:
- Digital signature verification
- Packer detection (UPX, etc.)
- Compilation timestamp analysis
- Timestomping detection (future dates)
- Dangerous API detection (VirtualAlloc, WriteProcessMemory, CreateRemoteThread, ShellExecute)
- Embedded File Detection: Find hidden files within the main file (ZIP, EXE, PDF, ELF)
- String Extraction: Extract and analyze strings (IP addresses, emails, URLs, registry keys, suspicious commands)
- YARA Rules Scanning: Scan files against custom YARA rule sets
Files:
file_analysis.py- Command-line analyzerweb_analyzer.py- Web interface version
Purpose: Discovers devices on the network and analyzes network configuration.
Key Features:
- Interface Detection: Identify active network interface (Wi-Fi)
- Public IP Info: Fetch ISP and ASN information from ipinfo.io
- DHCP/DNS Parsing: Extract DHCP and DNS server information
- Host Discovery: Scan network for active devices using nmap
- Port Scanning: Scan common ports (21, 22, 23, 80, 443, 445, 3389, 161)
- OS Fingerprinting: Guess operating system from nmap data
- SNMP Queries: Query SNMP community 'public' for device information
- NetBIOS Enumeration: Get NetBIOS names via nbtstat
Files:
network.py- Command-line network analyzerweb_network.py- Web interface version
Purpose: Scans Windows registry for malicious persistence mechanisms and security issues.
Key Features:
- Startup Program Detection: Scan all Run/RunOnce registry keys
- Winlogon Hijacking Detection: Check for shell/userinit modifications
- AppInit DLLs Scanning: Detect DLL injection points
- Image File Execution Options (IFEO): Find debugger hijacking
- LSA Package Analysis: Detect credential theft packages
- Session Manager Analysis: Check BootExecute for rootkit persistence
- Service Scanning: Analyze Windows services for suspicious ImagePath
- Print Monitor Detection: Find persistence via print monitors
Suspicious Indicators Detected:
- Base64-encoded PowerShell commands
- Direct IP URLs (C2 indicators)
- Hidden window execution
- Suspicious paths (temp, appdata, recycler)
- Dangerous extensions (.vbs, .bat, .ps1, .scr, .hta)
Files:
registry_scanner.py- Registry scanner engineweb_registry_scanner.py- Web interface version
Purpose: Continuously monitors system activity and logs events to a file.
Key Features:
- Process Monitoring: Track new and terminated processes
- Network Connection Monitoring: Monitor ESTABLISHED connections
- File System Monitoring: Watch Downloads, Desktop, Documents folders for changes
- Resource Monitoring: Alert on high CPU (>80%), RAM (>85%), Disk (>90%) usage
- Real-time Logging: All events logged to
system_activity.log
Monitored Events:
- PROCESS_START/PROCESS_STOP
- NETWORK_CONNECT/NETWORK_DISCONNECT
- FILE_CREATE/FILE_MODIFY/FILE_DELETE
- SYSTEM_ALERT (high resource usage)
Files:
system_logger.py- Background monitoring servicelog_analyzer.py- Log analysis utilitiesweb_system_monitor.py- Web interface version
Purpose: Analyzes URLs and websites for security issues.
Key Features:
- SSL/TLS Analysis: Certificate information and validity
- Security Headers Check: Check for HSTS, CSP, X-Frame-Options
- DNS Enumeration: Query A, AAAA, MX, NS, TXT records
- Subdomain Discovery: Certificate Transparency logs via crt.sh
- HTTP Methods Detection: Check allowed HTTP methods
- Directory Brute-forcing: Scan for common directories (admin, login, backup, .git, test)
- Technology Detection: Identify CMS (WordPress, Drupal, Joomla) and web servers
- WAF Detection: Detect Cloudflare, Akamai, Imperva
- Favicon Hashing: Generate MD5 hash of favicon
- IP Reputation: Check AbuseIPDB for malicious IPs
Files:
url_scan.py- Command-line URL scannerweb_url_scan.py- Web interface version
Purpose: Scans installed software for outdated versions.
Key Features:
- Software Enumeration: Scan Windows registry for installed programs
- Version Parsing: Extract and normalize version numbers
- Vulnerability Database: Compare against known vulnerable versions
- winget Integration: Check for available updates via Windows Package Manager
- Risk Scoring: Calculate 0-100 risk score based on:
- Known CVEs in database
- Version age compared to thresholds
- Available updates
Risk Levels:
- Critical (β₯90): Known critical vulnerabilities
- High (β₯70): Known high-severity vulnerabilities
- Medium (β₯50): Known medium-severity vulnerabilities
- Low (β₯30): Update available
Registry Paths Scanned:
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
- HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node...\Uninstall
- HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Files:
web_vulnerability_scanner.py- Main scannervulnerability_db.json- Local vulnerability database
Purpose: Analyzes RAM usage and processes for suspicious activity.
Key Features:
- RAM Statistics: Total, available, used, free memory
- Swap/Pagefile Analysis: Swap memory usage details
- Memory Health Analysis: Determine system pressure level (Healthy/Moderate/High)
- Memory Sampling: Monitor memory usage over time
- Top Memory Consumers: List processes using most memory
- Process Investigation: Detailed analysis by PID or name
- Process Tree: Show parent/child process relationships
- Suspicion Scoring: Calculate 0-100 risk score based on:
- High CPU (>50%): +20 points
- High Memory (>10%): +20 points
- Suspicious location (temp/appdata/downloads): +30 points
- Random executable names: +10 points
- Unsigned executables: +10 points
Risk Levels:
- HIGH: Score β₯ 60
- MEDIUM: Score β₯ 30
- LOW: Score < 30
Files:
memory.py- Command-line memory analyzerweb_memory.py- Web interface version
| Route | Description |
|---|---|
/ |
Home/Dashboard |
/file-analysis |
File upload and analysis |
/firewall-status |
Basic firewall check |
/password-analysis |
Password strength checker |
/ram |
RAM and memory analysis |
/url-scan |
URL/Website scanner |
/network |
Network discovery |
/system-monitor |
System activity logs |
/vulnerability-scanner |
Software vulnerability scan |
/registry-scanner |
Windows registry security scan |
RAM:
/api/ram/basic- System summary, RAM details, health analysis/api/ram/top-processes- Top 10 memory consumers/api/ram/all-processes- All processes (paginated)/api/ram/sampling- Real-time memory sampling (Server-Sent Events)/api/ram/process-tree/<pid>- Process tree for specific PID
Network:
/api/network/info- Network interface and public IP info/api/network/devices- Device discovery (streaming)
System Monitor:
/api/system-monitor/stats- Dashboard statistics/api/system-monitor/logs- Filtered logs/api/system-monitor/event-types- Available event types
URL Scan:
/api/url-scan- POST endpoint for URL analysis
Vulnerability:
/api/vulnerability-scanner/scan- Software vulnerability scan
Registry:
/api/registry-scanner/scan- Registry security scan
Install required Python packages:
bash
pip install flask psutil requests python-whois dnspython pysnmpcolorama pefile puremagic oletools yara-python werkzeug
bash
python app.py
The application will start at http://127.0.0.1:5000
Open your browser and navigate to:
http://127.0.0.1:5000
final_project/
βββ app.py # Flask main application
βββ requirements.txt # Python dependencies
βββ system_activity.log # System monitoring logs
β
βββ file_analysis/ # File analysis module
β βββ file_analysis.py # CLI analyzer
β βββ web_analyzer.py # Web analyzer
β βββ yara_rules/ # YARA rule sets
β
βββ network/ # Network analysis module
β βββ network.py # CLI network scanner
β βββ web_network.py # Web network scanner
β
βββ registry_scanner/ # Registry scanner module
β βββ registry_scanner.py # Registry scanner engine
β βββ web_registry_scanner.py
β
βββ system_monitor/ # System monitoring module
β βββ system_logger.py # Background logger
β βββ log_analyzer.py # Log analysis
β βββ web_system_monitor.py
β
βββ url_scan/ # URL scanner module
β βββ url_scan.py # CLI URL scanner
β βββ web_url_scan.py # Web URL scanner
β
βββ vulnerability_scanner/ # Vulnerability scanner
β βββ web_vulnerability_scanner.py
β βββ vulnerability_db.json
β
βββ memory/ # Memory analyzer module
β βββ memory.py # CLI memory analyzer
β βββ web_memory.py # Web memory analyzer
β
βββ templates/ # HTML templates
β βββ index.html
β βββ file_analysis.html
β βββ network.html
β βββ ram.html
β βββ url_scan.html
β βββ system_monitor.html
β βββ vulnerability_scanner.html
β βββ registry_scanner.html
β
βββ static/ # CSS/JS files
β βββ css/
β βββ js/
β
βββ uploads/ # Uploaded files directory
- Windows Only: Some modules (Registry Scanner, System Monitor) require Windows
- Administrator Privileges: Registry scanning and some network features may require elevated permissions
- nmap Required: Network scanning requires nmap to be installed
- API Keys: Some features (AbuseIPDB) require API keys to be configured
- Max file size: 50MB
- Allowed extensions: exe, dll, pdf, doc, docx, zip, txt, bin, sys
- Common ports: 21, 22, 23, 80, 443, 445, 3389, 161
- CPU Alert Threshold: >80%
- RAM Alert Threshold: >85%
- Disk Alert Threshold: >90%
MODULES_PARAMETER_DOCUMENTATION.md- Detailed parameter documentationIMPLEMENTATION_SUMMARY.md- Implementation detailsUSAGE.md- Usage guide
CyberShield - Comprehensive Security Analysis Platform