Skip to content

anant720/SecurePass-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” SecurePass Analyzer

A Cybersecurity-Focused Password Strength & Breach Analysis Tool

SecurePass Analyzer is a full-stack cybersecurity web application that analyzes password strength, simulates real-world attacks, and checks for data breach exposure โ€” without ever storing or logging passwords.

This project demonstrates secure coding practices, password security concepts, and backendโ€“frontend integration, making it ideal for placements, internships, and cybersecurity roles.


๐Ÿš€ Why This Project Matters

โœ” Implements real-world password attack models โœ” Follows privacy-first & zero-storage security principles โœ” Uses industry-recognized algorithms (zxcvbn, bcrypt) โœ” Clean API-based architecture โœ” Strong example of secure backend design in Python (Flask)

๐Ÿ” This project reflects how modern security tools are built โ€” not just theory, but practice.


๐Ÿ“Œ Key Features

๐Ÿ”‘ Password Strength Analysis

  • Custom Rules Engine Evaluates:

    • Length
    • Uppercase / lowercase
    • Numbers & special characters
    • Repeated and sequential patterns
  • zxcvbn Integration (by Dropbox) Provides realistic strength estimation based on real-world password data

  • Final Strength Score (0โ€“100) Combines custom rules + zxcvbn for accurate results

  • Crack Time Estimation Displays human-readable crack times (seconds โ†’ years)


๐Ÿงจ Attack Simulation (Educational)

  • Dictionary Attack Check Tests against commonly used passwords

  • Brute Force Estimation

    • Online attack (rate-limited)
    • Offline fast attack (GPU)
    • Offline slow attack (bcrypt)

โš ๏ธ No real attacks are performed โ€” only mathematical simulations.


๐Ÿ•ต๏ธ Breach Detection (Privacy-First)

  • Passwords are never stored
  • Passwords are never logged
  • Uses SHA-256 hashing for breach comparison
  • Only hashes are checked โ€” zero plaintext exposure

๐Ÿ›ก๏ธ Built-in Security Measures

  • โœ… Rate Limiting: 5 requests/min per IP
  • โœ… CORS Protection enabled
  • โœ… Zero password storage
  • โœ… No third-party password sharing
  • โœ… Backend-only processing

๐Ÿง  System Architecture

Frontend (HTML/CSS/JS)
        โ†“
REST API (Flask)
        โ†“
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
| Strength Analyzer (Rules) |
| zxcvbn Engine             |
| Attack Simulator          |
| Breach Checker            |
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

๐Ÿงฐ Technology Stack

Frontend

  • HTML5 โ€“ Semantic structure
  • CSS3 โ€“ Glassmorphism UI (macOS-style)
  • Vanilla JavaScript (ES6+) โ€“ No frameworks

Backend

  • Python 3.8+
  • Flask 3
  • Flask-CORS
  • Flask-Limiter
  • zxcvbn
  • bcrypt

โš™๏ธ Installation & Setup

Prerequisites

  • Python 3.8+
  • pip
  • Any modern web browser

Step 1: Backend Setup

cd backend
pip install -r requirements.txt
python app.py

๐Ÿ“ Backend runs on: http://localhost:5000


Step 2: Frontend Setup

Option 1 (Simple): Open frontend/index.html directly in your browser

Option 2 (Recommended):

cd frontend
python -m http.server 8000

๐Ÿ“ Open: http://localhost:8000


๐Ÿงช How to Use

  1. Start backend server

  2. Open frontend

  3. Enter a password

  4. Click Analyze Password

  5. View:

    • Strength score
    • Crack time
    • Breach status
    • Attack vulnerability

๐Ÿ” Example Output

Password: MyP@ssw0rd123!

  • Strength: Strong (75/100)
  • Estimated crack time: ~2 years
  • Breach status: Safe
  • Dictionary attack risk: Low

๐Ÿ“ Project Structure

SecurePass-Analyzer/
โ”‚
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ app.py
โ”‚   โ”œโ”€โ”€ strength_checker.py
โ”‚   โ”œโ”€โ”€ password_rules.py
โ”‚   โ”œโ”€โ”€ attack_simulator.py
โ”‚   โ”œโ”€โ”€ breach_checker.py
โ”‚   โ”œโ”€โ”€ password_generator.py
โ”‚   โ””โ”€โ”€ requirements.txt
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ”œโ”€โ”€ style.css
โ”‚   โ””โ”€โ”€ script.js
โ”‚
โ””โ”€โ”€ README.md

๐Ÿ”Ž Backend Module Overview

File Purpose
app.py API server, rate limiting, routing
strength_checker.py Final strength scoring logic
password_rules.py Custom rule engine
attack_simulator.py Attack time estimation
breach_checker.py Secure breach detection
password_generator.py Secure password creation

๐ŸŒ API Endpoints

Endpoint Method Description
/api/analyze POST Full analysis
/api/strength POST Strength only
/api/breach POST Breach check
/api/generate POST Password generator
/health GET Server health

๐Ÿ“Š Scoring Logic (Simplified)

Final Score =
(Custom Rules Score + (zxcvbn Score ร— 20)) / 2

Strength Levels

  • 80โ€“100 โ†’ Very Strong
  • 60โ€“79 โ†’ Strong
  • 40โ€“59 โ†’ Medium
  • 20โ€“39 โ†’ Weak
  • 0โ€“19 โ†’ Very Weak

๐Ÿ”ฎ Future Enhancements

  • ๐Ÿ”— Have I Been Pwned API (k-anonymity)
  • ๐Ÿ” API authentication
  • ๐Ÿณ Docker deployment
  • ๐Ÿงช Unit & integration testing
  • ๐ŸŒ Multi-language support
  • ๐Ÿ“ˆ Performance optimization

๐Ÿ“œ License

Open-source โ€” for educational & learning purposes


๐Ÿค Contributions

Pull requests are welcome. Feel free to fork and enhance!


โš ๏ธ Disclaimer

This project is built for learning and demonstration. Always use unique passwords and enable 2FA in real syste

About

๐Ÿ” A cybersecurity-focused web app for password strength analysis, attack simulation, and breach detection. Uses custom rules and zxcvbn for scoring ๐Ÿง , simulates brute-force & dictionary attacks โš”๏ธ, and checks breaches via secure hash comparison ๐Ÿ”’ with zero password storage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors