It is finally time. We get to talk about John the Ripper, probably one of the most powerful tools
outside of Kali, inside of Kali, and all around in password cracking. John is probably the most
powerful, in my opinion, due to its simplistic nature in how it's installed within the Kali
operating system, and by which it can be used in a single mode, a multi-mode, and all sorts
of different modes out there, and works best when you can identify the hash. See what we did there?
And I want to pop on over real quick and show you something real quick.
This session of John the Ripper is based on the actual hash examples that we have in the file
here with these six. Now, why did I start running this an hour ago? And as an example for us here,
well, it's because of this right here. See that processing bar right there?
Just like all other password crackers out there, John the Ripper takes time, and it takes more time
when you can't properly identify the hash. So, but leaving this one alone, and I'm going to let this
run for as long as we work together on this particular skill, and see if we can actually
run through them as a file by itself. I'm going to show you, walk you through some of the ways to
use John. I know it's going to be so complex. It's not going to be complex. It's going to be easy.
First, open up a terminal. Let's do that real quick. I did that real quick. The next thing
we need to do is type in sudo john and the file name that we want to attack. I did that real quick
too, and I identified a second file I've just added for you. It's the first line out of the
hash examples that we have, and I put it as hash examples one, meaning that we only have one hash
in that file, so it won't take as long, right? And then the really hard part here, press enter.
I did that too, and you can see here that it ran through and gave a lot of different warnings and
all this other stuff here, and I want to show you them real quick because I don't want you to be
alarmed. Right off the bat, we see in the first warning line that detected hash type is lm, but
the string is also recognized as dynamic. So basically, it's saying that this hash has been
detected by john as a lot of different things, and it's telling you to use the dash dash format key
here in order to be able to properly better attack this hash. Well, as it went through and did its
thing without the identification of a format type, it went through and did it finish? Yep,
using default input coding crash recovery file is locked in john rec, right? So, loaded two
password hashes with no different salts. Proceeded with single rules, single. Did it give us anything?
No. So basically, it didn't know what the hash was, and it didn't know how to attack it. So,
what do you do? First, you open up a terminal. I did that. Next, you type in pseudo john,
this time with a dash dash format equal raw md5, and then the file name. I did that too. Then you
press enter. I'm doing that now. And just like that, it went through and did it a whole lot
quicker than it did when it was having to guess based on what the hashing is. So, you can see
loaded one password hash raw md5, no password hashes left to crack. So, how do you see the
results? Glad you asked. You just hit up and now you add a dash dash show. And then when you press
enter, you get the actual results of your hashing efforts or cracking efforts. And you can see there
that our md5 actually reverted into possibly password. And I say possibly because there's a
question mark there. So, one password hash cracked, zero left. It went through that entire file
using the fact that it's md5 and found out that it was a password of password. I just wanted to
hit on the high notes with John the Ripper because we're going to be using it quite a few other times
in this course. But as you noticed, it's a whole lot easier to run and faster to run when you can
identify the hash, which is why we started this skill out with Hash Identifier. And you can also
see and saw that using John with a file of hashes that you don't know what the hash types are is
still possible. But oh boy, does it take a while. And when you can properly identify that hash,
it makes things a whole lot easier. Now, in our example file, you feel free to run it,
but it's going to go, you have to identify the different hashes and there's multiple types of
hashes in that file. So, if you say format md5 for that file of hash examples, some will come back,
some won't because the hash type are being identified doesn't match. Just some things
to think about and also getting ready for the ease of use that is John the Ripper.