In this final step, you will provide the last required component for our dictionary attack: the wordlist. A wordlist is a plain text file where each line is a potential password.
The lab environment includes a simple wordlist named wordlist.txt. Let's examine its contents:
cat wordlist.txt
The output will be:
test
hello
password
123456
This wordlist will be used by Hashcat to test against the hash. The wordlist file is the final argument in our command.
Now, let's assemble and run the complete command:
hashcat -m 0 -a 0 hashes.txt wordlist.txt
Hashcat will start. Since our hash and wordlist are very simple, it will finish almost instantly. The output will show the status of the cracking session.
...
Session..........: hashcat
Status...........: Cracked
Hash.Name........: MD5
Hash.Target......: 5f4dcc3b5aa765d61d8327deb882cf99
Time.Started.....: ...
Time.Estimated...: 0 secs (0.00ms)
Guess.Base.......: File (wordlist.txt)
Guess.Queue......: 1/1 (100.00%)
Speed.#1.........: 496.9 kH/s (0.00ms) @ Accel:128 Loops:1 Thr:1 Vec:8
Recovered........: 1/1 (100.00%) Digests
Progress.........: 4/4 (100.00%)
Rejected.........: 0/4 (0.00%)
Restore.Point....: 4/4 (100.00%)
Restore.Sub.#1...: Salt:0 Amplifier:0-1 Iteration:0-1
Candidates.#1....: test -> 123456
Hardware.Mon.#1..: Util: 99%
...
The Status...........: Cracked line confirms success. To see the cracked password, you can run the same command again with the --show flag.
hashcat -m 0 -a 0 hashes.txt wordlist.txt --show
The output will clearly display the hash and its corresponding plaintext password:
5f4dcc3b5aa765d61d8327deb882cf99:password
Congratulations, you have successfully constructed and executed a complete Hashcat command!