Giter Site home page Giter Site logo

sameetasadullah / distributed-password-cracker-using-mpi-and-openmp Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 898 KB

Password Cracker program coded in C++ language by applying brute force algorithm and parallelizing it using MPI and OpenMP

License: MIT License

C++ 100.00%
brute-force-passwords brute-force-search cpp linux mpi mpi-parallelization openmp openmp-parallelization password-cracker ubuntu

distributed-password-cracker-using-mpi-and-openmp's Introduction

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.

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

distributed-password-cracker-using-mpi-and-openmp's People

Contributors

sameetasadullah avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.