https://github.com/sameetasadullah/distributed-password-cracker-using-mpi-and-openmp
Password Cracker program coded in C++ language by applying brute force algorithm and parallelizing it using MPI and OpenMP
https://github.com/sameetasadullah/distributed-password-cracker-using-mpi-and-openmp
brute-force-passwords brute-force-search cpp linux mpi mpi-parallelization openmp openmp-parallelization password-cracker ubuntu
Last synced: 3 months ago
JSON representation
Password Cracker program coded in C++ language by applying brute force algorithm and parallelizing it using MPI and OpenMP
- Host: GitHub
- URL: https://github.com/sameetasadullah/distributed-password-cracker-using-mpi-and-openmp
- Owner: SameetAsadullah
- License: mit
- Created: 2022-08-14T19:26:14.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-29T15:46:42.000Z (over 3 years ago)
- Last Synced: 2025-03-27T13:51:18.526Z (about 1 year ago)
- Topics: brute-force-passwords, brute-force-search, cpp, linux, mpi, mpi-parallelization, openmp, openmp-parallelization, password-cracker, ubuntu
- Language: C++
- Homepage:
- Size: 877 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Distributed Password Cracker Using MPI and OpenMP
### Description
Password Cracker program coded in `C++ Language` by applying `Brute Force Algorithm` and `Parallelizing` it using MPI and OpenMP. You can look at detailed description [Here](https://github.com/SameetAsadullah/Distributed-Password-Cracker-Using-MPI-and-OpenMP/blob/main/Project%20Statement.pdf).
### Manual
1) Copy the content of `/etc/shadow` into a file `shadow.txt` and place it into your current working directory:
```
sudo cat /etc/shadow > shadow.txt
```
2) Use following command to `Compile the Code`:
```
mpic++ -fopenmp main.cpp -lcrypt -o main
```
3) Create a file named as `machinefile` in your current working directory:
```
touch machinefile
```
4) The `machinefile` should have the hostname of your pc and the number of processes you want to run on it in parallel i.e, sameet is the hostname of my pc and I want to run 5 processes in parallel. So, its format should be like:
```
sameet:5
```
5) Use following commands to `Execute the Code`. Here 5 represents total number of processes to create:
```
mpiexec -n 5 -f machinefile ./main
```
### Working Screenshots
### Side Notes
- The `/etc/shadow` file stores all the users of the pc and their respective passwords in encryped form.
- The encryption of their passwords are done using `SHA-512 Algorithm` in Ubuntu Linux.
- We can encrypt any string using the `crypt()` function from `crypt.h Library`. It returns us Salt and Encyrpted Password both in a single appended string. It requires two arguments:
- The string to encrypt.
- The salt used to encrypt the string.
- We can extract the salt used to encrypt the password from `shadow` file and then use it to encrypt all the strings obtained from brute force and compare with the password.
- In `shadow` file, the username, salt, and password are stored in the following format:
- `Username` before first `:`
- Then `Salt` until three `$` signs
- And `Encrypted Password` after that
### Contributors
- [Sameet Asadullah](https://github.com/SameetAsadullah)
- [Tayyab Ali](https://github.com/DarkDragz)
- [Tayyab Abbas](https://github.com/tayyababbas2000)
- [Aysha Noor](https://github.com/ayshanoorr)