bruteforce-salted-openssl
Try to find the passphrase for files encrypted with OpenSSL using exhaustive or dictionary attacks. Supports multithreading and various OpenSSL ciphers and digests.
Description
bruteforce-salted-openssl attempts to recover passphrases or passwords from files encrypted using the OpenSSL command. It operates in two primary modes: exhaustive mode, which systematically tries all possible passwords within specified constraints, and dictionary mode, which tests passwords from a provided wordlist file.
The exhaustive mode is particularly effective when partial password knowledge exists, such as the beginning, end, length range, or character set. Users can define minimum and maximum password lengths, prefixes, suffixes, and custom character sets. Dictionary mode reads one password per line from an input file for rapid testing against known wordlists.
This tool supports multithreading for performance optimization and can utilize all ciphers and digests available in the system's OpenSSL libraries. Progress monitoring is available via USR1 signals or periodic verbose output. It is designed for security assessments, penetration testing, and digital forensics investigations.
How It Works
The tool targets OpenSSL-encrypted files with salted encryption, attempting decryption using specified ciphers (default: aes-256-cbc) and digests (default: sha256) for key/IV derivation. In exhaustive mode, it generates passwords incrementally within defined length bounds, prefixes, suffixes, and character sets. Dictionary mode sequentially tests passwords from input files. Success is determined by decrypted data containing mostly printable ASCII (≥90%) or matching a user-specified magic string. Supports PKCS5_PBKDF2_HMAC key derivation, multithreading, and state persistence for interrupted sessions.
Installation
sudo apt install bruteforce-salted-opensslFlags
Examples
bruteforce-salted-openssl encrypted_file.encbruteforce-salted-openssl -f passwords.txt encrypted_file.encbruteforce-salted-openssl -l 4 -m 6 -b 'pass' -e '123' encrypted_file.encbruteforce-salted-openssl -t 4 -v 10 encrypted_file.encbruteforce-salted-openssl -c bf-cbc -d md5 encrypted_file.encbruteforce-salted-openssl -K -i 50000 -s 'abc123' encrypted_file.encbruteforce-salted-openssl -M 'PKCS7' -1 encrypted_file.encbruteforce-salted-openssl -a