JOHN THE RIPPER: PART 1


Introduction

John the Ripper (JtR) is an open-source, free, and extremely efficient password cracking tool developed by Openwall Security. Originally built for UNIX operating systems, it is now available for over 15 different platforms. It is one of the most popular password testings and breaking programs as it combines a number of password crackers into one package, autodetects password hash types, and includes a customizable cracker. It can be run against various encrypted password formats including several crypt password hash types commonly found in Linux or Windows.

Installation

Often, we can get this pre-installed with Kali-Linux. If not installed, a simple sudo install command will do the job with ease.

Now, let’s proceed to crack passwords!!!

Cracking passwords using John the Ripper

JtR comes with three modes namely single crack, wordlist, and incremental. We will look at the first two in this part.

Single Crack Mode

This is the simplest mode used for cracking. It uses login names, user’s directory names, etc., for the same with a large set of mangling rules (which are used to modify or "mangle" words producing other likely passwords). This is the fastest method but may not produce the best results at times.

Syntax: john [mode][options][format][password file]

Let’s see the mode in action.

Here I have created a text file called test.txt containing a username and the password which I have encrypted with MD-5 encryption.





Now, let’s use the single crack method to crack the password.







As you can see in the highlighted lines, we have cracked the password.

The major limitation here is that it will only check with variations of the username or login names.


Wordlist Mode

In this mode, we can use wordlists to crack passwords using JtR. It comes inbuilt with a wordlist named “password.lst” containing most of the frequently used passwords. You can also specify a custom-made wordlist by its path if required.

Syntax: john [wordlist][options][format] [password file]

Here let’s use the same file but with a different password now with an MD5 encryption.

Here I have made a customized wordlist called wordlist.txt which I am going to use for cracking.

Now running JtR for cracking…




We got the password !!!

John the ripper also has a lot of options for providing us with different choices as to how the attack can be carried out.


These options in combination with various modes can make John the Ripper a very powerful cracking tool.


In PART – 2, we will try using JtR for cracking passwords of .zip and .rar files and also try out the mode used by most experts - the incremental mode.

Hope you guys had a great time.

0 Comments