A single Flask application combining three defensive cybersecurity tools into one "operations console" style UI:
- Password Strength Analyzer — live entropy calculation, breach-list matching, keyboard-pattern / repeat / sequential-run detection, crack-time estimate.
- Secure Login System — salted PBKDF2-HMAC-SHA256 password hashing (260,000 iterations), brute-force lockout after 5 failed attempts, hardened session cookies, and a full login audit trail.
- Vulnerability Scanner — concurrent TCP port scan of 24 commonly exploited ports, HTTP security-header audit (HSTS, CSP, X-Frame-Options, etc.), and a TLS certificate / protocol-version check.
Only scan hosts, domains, and IP addresses you own or are explicitly authorized to test. Port scanning third-party systems without permission may violate laws such as the U.S. Computer Fraud and Abuse Act or equivalent legislation elsewhere. This project is for learning, portfolio, and authorized security-assessment use.
cyber_security_suite/
├── app.py # Flask routes, auth, DB wiring
├── security_utils.py # PasswordAnalyzer, PasswordHasher, RateLimiter
├── scanner.py # VulnerabilityScanner (ports / headers / TLS)
├── requirements.txt
├── templates/
│ ├── base.html
│ ├── index.html # Landing page + live password analyzer
│ ├── register.html
│ ├── login.html
│ └── dashboard.html # Authenticated scanner console + activity logs
└── static/
├── css/style.css # "Signal Ops" dark console theme
└── js/app.js # Live meter + scanner AJAX
cd cyber_security_suite
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
python app.pyOpen https://cybersecurevault-nf78.onrender.com/ in your browser. The SQLite database
(cybervault.db) is created automatically on first run.
- Computes Shannon-style entropy from character-set size × length.
- Scores across 10 weighted checks (length, character classes, breach-list membership, keyboard-walk patterns, repeats, sequential runs).
- Estimates crack time assuming a 10-billion-guesses/second offline attacker.
- Exposed live at
/api/analyze-passwordand used on the landing page and registration form — nothing is stored server-side from this endpoint.
- Registration enforces a minimum password-strength score of 45/100.
- Passwords are hashed with PBKDF2-HMAC-SHA256, 260,000 iterations, unique 16-byte salt per user — plaintext is never persisted.
RateLimiterlocks ausername:ippair out for 60 seconds after 5 failed attempts within a rolling 5-minute window.- Every attempt (success or failure) is written to
login_eventsand shown on the dashboard. - Session cookies are
HttpOnly+SameSite=Laxwith a 30-minute lifetime.
scan_ports(host)— threads 24 socket connect() probes against common ports (FTP, SSH, RDP, SMB, databases, etc.) and flags high-risk exposures.scan_headers(url)— fetches the URL and diffs its response headers against 6 recommended security headers, and flagsServer/X-Powered-Byinformation disclosure.scan_tls(host)— opens a TLS connection, reports negotiated protocol version, and warns if the certificate expires within 30 days or a deprecated protocol (SSLv3/TLSv1/TLSv1.1) is in use.- All three are wired to
/api/scan/*behind login, and every scan is logged toscan_history.
- Swap the in-memory
RateLimiterfor Redis if you deploy with multiple workers. - Add TOTP-based two-factor authentication (e.g. with
pyotp) to the login flow. - Replace the bundled common-password list with a live HaveIBeenPwned k-anonymity API check for production use.
- Add PDF/CSV export of scan history for reporting.