Phraser
This week I am going to try a security tool that is a phrase generator that uses n-grams and Markov chains that can be used with passphase cracking software. These can be used with your favorite password cracking software, hashcat, john the ripper, etc. Per the github which can be found here: https://github.com/Sparell/Phraser First you create n-gram statistics (stats about how often certain character sequences occurs in a large text) with the program PhraserGram. Redirect the output to file. Then use those statistics as input to the actual phrase generator which outputs phrases, one per line. The output can be redirected to file or read directly into your favourite password cracker via stdin.
The usage seems pretty straight forward:
###PhraserGram Usage
USAGE:
PhraserGram.exe -i PATH | -h [options]
OPTIONS:
-i PATH Path to input source text file
-n INT Size of n-grams (-n 3 means trigrams eg. Default = 1)
-w Generate n-grams on word level (if omitted, default is character level)
-h Show this usage message. --help or /? or no args also works
###Phraser Usage
USAGE:
Phraser.exe -i PATH |-h [OPTIONS]
OPTIONS:
-h | --help Show this help message
-i | --input PATH Path to n-gram stats file
-min INT Min number of chars in phrases
-max INT Max number of chars in phrases
-wmin | --wordsmin INT Minimal number of words in phrases
-wmax | --wordsmax INT Maximal number of words in phrases
-t | --threshold INT Ignore n-grams seen <= -t times in source text
-f | --feed STRING Only create phrases starting with this
##Complete example execution:
PhraserGram -i texts\SherlockBook.txt -n 3 -w > ngrams\3WSherlock.txt (Reads a book saved in the specified path and create 3-gram stats on word level, and save the results to the file 3WSherlock.txt)
Phraser -i ngrams\3WSherlock.txt -min 14 -max 16 -t 0 > phrases\L14-16T0N3WSherlock.txt (reads that 3-gram stat file, and outputs phrases of lengths 14-16 chars, without threshold filtering, and saves the phrases to the specified file)