Skip main navigation

Crack a Password Using a Dictionary Attack

In this video, Zanidd will ill demonstrate how to use a word list to crack a password. We will look at the rockyou.txt.gz.
6.4
Hello, world. I’m Zanidd and welcome back to the Hands on Password Cracking and Security course on Code Red. In this section, we’re going to take a look at dictionary attacks. In this video, we’re going to use a word list to crack some passwords. So first, how do we use a word list? In this course, we are going to use the rockyou.txt word list which contains a bunch of commonly used passwords.
60.8
So in order to do this, start up your Kali machine and open a terminal.
72.3
Then change the directory into usr/share/wordlists.
81.7
Here you will have a bunch of directories and word lists, but we are interested in the rockyou.txt.
97.3
As you can see by the file ending, the rockyou.txt, is not in a text format. As you can see by the file ending, it’s not a txt file, it’s a gzip file. So, we first want to unpack this file.
124.5
You can unzip this file by running sudo gunzip rockyou.txt.gz.
143.4
After you’ve unzipped this file, you’ll find the text file in this directory.
156.7
Now, if we take a look at this file, we can see that it contains a bunch of different passwords that are commonly used, like abc123, nicole, daniel, babygirl, lovely, iloveu, qwerty, and other words. We will be using this list of words to crack some passwords.
230.6
You may remember the command from the second lesson in the section, which is used to use in word list withdrawals and the password file. We just have to replace the password list file with wordlist=/usr/sh are/wordlists/rockyou.txt.
260.7
And this is how we will use a word list.
267.3
Now, this exercise wouldn’t be complete if it didn’t have some passwords, so let’s take a look at where to find them and how to correct them.
288.3
The passwords to crack can be found in the repository in the dictionary folder.
303.2
If you go into the dictionary folder, you will find four password files. Now, these are the exact same passwords that we already cracked with the brute force attacks and some rules. And now, since all those passwords were part of the rockyou.txt, we can use the rockyou.txt file as a word list to crack these four passwords. Try to perform a dictionary attack on all those four passwords, and maybe also try to remember how long it took for the brute force attacks and how long it took for the dictionary attack so you have a little comparison on what performs better in what attack.
355.4
I hope you will have some fun cracking those passwords, and I will see you in the next lesson where we are going to take a look how to further use rules to crack passwords using dictionary attacks.

This video will demonstrate how to use a word list to crack a password.

We will look at the rockyou.txt.gz. As you can see from the file ending, it is not a text file. Our first step will be to unpack the file, and access the text file. This will show us a list of commonly used passwords, which we will use to crack passwords.

Over to you: Using a dictionary attack, crack the four passwords presented in the video. Compare how long it took you to crack the passwords when using a dictionary attack compared to when you used a brute force attack. Share your experience with your fellow learners in the Comments section below.

This article is from the free online

Advanced Cyber Security Training: Hands-On Password Attacks

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education