Coder Social home page Coder Social logo

hashsnail-server's Introduction

HashSnail-Server

Hashsnail is extremely slow (because it uses only CPU) and barebones clone of the most popular password-cracking utility - Hashcat, but with one key difference - it uses distributed computing with client-server model to crack passwords. And this repository is the server side of the whole system. The application was written as a University DSA course final project, client side was written by me and server side by my colleague.

How it works

The main idea is to divide amount of work among clients based on their relative performance. For example, range of work for mask-based attack can look something like “%D#5%L%F”, it means client with this work range will be bruteforcing all the 4 letter permutations from “05aA” to “95zZ” (How mask syntax works, see further in the paragraph “How to use”). We wrote an algorithm that divides amount of work for any number of clients in this manner. This is done with a performance benchmark that starts before any work does, then clients send benchmark results back to the server, so it can use the algorithm to determine amount of work for every client. Server sends file with hashes and information like "what hashing algorithm to use" and "what attack mode to run" to every client, after that all the clients start attacking simultaneously. All clients stop working roughly at the same time and send their results back to the server.

External libraries

  • Apache Commons CLI
  • log4j-slf4j-impl

Implemented attack modes

  • Mask based bruteforce
  • Dictionary attack

Implemented hashing algorithms

  • SHA-1
  • MD5

Screenshots

Server side

image image

Client side

image

How to use

  1. To run the server side part of application required a pre-installed Java Virtual Machine 18.0.1.1 or more recent version.
  2. Download or recursive clone this repository.
  3. Go to "target" directory and run your cli client
  4. Use "java -jar Hashsnail.jar" + your CLI arguments. At startup, the program uses command-line arguments to determine the operating mode, hashing algorithm, and so on.
  5. Now chosen port is listening. Connect all your clients, write "/start" and wait while each does received work

CLI arguments guide

  • -p --port <port> if used, default port 8000 will be changed to the specified
  • -a --algorithm <algorithm name> now supports MD5 and SHA1 (MD5 by default)
  • -d --dictionary <path to dictionary file> dictionary attack mode, takes path to file with a set of potential passwords (one of attack modes must be specified)
  • -m --mask <mask> mask attack mode, takes a special symbol set that determines range of potential passwords (one of attack modes must be specified)
  • -s --single <hash> if used, password will be searched for only one specified hash, instead of using file with hashes
  • -c --hash-collection <path to hash file> if used, allows to set hash file location ("hash.txt" by default)

Mask syntax guide

  • % is used with one of the following characters to select the necessary alphabet:
    • D "0123456789"
    • L "abcdefghijklmnopqrstuvwxyz"
    • U "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    • F "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
  • # is used with any symbol to explicitly specify an already known character in potential password

Client

Client side application repository made by my colleague

hashsnail-server's People

Contributors

badlocale avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ilyayden

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.