Skip to content

A comprehensive password strength analyzer with attack simulations and security testing

Notifications You must be signed in to change notification settings

stanleys12/password-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Password Strength Analyzer

A comprehensive web application that analyzes password strength through various attack simulations and provides detailed improvement suggestions.

Features

🔒 Password Strength Analysis

  • Real-time strength calculation with visual meter
  • Comprehensive scoring system based on multiple factors
  • Character variety analysis (uppercase, lowercase, numbers, special characters)
  • Pattern detection for common weak patterns

🛡️ Attack Simulation

The app simulates various real-world password attacks:

  1. Dictionary Attack

    • Tests against common passwords and dictionary words
    • Checks for easily guessable passwords
  2. Brute Force Attack

    • Calculates time to crack based on character set and length
    • Uses realistic GPU processing speeds (1 billion attempts/second)
  3. Rainbow Table Attack

    • Simulates pre-computed hash table lookups
    • Tests against common password hashes
  4. Social Engineering Attack

    • Analyzes for personal information patterns
    • Detects predictable patterns and sequences

📊 Detailed Analysis Results

Time to Crack Estimates

  • Shows realistic time estimates for different attack methods
  • Color-coded by vulnerability level
  • Based on current computing capabilities

Vulnerability Detection

  • Identifies specific weaknesses in passwords
  • Checks for common patterns and sequences
  • Detects personal information usage

Improvement Suggestions

  • Provides actionable recommendations
  • Suggests character variety improvements
  • Recommends stronger password strategies

Hash Comparison

  • Shows how your password would be stored using different hashing algorithms:
    • MD5 (insecure, shown for comparison)
    • SHA1 (deprecated)
    • SHA256 (current standard)
    • SHA512 (high security)
    • Bcrypt (recommended for password storage)

Security Features

🔐 Privacy-First Design

  • Local processing: All analysis happens in your browser
  • No data transmission: Passwords never leave your device
  • No server storage: No passwords or hashes are stored anywhere
  • Client-side only: Works completely offline after initial load

🛡️ Comprehensive Testing

  • Tests against extensive common password lists
  • Simulates realistic attack scenarios
  • Provides accurate time-to-crack estimates
  • Identifies multiple vulnerability types

How to Use

  1. Open the application by opening index.html in your web browser
  2. Enter your password in the input field
  3. Click "Analyze Password" or press Enter
  4. Review the results:
    • Check the strength meter
    • Review time estimates
    • Examine vulnerabilities
    • Follow improvement suggestions
    • Compare hash outputs

Technical Implementation

Frontend Technologies

  • HTML5: Semantic markup and structure
  • CSS3: Modern styling with gradients and animations
  • JavaScript ES6+: Object-oriented analysis engine
  • CryptoJS: Cryptographic hash generation

Analysis Engine

The password analyzer uses a sophisticated scoring system:

  1. Length Analysis: Longer passwords get higher scores
  2. Character Variety: Mix of character types increases security
  3. Pattern Detection: Identifies weak patterns and sequences
  4. Common Password Check: Tests against known weak passwords
  5. Entropy Calculation: Measures true randomness and complexity

Attack Simulation

Each attack type is simulated with realistic parameters:

  • Dictionary attacks: Test against 50+ common passwords
  • Brute force: Calculate based on character set and length
  • Rainbow tables: Simulate hash table lookups
  • Social engineering: Pattern and personal info analysis

Password Security Best Practices

✅ Strong Password Characteristics

  • Minimum 12 characters for high security
  • Mix of character types: Uppercase, lowercase, numbers, symbols
  • Avoid common patterns: No sequences or repeated characters
  • Random combinations: Avoid dictionary words
  • Unique per service: Never reuse passwords

❌ Common Weaknesses

  • Short passwords (less than 8 characters)
  • Only letters or only numbers
  • Common words or names
  • Sequential characters (123, abc)
  • Personal information (birthdays, names)
  • Repeated characters (aaa, 111)

🔐 Storage Recommendations

  • Use bcrypt for password storage (shown in hash comparison)
  • Avoid MD5/SHA1 for new implementations
  • Implement rate limiting on login attempts
  • Use HTTPS for all password transmission
  • Consider password managers for generating strong passwords

Browser Compatibility

  • ✅ Chrome 60+
  • ✅ Firefox 55+
  • ✅ Safari 12+
  • ✅ Edge 79+
  • ✅ Mobile browsers

Local Development

To run the application locally:

  1. Clone or download the project files
  2. Open index.html in your web browser
  3. No server setup required - works entirely client-side

Security Notes

  • This tool is for educational and testing purposes
  • Never enter real passwords you use for important accounts
  • The analysis is based on common attack methods and may not reflect all possible vulnerabilities
  • Always follow your organization's password policies
  • Consider using a password manager for generating and storing strong passwords

Contributing

Feel free to improve the application by:

  • Adding more attack simulation methods
  • Expanding the common password database
  • Improving the scoring algorithm
  • Adding more hash algorithms
  • Enhancing the UI/UX

License

This project is open source and available under the MIT License.

About

A comprehensive password strength analyzer with attack simulations and security testing

Resources

Stars

Watchers

Forks

Packages

No packages published