Creating an Expanded Wordlist for Attacks
Having practiced brute-force attacks on SSH and web logins, this step focuses on enhancing your wordlist to simulate a more realistic attack scenario. A larger wordlist can increase the chances of success in a real brute-force attempt, and as a beginner, you will learn how to create and use such a list with clear, detailed instructions.
For clarity, a wordlist's effectiveness depends on its size and relevance to the target. In real scenarios, ethical hackers might use wordlists tailored to specific users or systems. For this lab, we will create a slightly larger wordlist to understand the impact of variety in password guessing.
You are still in the Kali Linux container shell, which is your working environment. Let's create a new wordlist file named extended_passwords.txt
using the nano
editor. Type the following command and press Enter:
nano extended_passwords.txt
This opens the nano
editor. Now, type the following list of sample passwords into the editor. These are for demonstration purposes and include more varied entries:
admin123
password123
12345678
qwerty
letmein
welcome
secret
pass1234
userpass
test123
After typing these entries, save the file by pressing Ctrl+O
, then press Enter
to confirm the filename, and finally press Ctrl+X
to exit the editor. To verify that the file was created successfully, list the contents of your current directory with the following command:
ls
Expected Output (example, actual output may vary):
extended_passwords.txt passwords.txt
You should see both extended_passwords.txt
and passwords.txt
in the output, confirming that the new file is ready. Now, let's use this expanded wordlist in a simulated SSH brute-force attack to see the difference. Type the following command and press Enter:
hydra -l root -P extended_passwords.txt ssh://127.0.0.1
This command is similar to the one used in the earlier SSH attack step, but it uses the new extended_passwords.txt
file. As before, since there is no SSH server on localhost
, the attack will not succeed, which is expected.
Expected Output (example, actual output may vary):
Hydra v9.4 (c) 2022 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).
...
[ERROR] could not connect to ssh://127.0.0.1:22 - Connection refused
...
This output confirms that Hydra attempted the attack with the new wordlist but failed due to the dummy target. The purpose is to practice using a more comprehensive wordlist, preparing you for scenarios where varied passwords might be tested. Continue working in the Kali Linux container shell for the final step, where we will log attack results.