-: In this demonstration you're going to see
how a password-cracking tool
like John the Ripper is actually used.
Now, like most of the demos in this course,
you don't need to know how
to actually use John the Ripper to pass the exam
but this tool is heavily used by security analysts
when performing vulnerability assessments
and penetration tests so I thought I'd show it to you.
So let's use this tool as a demonstration of the concept
of how easily and quickly a weak password can
be broken using a tool like
John the Ripper or Cain and Abel.
Now, let's jump in the lab and get started.
Now, to do this, we're going to try
to crack the password for this Kali Linux machine.
Now I'll tell you right now the password is toor,
which is a very standard password that is used
by Kali Linux by default when you install it
but we're going to go ahead through
the process of trying to crack that now.
So before we can try to crack those hashes
we have to gather those hashes from the Kali Linux machine.
Now, by default, inside Kali Linux
these passwords are stored inside the password file
and as a shadow inside the shadow file.
So we're going to grab both of those
and put those into a file for us called my password
so we'll do that by typing unshadow /etc/password
and then /etc/shadow and then
we'll pipe that over to the file password.txt.
And it's done so now if I hit ls
you'll see that there is the password.txt file.
So what does that password file look like now?
Well, let's go ahead and print it to the screen
so that you can see it.
And let's do more password.txt
and you'll see here you have your usernames on the left
and then what group they're associated with it
and how they're going to be logging on.
Now, under root you'll see that long hash there at the top,
that $6$u all the way through across the top,
that is the shadowed password,
the hash of it that we've captured.
Now, how do we crack that?
Well, that's where John the Ripper's going to come in handy.
So let me go ahead and clear my screen here
and what we're going to do is type john password.txt
and hit Enter and John's going to go through
and try to crack that password.
Now, it already says it found it.
It was very, very quick and so to show that password,
we'll just type in john -show and then the file
that we had used which was password.txt
and so you can see that root was the username
and toor was the password.
You can see just how quickly John can go through
and decrypt these hashes back into something
that's usable for us which is the password.
And now I could log into the system as root
with password toor with no problem.
(logo buzzes)