
a fast password wordlist generator, Smartlist creation and password hybrid-mask analysis tool written in pure safe Rust
Cracken is a fast password wordlist generator, Smartlist creation and password hybrid-mask analysis tool written in pure safe Rust (more on [talk/][talk]). Inspired by great tools like [maskprocessor][mp], [hashcat][hashcat], [Crunch][crunch] and π€ HuggingFace's [tokenizers][tokenizers].
At [DeepSec2021][talk-abstract] we presented a new method for analysing passwords as Hybrid-Masks exploiting common substrings in passwords by utilizing NLP tokenizers (more info on [talk/][talk]).
Our method splits a password into its subwords instead of just a characters mask. HelloWorld123! splitted into ['Hello', 'World', '123!'] as these three subwords are very common in other passwords.
?w1?w2?l?d)
full table here
Hybrid-Masks very VERY FAST π¦Έβ‘π¨ (see performance section)Smartlists - compact & representative list of subwords from given passwords files (using π€ HuggingFace's [tokenizers][tokenizers])Hybrid-Masks - building statistics for better password candidates (again very fast)cracken -w rockyou.txt -w 100-most-common.txt '?w1?w2?d?d?d?d?s'hashcat, john or your favorite password crackercracken createcracken entropyHybrid-Masks to generate password candidates fast - cracken generate -i hybrid-masks.txtFor more details see Usage section
download (linux only currently): [latest release π][releases]
for more installation options see installation section
run Cracken:
generate all words of length 8 starting with uppercase followed by 6 lowercase chars and then a digit:
$ cracken -o pwdz.lst '?u?l?l?l?l?l?l?d'
generate words from two wordlists with year suffix (1000-2999) <firstname><lastname><year>
$ cracken --wordlist firstnames.txt --wordlist lastnames.lst --charset '12' '?w1?w2?1?d?d?d'
create a Smartlist of size 50k from subwords extracted from rockyou.txt
$ cracken create -f rockyou.txt -m 50000 --smartlist smart.lst
estimate the entropy of hybrid mask of the password HelloWorld123! using a smartlist
$ cracken entropy -f smart.lst 'HelloWorld123!'
hybrid-min-split: ["hello", "world1", "2", "3", "!"]
hybrid-mask: ?w1?w1?d?d?s
hybrid-min-entropy: 42.73
--
charset-mask: ?l?l?l?l?l?l?l?l?l?l?d?d?d?s
charset-mask-entropy: 61.97
As of writing this, Cracken is probably the world's fastest wordlist generator:
Cracken has around 25% increased performance over hashcat's fast [maskprocessor][mp] thats written in C.
Cracken can generate around 2 GB/s per core.
more details on benchmarks/ π
Why speed is important? A typical GPU can test billions passwords per second depending on the password hash function. When the wordlist generator produces fewer words per second than the cracking tool can handle - the cracking speed will degrade.
Cracken uses A* algorithm to analyze passwords very fast. it can find the minimal Hybrid-Mask of passwords file at rate of ~100k Passwords/sec (cracken entropy -f words1.txt -f words2.txt ... -p pwds.txt)
install Cracken or compile from source
download latest release from [releases π][releases]
Cracken is written in Rust and needs rustc to get compiled. Cracken should support all Platforms that Rust support.
installation instructions for [cargo π][rustc-installation]
there are two options building from source - installing with cargo from crates.io (preferred) or compiling manually from source.
install with cargo:
$ cargo install cracken
clone Cracken:
$ git clone https://github.com/shmuelamar/cracken
build Cracken:
$ cd cracken
$ cargo build --release
run it:
$ ./target/release/cracken --help
$ cracken --help
Cracken v1.0.0 - a fast password wordlist generator
USAGE:
cracken [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
generate (default) - Generates newline separated words according to given mask and wordlist files
create Create a new smartlist from input file(s)
entropy
Computes the estimated entropy of password or password file.
The entropy of a password is the log2(len(keyspace)) of the password.
There are two types of keyspace size estimations:
* mask - keyspace of each char (digit=10, lowercase=26...).
* hybrid - finding minimal split into subwords and charsets.
For specific subcommand help run: cracken <subcommand> --help
Example Usage:
## Generate Subcommand Examples:
# all digits from 00000000 to 99999999
cracken ?d?d?d?d?d?d?d?d
# all digits from 0 to 99999999
cracken -m 1 ?d?d?d?d?d?d?d?d
# words with pwd prefix - pwd0000 to pwd9999
cracken pwd?d?d?d?d
# all passwords of length 8 starting with upper then 6 lowers then digit
cracken ?u?l?l?l?l?l?l?d
# same as above, write output to pwds.txt instead of stdout
cracken -o pwds.txt ?u?l?l?l?l?l?l?d
# custom charset - all hex values
cracken -c 0123456789abcdef '?1?1?1?1'
# 4 custom charsets - the order determines the id of the charset
cracken -c 01 -c ab -c de -c ef '?1?2?3?4'
# 4 lowercase chars with years 2000-2019 suffix
cracken -c 01 '?l?l?l?l20?1?d'
# starts with firstname from wordlist followed by 4 digits
cracken -w firstnames.txt '?w1?d?d?d?d'
# starts with firstname from wordlist with lastname from wordlist ending with symbol
cracken -w firstnames.txt -w lastnames.txt -c '!@#$' '?w1?w2?1'
# repeating wordlists multiple times and combining charsets
cracken -w verbs.txt -w nouns.txt '?w1?w2?w1?w2?w2?d?d?d'
## Create Smartlists Subcommand Examples:
# create smartlist from single file into smart.txt
cracken create -f rockyou.txt --smartlist smart.txt
# create smartlist from multiple files with multiple tokenization algorithms
cracken create -t bpe -t unigram -t wordpiece -f rockyou.txt -f passwords.txt -f wikipedia.txt --smartlist smart.txt