Password Cracker Using MPI: Project Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Password Cracker Using MPI

PROJECT REPORT

Submitted as a Jth component for the course


Information Security Analysis and Audit (CSE3501)
B.Tech(CSE)

By
NAME OF STUDENT REG NO
Manohar Kumar Singh 19BCE2646
Ravi Kasaudhan 19BCE2659
Sudeep Chaudhary 19BCE2661

UNDER THE GUIDANCE OF


Prof. Rajarajan G

SCHOOL OF COMPUTER SCIENCE AND ENGINEERING


December 2021

Fall 2021-22

19BCE2646 19BCE2659 19BCE2661


DECLARATION BY THE CANDIDATE

We hereby declare that the project report entitled “<Password Cracker


Using MPI>” submitted by me to VIT University, Vellore in partial
fulfillment of the requirement for the award of the degree of
B.Tech(Computer Science and Engineering) is a record of Jth
component of project work carried out by us under the guidance of <Prof.
Rajarajan G>. I further declare that the work reported in this project has
not been submitted and will not be submitted, either in part or in full, for the
award of any other degree or diploma in this institute or any other institute
or university.

Place: Vellore Signature of the Candidate

Manohar Kumar Singh


Ravi Kasaudhan
Date: December-2021 Sudeep Chaudhary

19BCE2646 19BCE2659 19BCE2661


ABSTRACT
The Aim of the Project is to build a code which can detect and decrypt the
encryption which has been already provided to the data Implementation of the
Decryption Methodology involves Parallel Computing and Uses Message Passing
over Distributed Range. Using MPI and OpenMP.
The Mainframe is in building a Windows based high performance computing cluster
(Parallel-cluster) and the development of a parallelized password cracker
application using the Message Passing Interface (MPI) in order to gain competence
in designing parallel programs, especially in or near the field of computer forensics.

INTRODUCTION
In cryptanalysis and computer security, password cracking is the process of
recovering passwords from data that have been stored in or transmitted by a
computer system. A common approach (brute-force attack) is to repeatedly try
guesses for the password and to check them against an available cryptographic
hash of the password. The purpose of password cracking might be to help a user
recover a forgotten password (installing an entirely new password is less of a
security risk, but it involves System Administration privileges), to gain unauthorized
access to a system, or a preventive measure by system administrators to check for
easily crack able passwords. On a file-by-file basis, password cracking is utilized to
gain access to digital evidence to which a judge has allowed access, when a
particular file's permissions are restricted.

PROBLEM STATEMENT
In cryptanalysis and computer security, Nowadays the Data is Secured using variety
of Firewalls/Locks, Passwords and Encryption which doesn’t allow external users to
access the data. But sometimes higher security also needs breaching ethically by
which we can check the run-time analysis and analyze the Data. Real Time Examples

19BCE2646 19BCE2659 19BCE2661


like the defense sector where there is a procedure of ethical hacking and password
breaking to keep in touch with the status of extremis. Password cracking is the
process which of recovering passwords from data that have been stored in or
transmitted by a computer system.

CONCEPT USED
➢ Parallel Cluster Programming
➢ Message Passing Interface (MPI)
➢ Hybridization

Hybridization uses a combination of OpenMP and MPI together and uses


MPMD (Multiple Program Multiple Data) Methodology.

Password Cracking using MPI


This project is all about cracking/matching passwords from a large list of passwords
with High Performance Computing or parallel processing via MPI (Message Passing
Interface).

MPI
MPI (Message Passing Interface) is a standard Application Programming Interface
(API) for message passing, supporting various parallel computing architectures to
develop large scale parallel applications. The load is distributed by spawning
various processes and the communication is done via MPI and thus, a de facto
standard for distributed memory systems.

19BCE2646 19BCE2659 19BCE2661


ALGORITHM
Markov Chains Based Method
Markov models are used in some of the password crackers or recovery tools, such
as the John the Ripper2 password cracker and Access data’s Password Recovery
Tool. The Markov chains can reduce the search space which will be needed if the
brute-force attack is used. Narayanan and Shmatikov are the two famous Markov
Chain Based Methodologies used in Present Security Timeline. There’s the Usage
of the Markovian filter to capture the phonetic similarity with words

in the users’ native languages and employ the finite automata model to deal with
the non-alphabetic characters in the passwords.

LITERATURE REVIEW
S.N. TITLE AUTHOR METHODOLOGY MERITS DEMERITS
1 Recurrent Sungyup We use dictionary- To improve on This can be
GANs Nam, based attacks. The the weakness of used for
Password Seungho dictionary based these personal
Cracker For IoT Jeon, password attack can passwords, reasons to
Password Hongkyo be said to be a data password seek
Security Kim, based attack, and the strength revenge
Enhancement Jonsub definition and use of estimation and for
Moon dictionary studies other
transformation rules have been purpose
supported by Hashcat conducted to also.
and JtR can be said to recommend the
be the most basic usage of strong
data-driven expanded passwords, and
attack. organizations
such as the
National
Institute of
Standards and
Technology
(NIST)

19BCE2646 19BCE2659 19BCE2661


recommend the
use of strong
passwords at
the policy level.
2 Reasoning E. Liu, A. An analytical Tools provide Our tools,
Analytically Nakanishi, approach to modeling the first which we
About M. Golla, transformation-based computationally are
Password- D. Cash password guessing. efficient releasing
Cracking and B. Ur We develop a more analysis of open
Software efficient approach for password source,
studying mangled security against directly
wordlist attacks the types of enable real-
without actually mangled time,
running them. We wordlist attacks server-side
design and implement actually estimation
tools that analytically performed in of password
compute properties the wild strength. A
of JtR and Hashcat, company
including whether could
they would generate deploy our
a particular password guess-
and how many number
guesses each rule. calculator,
disallowing
passwords
deemed
3 On Practical Hranický Password cracking Concludes JtR Needs the
Aspects of R., Lištiak context by Markov is really usage of
PCFG F., Mikuš considering the cost relevant when dedicated
Password D., Ryšavý of processing using a fast slow and
Cracking O. candidates. Since this hash function memory
measurement cannot like SHA-1, hard hash
be directly done, we while functions to
then need to measure probabilistic protect
separately the success enumerators passwords.
rate and the like OMEN and
frequency of the PCFG based
process algorithms
perform better
than others
using slow hash
function like
bcrypt.

19BCE2646 19BCE2659 19BCE2661


4 Information Ilsun You Detection method We can detect Expensive
Security with sufficient bots leveraging to
Applications conditions analyzes necessary implement.
two data types: conditions in
behavioral action and consistent way
social action.
5 Practical Jong-Hyuk Brute force method is Combination of Taking first
Privacy Im, Seong used with the use of finding the 1000
Preserving Yun Jeon, probability and password will passwords
Face and Mun statistics has been be less as we requires
Authentication Kyu Lee shown to bring use probability. more than a
for substantially better day to
Smartphones results for cracking generate
Secure Against human-created guesses on
Malicious passwords the same
Clients processor
6 Analysis of Laatansa, By redesigning Efficient and We can add
GPGPU-Based R. Saputra Fitcrack6 system we useful for the more
Brute Force and B. created a solution for pages of big automation
and Dictionary Noranita high efficiency GPGPU database to
Attack on SHA- password cracking generating
1 Password using hashcat tool as password-
Hash a client side mangling
computing engine. rules21
which can
be used for
modifying
dictionary
passwords
7 An Efficient Grover, Explains about Usage of Complexity
Brute Force Varsha and effectivity of brute- combined the run
Attack Gagandeep force and dictionary attack method time
Handling attack which done on (bruteforce + problems
Techniques for SHA-1 hashed dictionary) can be
Server password using gives more faced.
Virtualization GPGPU-based balanced
machine approach in
terms of
cracking
whether the
password is
long or secure
patterned
string.

19BCE2646 19BCE2659 19BCE2661


8 Reasoning Enze Liu, Considering brute It is easy to Time
Analytically Amanda force attack and its implement and complex as
About Nakanishi, tools with its affordable. sometimes
Password- Maximilian implementation and it can take
Cracking Golla, prevention ways or hours to
Software David techniques to avoid complete.
Cash, Blase these types of
Ur attacks.
University
of Chicago,
+ Ruhr
University
Bochum
9 Performance M. Methods used here RNG help us to Time
Analysis of Aljohani, I. are AES, TDES, CTR, generate the consuming
Cryptographic Ahmad, M. MARS, RC6, Serpent, random and and
Pseudorandom Basheri, M. Twofish, difficult complex to
Number Alassafi Cryptography PRNGs, password implement
Generators BCAs.
10 Practical Jong-Hyuk Propose a privacy- Face detection Hard to
Privacy Im , Seong preserving face is more secured implement
Preserving Yun Jeon, authentication system and useable. and
Face and Mun for smartphones that spoofing
Authentication Kyu Lee , guarantees security also is
for Member, against malicious possible
Smartphones IEEE clients.
Secure Against
Malicious
Clients
11 Distributed Radek By redesigning High efficiency Difficulty
password Hranický a, Fitcrack6 system we and affordable. starts when
cracking with * , Lukas created a solution for attacks
BOINC and Zobal a , high-efficiency hashcat
hashcat Ondrej GPGPU supports on
Rysavý b , password cracking a single
Dusan using hashcat tool as machine.
Kolar a client-side
computing engine.

19BCE2646 19BCE2659 19BCE2661


CODE
#include <iostream>
#include <ctime>
#include <omp.h>
using namespace std;
string crackPassword(string pass);
long long int attempt;
clock_t start_t, end_t;
int main()
{
string password;
#pragma omp critical
cout << "Enter the password to crack : \n";
cin >> password;
#pragma omp critical
cout << endl
<< endl
<< endl
<< "\n>> CRACKED THE PASSWORD! >>\n"
<< endl
<< endl
<< "The password : " << crackPassword(password) << endl;
cout << "The number of attempts to crack the password : " << attempt << endl;
cout << "The time duration passed : " << (double)(end_t - start_t) / 1000 <<
" seconds" << endl
<< endl;
return 0;
}
string crackPassword(string pass)
{
int digit[7], alphabetSet = 1, passwordLength = 1;
start_t = clock();
string test, alphabet = "1337 also daktari is pro";
while (1)
{
switch (passwordLength)
{
case 1:
while (alphabetSet < 4)
{
switch (alphabetSet)
{
case 1:
alphabet = "-0123456789";

19BCE2646 19BCE2659 19BCE2661


cout << endl
<< endl
<< "Testing only digits(0123456789) - 10 Characters,
please wait ";
break;
case 2:
alphabet = "-abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only lowercase
characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait ";
break;
case 3:
alphabet = "-ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only uppercase
characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait ";
break;
}
for (digit[0] = 1; digit[0] < alphabet.length(); digit[0]++)
{
attempt++;
if (attempt % 2500000 == 0)
cout << ".";
test = alphabet[digit[0]];
for (int i = 1; i < passwordLength; i++)
if (alphabet[digit[i]] != '-')
test += alphabet[digit[i]];
if (pass.compare(test) == 0)
{
end_t = clock();
return test;
}
}
alphabetSet++;
}
break;
case 2:

19BCE2646 19BCE2659 19BCE2661


alphabetSet = 1;
while (alphabetSet < 6)
{
switch (alphabetSet)
{
case 1:
alphabet = "-0123456789";
cout << endl
<< endl
<< "Testing only digits(0123456789)- 10 Characters,
please wait ";
break;
case 2:
alphabet = "-abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only lowercase
characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait ";
break;
case 3:
alphabet = "-ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password,increasing the searching
level." << endl
<< endl
<< "Testing only uppercase
characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait ";
break;
case 4:
alphabet = "- 0123456789abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait ";
break;
case 5:
alphabet = "- 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl

19BCE2646 19BCE2659 19BCE2661


<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing Uppercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait ";
break;
}
for (digit[1] = 0; digit[1] < alphabet.length(); digit[1]++)
for (digit[0] = 1; digit[0] < alphabet.length(); digit[0]++)
{
attempt++;
if (attempt % 2500000 == 0)
cout << ".";
test = alphabet[digit[0]];
for (int i = 1; i < passwordLength; i++)
if (alphabet[digit[i]] != '-')
test += alphabet[digit[i]];
if (pass.compare(test) == 0)
{
end_t = clock();
return test;
}
}
alphabetSet++;
}
break;
case 3:
alphabetSet = 1;
while (alphabetSet < 8)
{
switch (alphabetSet)
{
case 1:
alphabet = "-0123456789";
cout << endl
<< endl
<< "Testing only digits(0123456789) - 10 Characters,
please wait ";
break;
case 2:
alphabet = "-abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl

19BCE2646 19BCE2659 19BCE2661


<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only lowercase
characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait ";
break;
case 3:
alphabet = "- ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only uppercase
characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait ";
break;
case 4:
alphabet = "- 0123456789abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait ";
break;
case 5:
alphabet = "- 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing uppercase characters and
numbers(0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 36 Characters, please wait ";
break;
case 6:
alphabet = "-
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl

19BCE2646 19BCE2659 19BCE2661


<< "Testing lowercase, uppercase
characters(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 52 Characters,
please wait ";
break;
case 7:
alphabet = "-
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase, uppercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 62
Characters, please wait ";
break;
}
for (digit[2] = 0; digit[2] < alphabet.length(); digit[2]++)
for (digit[1] = 0; digit[1] < alphabet.length(); digit[1]++)
for (digit[0] = 1; digit[0] < alphabet.length();
digit[0]++)
{
attempt++;
if (attempt % 2500000 == 0)
cout << ".";
test = alphabet[digit[0]];
for (int i = 1; i < passwordLength; i++)
if (alphabet[digit[i]] != '-')
test += alphabet[digit[i]];
if (pass.compare(test) == 0)
{
end_t = clock();
return test;
}
}
alphabetSet++;
}
break;
case 4:
alphabetSet = 1;
while (alphabetSet < 8)
{
switch (alphabetSet)
{
case 1:

19BCE2646 19BCE2659 19BCE2661


alphabet = "-0123456789";
cout << endl
<< endl
<< "Testing only digits(0123456789) - 10 Characters,
please wait ";
break;
case 2:
alphabet = "-abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only lowercase
characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait ";
break;
case 3:
alphabet = "- ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only uppercase
characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait ";
break;
case 4:
alphabet = "- 0123456789abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait ";
break;
case 5:
alphabet = "- 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing uppercase characters and
numbers(0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 36 Characters, please wait ";

19BCE2646 19BCE2659 19BCE2661


break;
case 6:
alphabet = "-
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase, uppercase
characters(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 52 Characters,
please wait ";
break;
case 7:
alphabet = "-
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase, uppercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 62
Characters, please wait ";
break;
}
for (digit[3] = 0; digit[3] < alphabet.length(); digit[3]++)
for (digit[2] = 0; digit[2] < alphabet.length(); digit[2]++)
for (digit[1] = 0; digit[1] < alphabet.length();
digit[1]++)
for (digit[0] = 1; digit[0] < alphabet.length();
digit[0]++)
{
attempt++;
if (attempt % 2500000 == 0)
cout << ".";
test = alphabet[digit[0]];
for (int i = 1; i < passwordLength; i++)
if (alphabet[digit[i]] != '-')
test += alphabet[digit[i]];
if (pass.compare(test) == 0)
{
end_t = clock();
return test;
}

19BCE2646 19BCE2659 19BCE2661


}
alphabetSet++;
}
break;
case 5:
alphabetSet = 1;
while (alphabetSet < 8)
{
switch (alphabetSet)
{
case 1:
alphabet = "-0123456789";
cout << endl
<< endl
<< "Testing only digits(0123456789) - 10 Characters,
please wait ";
break;
case 2:
alphabet = "-abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only lowercase
characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait ";
break;
case 3:
alphabet = "- ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only uppercase
characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait ";
break;
case 4:
alphabet = "- 0123456789abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl

19BCE2646 19BCE2659 19BCE2661


<< "Testing lowercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait ";
break;
case 5:
alphabet = "- 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing uppercase characters and
numbers(0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 36 Characters, please wait ";
break;
case 6:
alphabet = "-
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase, uppercase
characters(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 52 Characters,
please wait ";
break;
case 7:
alphabet = "-
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase, uppercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 62
Characters, please wait ";
break;
}
for (digit[4] = 0; digit[4] < alphabet.length(); digit[4]++)
for (digit[3] = 0; digit[3] < alphabet.length(); digit[3]++)
for (digit[2] = 0; digit[2] < alphabet.length();
digit[2]++)
for (digit[1] = 0; digit[1] < alphabet.length();
digit[1]++)

19BCE2646 19BCE2659 19BCE2661


for (digit[0] = 1; digit[0] < alphabet.length();
digit[0]++)
{
attempt++;
if (attempt % 2500000 == 0)
cout << ".";
test = alphabet[digit[0]];
for (int i = 1; i < passwordLength; i++)
if (alphabet[digit[i]] != '-')
test += alphabet[digit[i]];
if (pass.compare(test) == 0)
{
end_t = clock();
return test;
}
}
alphabetSet++;
}
break;
case 6:
alphabetSet = 1;
while (alphabetSet < 8)
{
switch (alphabetSet)
{
case 1:
alphabet = "-0123456789";
cout << endl
<< endl
<< "Testing only digits(0123456789) - 10 Characters,
please wait ";
break;
case 2:
alphabet = "- abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only lowercase
characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait ";
break;
case 3:
alphabet = "- ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl

19BCE2646 19BCE2659 19BCE2661


<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only uppercase
characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait ";
break;
case 4:
alphabet = "- 0123456789abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait ";
break;
case 5:
alphabet = "- 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing uppercase characters and
numbers(0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 36 Characters, please wait ";
break;
case 6:
alphabet = "-
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase, uppercase
characters(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 52 Characters,
please wait ";
break;
case 7:
alphabet = "-
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl

19BCE2646 19BCE2659 19BCE2661


<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase, uppercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 62
Characters, please wait ";
break;
}
for (digit[5] = 0; digit[5] < alphabet.length(); digit[5]++)
for (digit[4] = 0; digit[4] < alphabet.length(); digit[4]++)

for (digit[3] = 0; digit[3] < alphabet.length();


digit[3]++)

for (digit[2] = 0; digit[2] < alphabet.length();


digit[2]++)

for (digit[1] = 0; digit[1] < alphabet.length();


digit[1]++)

for (digit[0] = 1; digit[0] <


alphabet.length(); digit[0]++)
{
attempt++;
if (attempt % 2500000 == 0)
cout << ".";
test = alphabet[digit[0]];
for (int i = 1; i < passwordLength; i++)
if (alphabet[digit[i]] != '-')
test += alphabet[digit[i]];
if (pass.compare(test) == 0)
{
end_t = clock();
return test;
}
}
alphabetSet++;
}
break;
case 7:
alphabetSet = 1;
while (alphabetSet < 8)
{
switch (alphabetSet)
{

19BCE2646 19BCE2659 19BCE2661


case 1:
alphabet = "-0123456789";
cout << endl
<< endl
<< "Testing only digits(0123456789) - 10 Characters,
please wait ";
break;
case 2:
alphabet = "- abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only lowercase
characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait ";
break;
case 3:
alphabet = "- ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only uppercase
characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait ";
break;
case 4:
alphabet = "- 0123456789abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait ";
break;
case 5:
alphabet = "- 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl

19BCE2646 19BCE2659 19BCE2661


<< "Testing uppercase characters and
numbers(0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 36 Characters, please wait ";
break;

case 6:
alphabet = "-
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase, uppercase
characters(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 52 Characters,
please wait ";
break;
case 7:
alphabet = "-
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase, uppercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 62
Characters, please wait ";
break;
}
for (digit[6] = 0; digit[6] < alphabet.length(); digit[6]++)

for (digit[5] = 0; digit[5] < alphabet.length(); digit[5]++)

for (digit[4] = 0; digit[4] < alphabet.length();


digit[4]++)

for (digit[3] = 0; digit[3] < alphabet.length();


digit[3]++)

for (digit[2] = 0; digit[2] < alphabet.length();


digit[2]++)

for (digit[1] = 0; digit[1] <


alphabet.length(); digit[1]++)

19BCE2646 19BCE2659 19BCE2661


for (digit[0] = 1; digit[0] <
alphabet.length(); digit[0]++)
{
attempt++;
if (attempt % 2500000 == 0)
cout << ".";
test = alphabet[digit[0]];
for (int i = 1; i < passwordLength;
i++)
if (alphabet[digit[i]] != '-')
test += alphabet[digit[i]];
if (pass.compare(test) == 0)
{
end_t = clock();
return test;
}
}
alphabetSet++;
}
break;
case 8:
alphabetSet = 1;
while (alphabetSet < 8)
{
switch (alphabetSet)
{
case 1:
alphabet = "-0123456789";
cout << endl
<< endl
<< "Testing only digits(0123456789) - 10 Characters,
please wait ";
break;
case 2:
alphabet = "- abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only lowercase
characters(abcdefghijklmnopqrstuvwxyz) - 26 Characters, please wait ";
break;
case 3:
alphabet = "- ABCDEFGHIJKLMNOPQRSTUVWXYZ";

19BCE2646 19BCE2659 19BCE2661


cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing only uppercase
characters(ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 26 Characters, please wait ";
break;
case 4:
alphabet = "- 0123456789abcdefghijklmnopqrstuvwxyz";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyz) - 36 Characters, please wait ";
break;
case 5:
alphabet = "- 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing uppercase characters and
numbers(0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) - 36 Characters, please wait ";
break;
case 6:
alphabet = "-
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl
<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase, uppercase
characters(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 52 Characters,
please wait ";
break;
case 7:
alphabet = "-
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
cout << endl
<< endl

19BCE2646 19BCE2659 19BCE2661


<< "Couldn't find the password, increasing the searching
level." << endl
<< endl
<< "Testing lowercase, uppercase characters and
numbers(0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) - 62
Characters, please wait";
break;
}
for (digit[7] = 0; digit[7] < alphabet.length(); digit[7]++)

for (digit[6] = 0; digit[6] < alphabet.length(); digit[6]++)

for (digit[5] = 0; digit[5] < alphabet.length();


digit[5]++)

for (digit[4] = 0; digit[4] < alphabet.length();


digit[4]++)

for (digit[3] = 0; digit[3] < alphabet.length();


digit[3]++)

for (digit[2] = 0; digit[2] <


alphabet.length(); digit[2]++)

for (digit[1] = 0; digit[1] <


alphabet.length(); digit[1]++)

for (digit[0] = 1; digit[0] <


alphabet.length(); digit[0]++)
{
attempt++;
if (attempt % 2500000 == 0)
cout << ".";
test = alphabet[digit[0]];
for (int i = 1; i <
passwordLength; i++)
if (alphabet[digit[i]] != '-
')
test +=
alphabet[digit[i]];
if (pass.compare(test) == 0)
{
end_t = clock();
return test;
}

19BCE2646 19BCE2659 19BCE2661


}
alphabetSet++;
}
break;
}
cout << endl
<< endl
<< endl
<< endl
<< "*" << endl;
cout << "* Password length is not " << passwordLength << ". Increasing
password length! *";
cout << endl
<< "*" << endl
<< endl;
passwordLength++;
}
}

19BCE2646 19BCE2659 19BCE2661


RESULTS AND DISCUSSION

19BCE2646 19BCE2659 19BCE2661


19BCE2646 19BCE2659 19BCE2661
19BCE2646 19BCE2659 19BCE2661
CONCLUSION
When we try to hack into a server it requires multiple processes which are to be
executed side by side. To execute it in serial requires loads of time which is not
feasible in the day-to-day life nowadays.
So when we parallelize the algorithms such as John the Ripper, Apriori and Brute
Force Password cracking algorithm…it takes very less time to enumerate the faults,
and crack the security quickly to get into the zone of apprehension.
Since we’ve Parallelized Constructs and used OpenMP the speed in the execution
has increased incredibly as you can see from the output, we have also measured
the time of output which is much less than serial hacking time.
Thus, once parallelized with OpenMP, the threads which run serially also run
parallelly and improve time, scalability and resource allocations

REFERENCES
[1] Nam, S.; Jeon, S.; Kim, H.; Moon, J. Recurrent GANs Password Cracker For
IoT Password Security Enhancement. Sensors 2020, 20, 3106

[2] E. Liu, A. Nakanishi, M. Golla, D. Cash and B. Ur, "Reasoning Analytically about
Password-Cracking Software," 2019 IEEE Symposium on Security and Privacy
(SP), San Francisco, CA, USA, 2019, pp. 380-397, doi:
10.1109/SP.2019.00070.

[3] Hranický R., Lištiak F., Mikuš D., Ryšavý O. (2019) On Practical Aspects of
PCFG Password Cracking. In: Foley S. (eds) Data and Applications Security and
Privacy XXXIII. DBSec 2019. Lecture Notes in Computer Science, vol 11559.
Springer, Cham. https://doi.org/10.1007/978-3-030-22479-0_3

19BCE2646 19BCE2659 19BCE2661


[4] Distributed password cracking with BOINC and hashcat,Radek
Hranický,Lukáš Zobal,Ondřej Ryšavý,Dušan Kolář,Digital
Investigation,Elsevier,September 2019

[5] Nam S., Jeon S., Moon J. (2020) A New Password Cracking Model with
Generative Adversarial Networks. In: You I. (eds) Information Security
Applications. WISA 2019. Lecture Notes in Computer Science, vol 11897.
Springer, Cham. https:// doi.org/10.1007/978-3-030-39303-8_19

[6] Valois M., Lacharme P., Bars JM.L. (2019) Performance of Password Guessing
Enumerators Under Cracking Conditions. In: Dhillon G., Karlsson F.,
Hedström K., Zúquete A. (eds) ICT Systems Security and Privacy Protection.
SEC 2019. IFIP Advances in Information and Communication Technology, vol
562. Springer, Cham. https://doi.org/10.1007/978-3-030-22312-0_5

[7] Rudy J., Rodwald P. (2020) Job Scheduling with Machine Speeds for Password
Cracking Using Hashtopolis. In: Zamojski W., Mazurkiewicz J., Sugier J.,
Walkowiak T., Kacprzyk J. (eds) Theory and Applications of Dependable
Computer Systems. DepCoS-RELCOMEX 2020. Advances in Intelligent
Systems and

[8] Computing, vol 1173. Springer, Cham. https://doi.org/10.1007/978-3-030-


48256- 5_51

[9] Distributed password cracking with BOINC and hashcat,Radek


Hranický,Lukáš Zobal,Ondřej Ryšavý,Dušan Kolář,Digital
Investigation,Elsevier,September 2019

[10] Grover, Varsha and , Gagandeep, An Efficient Brute Force Attack


Handling Techniques for Server Virtualization (March 30, 2020). Proceedings
of the International Conference on Innovative Computing & Communications
(ICICC) 2020, Available at SSRN: https://ssrn.com/abstract=3564447 or
http://dx.doi.org/10.2139/ssrn.3564447

19BCE2646 19BCE2659 19BCE2661


[11] Laatansa, R. Saputra and B. Noranita, "Analysis of GPGPU-Based Brute-
Force and Dictionary Attack on SHA-1 Password Hash," 2019 3rd
International Conference on Informatics and Computational Sciences
(ICICoS), Semarang, Indonesia, 2019, pp. 1-4, doi:
10.1109/ICICoS48119.2019.8982390

*** THANK YOU ***

19BCE2646 19BCE2659 19BCE2661

You might also like