Coder Social home page Coder Social logo

clesiorki / crackstation-hashdb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from defuse/crackstation-hashdb

0.0 1.0 0.0 35 KB

CrackStation.net's Lookup Table Implementation.

License: GNU General Public License v3.0

PHP 52.68% Makefile 0.92% C 44.90% Shell 1.50%

crackstation-hashdb's Introduction

CrackStation.net's Lookup Tables

Introduction

There are three components to this system:

  1. The indexing PHP script (createidx.php), which takes a wordlist and builds a lookup table index for a hash function and the words in the list.

  2. The indexing sorter program (sortidx.c), which sorts an index created by the indexing script, so that the lookup script can use a binary search on the index to crack hashes.

  3. The lookup script (LookupTable.php), which uses the wordlist and index to crack hashes.

The system is split up like this because PHP provides easy access to many different types of hash functions, but is too slow to sort large indexes in a reasonable amount of time. We are planning to re-write components #1 and #3 in C or C++.

Building and Testing

The PHP scripts to not need to be built. To build the C programs, run make.

To run the tests, just run make test, and then clean up the files the tests created with make testclean.

Indexing a Dictionary

Suppose you have a password dictionary in the file words.txt and you would like to index it for MD5 and SHA1 cracking.

First, create the MD5 and SHA1 indexes:

$ php createidx.php md5 words.txt words-md5.idx
$ php createidx.php sha1 words.txt words-sha1.idx

Next, use the sortidx program to sort the indexes:

$ ./sortidx -r 256 words-md5.idx
$ ./sortidx -r 256 words-sha256.idx

The -r parameter is the maximum amount of memory sortidx is allowed to use in MiB. The more memory you let it use, the faster it will go. Give it as much as your system will allow.

You now have everything you need to crack MD5 and SHA1 hashes quickly.

Cracking Hashes

Once you have generated and sorted the index, you can use the LookupTable class to crack hashes. See test/test.php for an example of how to use it.

Adding Words

Once a wordlist has been indexed, you can not modify the wordlist file without breaking the indexes. Appending to the wordlist is safe in that it will not break the indexes, but the words you append won't be indexed, unless you re-generate the index. There is currently no way to add words to an index without re-generating the entire index.

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.