Cyber El
Cyber El
Submitted to Dr.Mohana
(Department of Computer Science and Engineering)
1
Contents
1. Introduction.
2. Literature Review.
3. Objectives.
4. Theoretical background
5. Methodology.
7. Conclusion
8. Resources
2
INTRODUCTION
In today's world the importance of password security cannot be
overstated. With our growing reliance on services, protecting information
has become a top priority. However the strongest and carefully
constructed passwords can be vulnerable to malicious hacking
techniques, especially password cracking.
This is where specialised tools like Hashcat and Crunch come into play.
They provide the means to decipher and exploit hashed passwords with
ease highlighting the urgency of addressing this issue.
3
Password cracking plays a role, in stuffing attacks, where hackers
reuse compromised login credentials on multiple websites and
services. This can result in a domino effect compromising
accounts, across platforms.
4
OBJECTIVES
1. Understanding Password Cracking Techniques:
5
LITERATURE REVIEW
● Scholars have extensively analysed various password hashing
algorithms, such as MD5, SHA-1, SHA-256, and bcrypt, to
understand their vulnerabilities and security implications. These
studies highlight the importance of selecting strong algorithms for
password storage.
6
PASSWORD HASHING
7
Now there is a similar algorithm called encoding. A popular encoding
algorithm is base64. Here is how the same “Password123” will look if we
encode it with base64:
When we sign up for a website, they will hash our password before
saving it . When we try to log in again, the same hashing algorithm is
used to generate a hash for our input. It is then compared with the
original hash saved in the database.
This approach is also what gives rise to hashing attacks. A simple way to
attack hashes is to have a list of common passwords hashed together.
This list is called a Rainbow table.
There are several reasons why someone might want to crack hashed
passwords. One of the most common reasons is for malicious purposes,
such as stealing sensitive information or gaining unauthorised access to
a system.
In some cases, hackers will use brute force attacks or dictionary attacks
to crack weak passwords and gain access to user accounts. Another
reason why someone might want to crack hashed passwords is for
ethical hacking purposes, such as testing the security of a system or
application.
8
HASHCAT
Hashcat is a powerful password cracking tool that is widely used in the
cybersecurity industry. It is designed to crack encrypted passwords using
a variety of techniques, including brute force attacks and dictionary
attacks.
Tool Link:https://github.com/hashcat/hashcat
Versatility of Hashcat:
9
4. Performance and Parallel Processing: Hashcat is designed to
leverage the computational power of modern GPUs and CPUs. It
can efficiently utilise multiple cores and processors, making it
highly effective in cracking hashes at scale.
10
WORDLIST
Wordlists are essential tools in the field of password cracking. These
lists consist of words, phrases, or combinations of characters that
attackers or security professionals use to guess passwords during the
cracking process. Wordlists serve a critical role in several ways:
11
Crunch
Crunch is a powerful command-line tool used in the world of password
cracking. It allows users to create custom wordlists that can be used to
crack even the most complex passwords. Essentially, crunch takes a set
of user-defined parameters and generates a list of possible passwords
based on those parameters.
With crunch, users can create wordlists tailored specifically to the target
they are trying to crack, increasing their chances of success.
Tool Link:https://www.kali.org/tools/crunch/
Key Features:
12
Combining hashcat and
crunch
Combining Hashcat and Crunch forms a dynamic synergy in the realm of
password security assessment. Hashcat, a robust password cracking
tool, joins forces with Crunch, a versatile wordlist generator, to enhance
the efficiency and effectiveness of password recovery efforts.
How It Works:
Advantages:
13
Implementation and
Working
Crunch:
Crunch can generate a wordlist depending on our parameters. Crunch's output can
be transmitted to the screen, a file, or another program.
min-len
The min-len is the minimum length string which we wish crunch to start at. This
option is essential even for parameters which will not use the value.
max-len
It is the maximum length string which we need crunch to end at. Even though the
value will not be used, this option is essential.
charset string
We can specify character sets for crunch to use on the command line, and if we
leave it, blank, crunch will use the default character sets. The order should be lower
case characters, upper case characters, numbers, and then symbols. If we do
not follow this order then we will not get the desired output. We have to specify the
values for the character type or a plus sign.
14
Create Custom Wordlist using Crunch:
Step 1: In order to a create custom wordlist, first we have to start our Kali Linux,
open the terminal, and then type Crunch to check crunch is installed or not and it is
the most current version.
Step 2: We will use the command man command to view the crunch manual and
options available.
15
Step 4: We can use the following command if we know the target's password is 8
characters long and ends with 1 & 2:
16
Generate Wordlist with Specific Pattern:
Crunch offers -t option to generate a wordlist using a particular pattern based on our
requirement.
With the help of the -t option, we can generate 4 kinds of patterns as we specified
below:
○ Lowercase alphabets: With the help of the @, we can generate the pattern
of lowercase alphabets.
○ Uppercase alphabets: With the help of the , we can generate the pattern of
uppercase letters.
○ Numeric character: With the help of the %, we can generate the pattern of
numeric characters.
○ Special character symbol: With the help of the ^ we can generate the
pattern of a special character symbol.
In order to generate a wordlist that includes 6 numeric characters on the right side of
the string "preeti" for example, preeti123456, we have to execute the following
command.
17
HASHCAT:
Let’s create two hashes: A MD5 hash and a SHA1 hash for the string
“Password123”.
We can store these hashes under the names md5.txt and sha1.txt to use
them when working with Hashcat.
We have used two flags, -m and -a . The -m flag is used to specify the
hash type and the -a flag is to specify the attack mode.
18
Attack Modes:
Let’s crack our md5 hash first. We will crack this hash using the
Dictionary mode. This is a simple attack where we provide a list of words
(RockYou) from which Hashcat will generate and compare hashes.
We can specify the hash mode as “md5” using the value 0. But Hashcat
can also identify the hash type automatically for common hash
algorithms.
For the attack mode, we will be using the dictionary mode (0) using the
flag -a. Here is the full command:
19
Now let’s crack our SHA hash. The hash mode value for SHA1 is 100.
Here is the command:
20
21
Defending against hashcat
● The first and obvious step is to set strong passwords. The stronger
the password is, the harder it is to crack it.You can check if your
password has been exposed to the internet
here.(https://haveibeenpwned.com/)
That means that enabling basic cyber security best practices is probably
the easiest way to prevent getting hacked. In fact, Microsoft recently
reported that just enabling 2FA will end up blocking 99.9% of automated
attacks.
22
Conclusion
In the ever-evolving landscape of cybersecurity, password security
remains a paramount concern. The combination of Hashcat and Crunch
emerges as a formidable duo, offering a robust solution for password
cracking and security assessment. This synergy leverages the strengths
of both tools to enhance the efficiency and effectiveness of password
recovery efforts.
Hashcat, with its support for multiple hashing algorithms and attack
modes, provides the means to crack a diverse range of hashed
passwords. Crunch, on the other hand, empowers security experts to
create tailored wordlists, enabling a targeted and precise approach to
password cracking.
23
Resources
Here are some resources to help you learn more about password
cracking and password security:
- Hashcat Wiki: The official wiki of the popular password cracking tool,
hashcat.
- John the Ripper Wiki: The official wiki of another popular password
cracking tool, John the Ripper.
- Have I Been Pwned: A website that allows you to check if your email
address has been involved in a data breach.
24