PhantomHash is a robust password analysis tool designed to evaluate the strength and vulnerability of passwords. By leveraging entropy calculations, substring frequency analysis, and multi-threading, this tool helps users identify weak passwords and provides actionable recommendations for improvement.
- Password Entropy Calculation: Measures the unpredictability of passwords using Shannon entropy.
- Substring and Word Analysis: Identifies common substrings and words in passwords, comparing them against a dictionary of known weak passwords.
- Password Similarity Detection: Detects highly similar passwords using Jaccard similarity and multi-threading.
- Multi-Threading: Optimizes performance by processing large datasets in parallel.
- Caching Mechanism: Reduces redundant computations by caching results for faster analysis.
- User-Friendly Output: Provides clear feedback on password weaknesses and actionable recommendations.
- Secure Input Handling: Ensures passwords are not displayed or saved during input.
- Ruby 2.7 or higher
- Required libraries:
set,thread,csv,yaml,etc
-
Clone the repository:
git clone https://github.com/cilliapwndev/PhantomHash.git cd PhantomHash -
Install dependencies (if any):
- Ensure Ruby is installed on your system.
- No additional gems are required as the script uses standard libraries.
-
Prepare the dictionary files:
- Place your password dictionary files (e.g.,
Ashley-Madison.txt,000webhost.txt,NordVPN.txt) in thedictionary/folder.
- Place your password dictionary files (e.g.,
-
Run the script:
ruby PhantomHash.rb
-
Launch the program:
ruby PhantomHash.rb
-
Follow the prompts:
- The program will load cached data (if available) or generate it from the dictionary files.
- When prompted, enter your password securely. The input will not be echoed or saved.
-
View the analysis:
- The program will display:
- Entropy score and strength classification.
- Detected weaknesses (e.g., missing character groups, repeated characters).
- Substring and word matches against the dictionary.
- Recommendations for improving your password.
- The program will display:
-
Test additional passwords:
- After the initial analysis, you can choose to test another password by entering
y.
- After the initial analysis, you can choose to test another password by entering
-
Entropy Calculation:
- Measures the unpredictability of a password based on character frequency.
- Higher entropy indicates stronger passwords.
-
Substring and Word Frequency Analysis:
- Extracts common substrings and whole words from dictionary passwords.
- Compares user-submitted passwords against these patterns to detect vulnerabilities.
-
Password Similarity Detection:
- Uses Jaccard similarity to identify highly similar passwords.
- Multi-threading ensures efficient processing of large datasets.
-
Caching:
- Stores entropy calculations, common substrings, and words in a YAML file (
cache.yaml) to avoid redundant computations.
- Stores entropy calculations, common substrings, and words in a YAML file (
-
Secure Input Handling:
- Disables terminal echoing during password input to ensure privacy.
=== PhantomHash Password Analyzer ===
⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣦⠀
⠀⠀⠀⠀⣰⣿⡟⢻⣿⡟⢻⣧
⠀⠀⠀⣰⣿⣿⣇⣸⣿⣇⣸⣿
⠀⠀⣴⣿⣿⣿⣿⠟⢻⣿⣿⣿
⣠⣾⣿⣿⣿⣿⣿⣤⣼⣿⣿⠇
⢿⡿⢿⣿⣿⣿⣿⣿⣿⣿⡿⠀
⠀⠀⠀⠀⠈⠿⠿⠋⠙⢿⣿⡿⠁⠀
Checking cache...
Loading data from cache...
Enter your password (your input will not be saved):
=== Your Password Analysis ===
- Entropy: 64.0 bits
- Strength (Threshold-Based): Moderate
- Weaknesses:
- No special characters
✅ GOOD NEWS: Your password is not found in the dictionary. It is less likely to be guessed.
=== Password Improvement Recommendations ===
- Use a password with at least 12 characters.
- Include a mix of uppercase, lowercase, digits, and special characters.
- Avoid reusing passwords across multiple accounts.
- Consider using a password manager to generate and store strong passwords.
We welcome contributions to improve PhantomHash! Here’s how you can help:
- Bug Reports: If you encounter any issues, please open an issue on GitHub with detailed steps to reproduce the problem.
- Feature Requests: Suggest new features or improvements by opening an issue.
- Code Contributions: Fork the repository, make your changes, and submit a pull request. Ensure your code adheres to Ruby best practices.
This project is licensed under the GNU General Public License v3.0. Feel free to use, modify, and distribute it as long as you comply with the terms of the license.
- Inspired by the need for better password security practices.
- Dictionary files sourced from publicly available password breach datasets.
Thank you for using PhantomHash! We hope it helps you create stronger, more secure passwords. If you find this project useful, please consider starring the repository and sharing it with others.