Coder Social home page Coder Social logo

passwordcracker-345's Introduction

PasswordCracker-345

Computer and Network Security Project 1 (Spring 2020: CSCI 345)

Usage

Running the program:

python3 main.py [hashfile] [outputfile]

Hashes are loaded in from the hashfile and output is printed to the outputfile

Implementation Details

Multiprocessing

This program implements multiprocessing to speed up password cracking considerably.

The program spawns processes based on the number of available cpu cores on the system.

This works best with the python module psutil which is not a part of the standard library. The program will run with or without the module, but may be slower without it on systems that do not support hyperthreading.

  • When the psutil module is not available the program spawns (available cpus // 2) processes (minumum 1).
  • When the psutil module is available the program spawns one process for each available hardware cpu core.

Multiprocessing vs Multithreading in Python

Due to the Python Global Interpreter Lock (GIL) multithreaded CPython programs are unable to fully take advantage of systems with multiple processors.

Multiprocessing bypasses the GIL by creating multiple python instances and allows multiprocessed programs to fully take advantage of available cpus.

Wordlist Information

The program uses /usr/share/dict/words as the default wordlist

If necessary this can be changed in rules.py (wordlist variable around line 19)

Testing and Practical Time Analysis

Testing was performed to verify correctness and capabilities as well as inform late stage development decisions.

Testing was performed on a system with 4 hardware cpu cores and 8 logical cpu cores.

A set of 15 hashes was generated using various passwords that conformed to the rulesets.

The table below shows the time it took the program to crack these hashes with a given number of processes.

This testing was completed before the program was completely optimized and finalized.

After further optimization the completion time with 4 processes has been reduced to approximately 50 seconds.

Processes Time (Seconds)
1 437.91
2 237.22
4 154.18
8 172.51

passwordcracker-345's People

Contributors

lukem1 avatar

Watchers

 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.