Dictionary Attack is a password-cracking method where an attacker uses a pre-made list of common passwords or words (called a dictionary) and systematically tries them against the target. The dictionary can contain words from an English dictionary and also some leaked list of commonly used passwords, and when combined with common character replacement with numbers, can sometimes be very effective and fast.
How is it done?
Here’s the working of a Dictionary Attack in simple steps:
- Preparation of Wordlist: Attacker prepares or downloads a list of common passwords/words (dictionary file).
- Target Selection: The target password hash or login system is chosen.
- Systematic Testing: Each word from the dictionary is tested one by one against the target.
- Match Found: If a word matches the password, the attacker gains access.
- Failure Case: If no match exists, the attack fails (limited to words in the list).

Tools Used In Dictionary Attack
Given below are basically the two tools used in dictionary attack:
1. John the Ripper
John the Ripper is a popular password-cracking tool that recovers passwords from hashes. In dictionary attacks, it tests each word from a wordlist against the hash to find the correct password.

2. Aircrack-ng
Aircrack-ng is a network security tool used to crack Wi-Fi passwords by analyzing captured packets. In dictionary attacks, it tries each word from a wordlist against the captured handshake to recover the Wi-Fi password.

3. Hydra
Hydra is a fast password-cracking tool that uses a wordlist to test login credentials on services like SSH, FTP, or HTTP. It’s mainly used in penetration testing to find weak or common passwords.

4. Medusa
Medusa is a fast, parallel, and modular brute-force tool used for testing login credentials against remote systems. Like Hydra, it supports many protocols (SSH, FTP, HTTP, RDP, MySQL, etc.) and is often used by penetration testers to check for weak or default passwords.

Difference between Brute Force and Dictionary Attack:
A brute-force attack will try every possible character combination. This can take a significant amount of time to complete. For example, it might start with the password "a" then change one letter at a time until it gets to "zzzzzzzz."
A dictionary attack will use a list of likely passwords in its attempts to break into a system. These attacks are more focused than brute-force attacks. Rather than trying to input every possible permutation, an attacker using a dictionary approach would attempt all the permutations in its predetermined library. Sequential passcodes, like "12345," and static passcodes, like "00000," would be tested.
How to be on the safer side?
You can protect yourself from such kind of attacks by following these ways:
- Choose a mix of upper and lower case letters, numbers, and special (i.e., special characters).
- The password must be a long string with more characters. The longer it is, the more time-consuming it is to crack (sometimes, the time to crack is in years).
- Password reset should be done after a certain period of time.