Cipher Cracker is a tool designed to identify the hashing method used for user passwords in an /etc/shadow file and attempt to crack the passwords using a given wordlist. This tool supports multiple hash methods, including MD5, SHA-256, and SHA-512. Blowfish and yescrypt are not supported at this time.
Important Note: This tool was developed for educational purposes only. Usage of this tool should comply with the laws in your respective country. Unauthorized use of this tool may be illegal and is not endorsed by the author. The author is not responsible for any misuse or damage caused by this tool.
- Identify hash methods from
/etc/shadowfiles. - Crack passwords using a specified wordlist.
- Supports MD5, SHA-256, and SHA-512 hashing methods.
- Excludes support for Blowfish and yescrypt.
- Rust programming language (latest stable version)
-w, --wordlist: Path to the wordlist file.-p, --pwd_file: Path to the password file.
- Clone the repository and navigate to the project directory.
- Place your shadow file and wordlist in the
example_filesdirectory. - Run the tool using Cargo:
cargo run -- -w example_files/wordlist.txt -p example_files/shadow.txt
For help and additional options, run:
cargo run -- -hFor testing purposes, use the files provided in the example_files directory:
wordlist.txt: A sample wordlist file.shadow.txt: A sample shadow file.
This project relies on the following crates:
- Clap for command-line argument parsing.
- Colored for colored terminal output.
- md-5 for MD5 hashing.
- rust-crypto for SHA-256 and SHA-512 hashing.
The main function parses command-line arguments, reads the wordlist and password file, and initiates the hash comparison process.
read_wordlist_hash(wordlist_file: &str) -> Vec<String>: Reads the wordlist file and returns a list of words.read_pwd_file(pwd_file: &str) -> Vec<String>: Reads the password file and returns a list of password entries.
hash_compare(wordlist: Vec<String>, pwd_list: Vec<String>): Compares the hashes from the wordlist against the hashed passwords in the password file. If a match is found, it prints the username and the cracked password.
hash_method(word: &str, salt: &str) -> String: Computes the hash of a given word using the specified hash method and salt.
When a password is successfully cracked, the tool will output:
Password found for the user: username Password: password
This tool is intended for educational purposes only. The usage of this tool should be in compliance with the laws of your country. Unauthorized or malicious use of this tool may be illegal and is not supported by the author. The author assumes no responsibility for any harm or damage caused by the use of this tool.