From 35b49278ae941eb05e3694eb8853abd92574da4c Mon Sep 17 00:00:00 2001 From: bandrel Date: Tue, 8 May 2018 12:01:09 -0400 Subject: [PATCH 1/9] Abstracted the wordlists and masks and put them in the configfile --- config.json | 3 + hate_crack.py | 291 ++++++++++++++++++++++++++------------------------ 2 files changed, 153 insertions(+), 141 deletions(-) diff --git a/config.json b/config.json index 1313211..40cb851 100644 --- a/config.json +++ b/config.json @@ -4,6 +4,9 @@ "hcatTuning": "--force", "hcatWordlists": "/Passwords/wordlists", "hcatOptimizedWordlists": "/Passwords/optimized_wordlists", + "hcatDictionaryWordlist": ["rockyou.txt"], + "hcatCombinationWordlist": ["rockyou.txt","rockyou.txt"], + "hcatHybridlist": ["rockyou.txt"], "hcatMiddleCombinatorMasks": ["2","4"," ","-","_","+",",",".","&"], "hcatMiddleBaseList": "rockyou.txt", "hcatThoroughCombinatorMasks": ["0","1","2","3","4","5","6","7","8","9"," ","-","_","+",",","!","#","$","\"","%","&","'","(",")","*",",",".","/",":",";","<","=",">","?","@","[","\\","]","^","`","{","|","}","~"], diff --git a/hate_crack.py b/hate_crack.py index 8c731ae..d7b6c25 100755 --- a/hate_crack.py +++ b/hate_crack.py @@ -28,11 +28,15 @@ with open(hate_path + '/config.json') as config: hcatTuning = config_parser['hcatTuning'] hcatWordlists = config_parser['hcatWordlists'] hcatOptimizedWordlists = config_parser['hcatOptimizedWordlists'] + hcatDictionaryWordlist = config_parser['hcatDictionaryWordlist'] + hcatHybridlist = config_parser['hcatHybridlist'] + hcatCombinationWordlist = config_parser['hcatCombinationWordlist'] hcatMiddleCombinatorMasks = config_parser['hcatMiddleCombinatorMasks'] hcatMiddleBaseList = config_parser['hcatMiddleBaseList'] hcatThoroughCombinatorMasks = config_parser['hcatThoroughCombinatorMasks'] hcatThoroughBaseList = config_parser['hcatThoroughBaseList'] + if sys.platform == 'darwin': hcatExpanderBin = "expander.app" hcatCombinatorBin = "combinator.app" @@ -42,6 +46,14 @@ else: hcatCombinatorBin = "combinator.bin" hcatPrinceBin = "pp64.bin" +def verify_wordlist_dir(directory, wordlist): + if os.path.isfile(wordlist): + return wordlist + elif os.path.isfile(directory + '/' + wordlist): + return directory + '/' + wordlist + else: + print('Invalid path for {0}. Please check configuration and try again.'.format(wordlist)) + quit(1) # hashcat biniary checks for systems that install hashcat binary in different location than the rest of the hashcat files if os.path.isfile(hcatBin): @@ -52,22 +64,15 @@ else: print('Invalid path for hashcat binary. Please check configuration and try again.') quit(1) -if os.path.isfile(hcatMiddleBaseList): - pass -elif os.path.isfile(hcatWordlists+'/'+hcatMiddleBaseList): - hcatMiddleBaseList = hcatWordlists+'/'+hcatMiddleBaseList -else: - print('Invalid path for hcatMiddleBaseList. Please check configuration and try again.') - quit(1) - -if os.path.isfile(hcatThoroughBaseList): - pass -elif os.path.isfile(hcatWordlists+'/'+hcatThoroughBaseList): - hcatThoroughBaseList = hcatWordlists+'/'+hcatThoroughBaseList -else: - print('Invalid path for hcatThoroughBaseList. Please check configuration and try again.') - quit(1) - +#verify and convert wordlists to fully qualified paths +hcatMiddleBaseList = verify_wordlist_dir(hcatWordlists, hcatMiddleBaseList) +hcatThoroughBaseList = verify_wordlist_dir(hcatWordlists, hcatThoroughBaseList) +for x in range(len(hcatDictionaryWordlist)): + hcatDictionaryWordlist[x] = verify_wordlist_dir(hcatWordlists, hcatDictionaryWordlist[x]) +for x in range(len(hcatHybridlist)): + hcatHybridlist[x] = verify_wordlist_dir(hcatWordlists, hcatHybridlist[x]) +hcatCombinationWordlist[0] = verify_wordlist_dir(hcatWordlists, hcatCombinationWordlist[0]) +hcatCombinationWordlist[1] = verify_wordlist_dir(hcatWordlists, hcatCombinationWordlist[1]) hcatHashCount = 0 @@ -161,40 +166,41 @@ def hcatDictionary(hcatHashType, hcatHashFile): hcatProcess.kill() - hcatProcess = subprocess.Popen( - "{hcatBin} -m {hcatHashType} {hash_file} --session {session_name} --remove -o {hash_file}.out {hcatWordlists}/rockyou.txt " - "-r {hcatPath}/rules/d3ad0ne.rule {tuning} --potfile-path={hate_path}/hashcat.pot".format( - hcatPath=hcatPath, - hcatBin=hcatBin, - hcatHashType=hcatHashType, - hash_file=hcatHashFile, - session_name=os.path.basename(hcatHashFile), - hcatWordlists=hcatWordlists, - tuning=hcatTuning, - hate_path=hate_path), shell=True) - try: - hcatProcess.wait() - except KeyboardInterrupt: - print('Killing PID {0}...'.format(str(hcatProcess.pid))) - hcatProcess.kill() + for wordlist in hcatDictionaryWordlist: + hcatProcess = subprocess.Popen( + "{hcatBin} -m {hcatHashType} {hash_file} --session {session_name} --remove -o {hash_file}.out {hcatWordlist} " + "-r {hcatPath}/rules/d3ad0ne.rule {tuning} --potfile-path={hate_path}/hashcat.pot".format( + hcatPath=hcatPath, + hcatBin=hcatBin, + hcatHashType=hcatHashType, + hash_file=hcatHashFile, + session_name=os.path.basename(hcatHashFile), + hcatWordlist=wordlist, + tuning=hcatTuning, + hate_path=hate_path), shell=True) + try: + hcatProcess.wait() + except KeyboardInterrupt: + print('Killing PID {0}...'.format(str(hcatProcess.pid))) + hcatProcess.kill() - hcatProcess = subprocess.Popen( - "{hcatBin} -m {hcatHashType} {hash_file} --session {session_name} --remove -o {hash_file}.out {hcatWordlists}/rockyou.txt " - "-r {hcatPath}/rules/T0XlC.rule {tuning} --potfile-path={hate_path}/hashcat.pot".format( - hcatPath=hcatPath, - hcatBin=hcatBin, - hcatHashType=hcatHashType, - hash_file=hcatHashFile, - session_name=os.path.basename(hcatHashFile), - hcatWordlists=hcatWordlists, - tuning=hcatTuning, - hate_path=hate_path), shell=True) - try: - hcatProcess.wait() - except KeyboardInterrupt: - print('Killing PID {0}...'.format(str(hcatProcess.pid))) - hcatProcess.kill() + hcatProcess = subprocess.Popen( + "{hcatBin} -m {hcatHashType} {hash_file} --session {session_name} --remove -o {hash_file}.out {hcatWordlist} " + "-r {hcatPath}/rules/T0XlC.rule {tuning} --potfile-path={hate_path}/hashcat.pot".format( + hcatPath=hcatPath, + hcatBin=hcatBin, + hcatHashType=hcatHashType, + hash_file=hcatHashFile, + session_name=os.path.basename(hcatHashFile), + hcatWordlist=wordlist, + tuning=hcatTuning, + hate_path=hate_path), shell=True) + try: + hcatProcess.wait() + except KeyboardInterrupt: + print('Killing PID {0}...'.format(str(hcatProcess.pid))) + hcatProcess.kill() hcatDictionaryCount = lineCount(hcatHashFile + ".out") - hcatBruteCount @@ -311,13 +317,15 @@ def hcatCombination(hcatHashType, hcatHashFile): global hcatCombinationCount global hcatProcess hcatProcess = subprocess.Popen( - "{hcatBin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out -a 1 {word_lists}/rockyou.txt " - "{word_lists}/rockyou.txt {tuning} --potfile-path={hate_path}/hashcat.pot".format( + "{hcatBin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out -a 1 {left} " + "{right} {tuning} --potfile-path={hate_path}/hashcat.pot".format( hcatBin=hcatBin, hash_type=hcatHashType, hash_file=hcatHashFile, session_name=os.path.basename(hcatHashFile), word_lists=hcatWordlists, + left=hcatCombinationWordlist[0], + right=hcatCombinationWordlist[1], tuning=hcatTuning, hate_path=hate_path), shell=True) @@ -334,103 +342,104 @@ def hcatCombination(hcatHashType, hcatHashFile): def hcatHybrid(hcatHashType, hcatHashFile): global hcatHybridCount global hcatProcess - hcatProcess = subprocess.Popen( - "{hcatBin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out -a 6 -1 ?s?d {word_lists}/rockyou.txt ?1?1 " - "{tuning} --potfile-path={hate_path}/hashcat.pot".format( - hcatBin=hcatBin, - hash_type=hcatHashType, - hash_file=hcatHashFile, - session_name=os.path.basename(hcatHashFile), - word_lists=hcatWordlists, - tuning=hcatTuning, - hate_path=hate_path), shell=True) - try: - hcatProcess.wait() - except KeyboardInterrupt: - print('Killing PID {0}...'.format(str(hcatProcess.pid))) - hcatProcess.kill() + for wordlist in hcatHybridlist: + hcatProcess = subprocess.Popen( + "{hcatBin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out -a 6 -1 ?s?d {wordlist} ?1?1 " + "{tuning} --potfile-path={hate_path}/hashcat.pot".format( + hcatBin=hcatBin, + hash_type=hcatHashType, + hash_file=hcatHashFile, + session_name=os.path.basename(hcatHashFile), + wordlist=wordlist, + tuning=hcatTuning, + hate_path=hate_path), shell=True) + try: + hcatProcess.wait() + except KeyboardInterrupt: + print('Killing PID {0}...'.format(str(hcatProcess.pid))) + hcatProcess.kill() - hcatProcess = subprocess.Popen( - "{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 6 -1 ?s?d {word_lists}/rockyou.txt ?1?1?1 " - "{tuning} --potfile-path={hate_path}/hashcat.pot".format( - hcatBin=hcatBin, - hash_type=hcatHashType, - hash_file=hcatHashFile, - session_name=os.path.basename(hcatHashFile), - word_lists=hcatWordlists, - tuning=hcatTuning, - hate_path=hate_path), shell=True) - try: - hcatProcess.wait() - except KeyboardInterrupt: - print('Killing PID {0}...'.format(str(hcatProcess.pid))) - hcatProcess.kill() + hcatProcess = subprocess.Popen( + "{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 6 -1 ?s?d {wordlist} ?1?1?1 " + "{tuning} --potfile-path={hate_path}/hashcat.pot".format( + hcatBin=hcatBin, + hash_type=hcatHashType, + hash_file=hcatHashFile, + session_name=os.path.basename(hcatHashFile), + wordlist=wordlist, + tuning=hcatTuning, + hate_path=hate_path), shell=True) + try: + hcatProcess.wait() + except KeyboardInterrupt: + print('Killing PID {0}...'.format(str(hcatProcess.pid))) + hcatProcess.kill() - hcatProcess = subprocess.Popen( - "{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 6 -1 ?s?d {word_lists}/rockyou.txt " - "?1?1?1?1 {tuning} --potfile-path={hate_path}/hashcat.pot".format( - hcatBin=hcatBin, - hash_type=hcatHashType, - hash_file=hcatHashFile, - session_name=os.path.basename(hcatHashFile), - word_lists=hcatWordlists, - tuning=hcatTuning, - hate_path=hate_path), shell=True) - try: - hcatProcess.wait() - except KeyboardInterrupt: - print('Killing PID {0}...'.format(str(hcatProcess.pid))) - hcatProcess.kill() + hcatProcess = subprocess.Popen( + "{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 6 -1 ?s?d {wordlist} " + "?1?1?1?1 {tuning} --potfile-path={hate_path}/hashcat.pot".format( + hcatBin=hcatBin, + hash_type=hcatHashType, + hash_file=hcatHashFile, + session_name=os.path.basename(hcatHashFile), + wordlist=wordlist, + tuning=hcatTuning, + hate_path=hate_path), shell=True) + try: + hcatProcess.wait() + except KeyboardInterrupt: + print('Killing PID {0}...'.format(str(hcatProcess.pid))) + hcatProcess.kill() - hcatProcess = subprocess.Popen( - "{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 7 -1 ?s?d ?1?1 {word_lists}/rockyou.txt " - "{tuning} --potfile-path={hate_path}/hashcat.pot".format( - hcatBin=hcatBin, - hash_type=hcatHashType, - hash_file=hcatHashFile, - session_name=os.path.basename(hcatHashFile), - word_lists=hcatWordlists, - tuning=hcatTuning, - hate_path=hate_path), shell=True) - try: - hcatProcess.wait() - except KeyboardInterrupt: - print('Killing PID {0}...'.format(str(hcatProcess.pid))) - hcatProcess.kill() + hcatProcess = subprocess.Popen( + "{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 7 -1 ?s?d ?1?1 {wordlist} " + "{tuning} --potfile-path={hate_path}/hashcat.pot".format( + hcatBin=hcatBin, + hash_type=hcatHashType, + hash_file=hcatHashFile, + session_name=os.path.basename(hcatHashFile), + wordlist=wordlist, + tuning=hcatTuning, + hate_path=hate_path), shell=True) + try: + hcatProcess.wait() + except KeyboardInterrupt: + print('Killing PID {0}...'.format(str(hcatProcess.pid))) + hcatProcess.kill() - hcatProcess = subprocess.Popen( - "{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 7 -1 ?s?d ?1?1?1 {word_lists}/rockyou.txt " - "{tuning} --potfile-path={hate_path}/hashcat.pot".format( - hcatBin=hcatBin, - hash_type=hcatHashType, - hash_file=hcatHashFile, - session_name=os.path.basename(hcatHashFile), - word_lists=hcatWordlists, - tuning=hcatTuning, - hate_path=hate_path), shell=True) - try: - hcatProcess.wait() - except KeyboardInterrupt: - print('Killing PID {0}...'.format(str(hcatProcess.pid))) - hcatProcess.kill() + hcatProcess = subprocess.Popen( + "{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 7 -1 ?s?d ?1?1?1 {wordlist} " + "{tuning} --potfile-path={hate_path}/hashcat.pot".format( + hcatBin=hcatBin, + hash_type=hcatHashType, + hash_file=hcatHashFile, + session_name=os.path.basename(hcatHashFile), + wordlist=wordlist, + tuning=hcatTuning, + hate_path=hate_path), shell=True) + try: + hcatProcess.wait() + except KeyboardInterrupt: + print('Killing PID {0}...'.format(str(hcatProcess.pid))) + hcatProcess.kill() - hcatProcess = subprocess.Popen( - "{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 7 -1 ?s?d ?1?1?1?1 {word_lists}/rockyou.txt " - "{tuning} --potfile-path={hate_path}/hashcat.pot".format( - hcatBin=hcatBin, - hash_type=hcatHashType, - hash_file=hcatHashFile, - session_name=os.path.basename(hcatHashFile), - word_lists=hcatWordlists, - tuning=hcatTuning, - hate_path=hate_path), shell=True) - try: - hcatProcess.wait() - except KeyboardInterrupt: - print('Killing PID {0}...'.format(str(hcatProcess.pid))) - hcatProcess.kill() + hcatProcess = subprocess.Popen( + "{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 7 -1 ?s?d ?1?1?1?1 {wordlist} " + "{tuning} --potfile-path={hate_path}/hashcat.pot".format( + hcatBin=hcatBin, + hash_type=hcatHashType, + hash_file=hcatHashFile, + session_name=os.path.basename(hcatHashFile), + wordlist=wordlist, + tuning=hcatTuning, + hate_path=hate_path), shell=True) + try: + hcatProcess.wait() + except KeyboardInterrupt: + print('Killing PID {0}...'.format(str(hcatProcess.pid))) + hcatProcess.kill() - hcatHybridCount = lineCount(hcatHashFile + ".out") - hcatHashCracked + hcatHybridCount = lineCount(hcatHashFile + ".out") - hcatHashCracked # YOLO Combination Attack From f763df0109fa730e2d84e7eba90077934736c57c Mon Sep 17 00:00:00 2001 From: bandrel Date: Tue, 8 May 2018 12:09:31 -0400 Subject: [PATCH 2/9] Abstracted the wordlists and masks and put them in the configfile --- hate_crack.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hate_crack.py b/hate_crack.py index d7b6c25..2045304 100755 --- a/hate_crack.py +++ b/hate_crack.py @@ -35,6 +35,8 @@ with open(hate_path + '/config.json') as config: hcatMiddleBaseList = config_parser['hcatMiddleBaseList'] hcatThoroughCombinatorMasks = config_parser['hcatThoroughCombinatorMasks'] hcatThoroughBaseList = config_parser['hcatThoroughBaseList'] + hcatPrinceBaseList = config_parser['hcatPrinceBaseList'] + hcatGoodMeasureBaseList = config_parser['hcatGoodMeasureBaseList'] if sys.platform == 'darwin': @@ -67,6 +69,8 @@ else: #verify and convert wordlists to fully qualified paths hcatMiddleBaseList = verify_wordlist_dir(hcatWordlists, hcatMiddleBaseList) hcatThoroughBaseList = verify_wordlist_dir(hcatWordlists, hcatThoroughBaseList) +hcatPrinceBaseList = verify_wordlist_dir(hcatWordlists, hcatPrinceBaseList) +hcatGoodMeasureBaseList = verify_wordlist_dir(hcatWordlists, hcatGoodMeasureBaseList) for x in range(len(hcatDictionaryWordlist)): hcatDictionaryWordlist[x] = verify_wordlist_dir(hcatWordlists, hcatDictionaryWordlist[x]) for x in range(len(hcatHybridlist)): @@ -601,15 +605,14 @@ def hcatPrince(hcatHashType, hcatHashFile): hcatHashCracked = lineCount(hcatHashFile + ".out") hcatProcess = subprocess.Popen( "{hate_path}/princeprocessor/{prince_bin} --case-permute --elem-cnt-min=1 --elem-cnt-max=16 -c < " - "{word_lists}/rockyou.txt | {hcatBin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out " + "{hcatPrinceBaseList} | {hcatBin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out " "-r {hate_path}/princeprocessor/rules/prince_optimized.rule {tuning} --potfile-path={hate_path}/hashcat.pot".format( hcatBin=hcatBin, prince_bin=hcatPrinceBin, hash_type=hcatHashType, hash_file=hcatHashFile, session_name=os.path.basename(hcatHashFile), - word_lists=hcatWordlists, - optimized_lists=hcatOptimizedWordlists, + hcatPrinceBaseList=hcatPrinceBaseList, tuning=hcatTuning, hate_path=hate_path), shell=True) try: @@ -624,12 +627,13 @@ def hcatGoodMeasure(hcatHashType, hcatHashFile): global hcatProcess hcatProcess = subprocess.Popen( "{hcatBin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out -r {hcatPath}/rules/combinator.rule " - "-r {hcatPath}/rules/InsidePro-PasswordsPro.rule {word_lists}/rockyou.txt {tuning} " + "-r {hcatPath}/rules/InsidePro-PasswordsPro.rule {hcatGoodMeasureBaseList} {tuning} " "--potfile-path={hate_path}/hashcat.pot".format( hcatPath=hcatPath, hcatBin=hcatBin, hash_type=hcatHashType, hash_file=hcatHashFile, + hcatGoodMeasureBaseList=hcatGoodMeasureBaseList, session_name=os.path.basename(hcatHashFile), word_lists=hcatWordlists, tuning=hcatTuning, @@ -879,9 +883,6 @@ def pathwell_crack(): # PRINCE Attack def prince_attack(): - if not os.path.isfile(hcatWordlists + '/rockyou.txt'): - print("rockyou.txt not found in {0} Please verify and try again").format(hcatWordlists) - return hcatPrince(hcatHashType, hcatHashFile) From 22944505d9c8337d2d246aee22c8b6514a12b2c1 Mon Sep 17 00:00:00 2001 From: bandrel Date: Tue, 8 May 2018 12:09:48 -0400 Subject: [PATCH 3/9] Abstracted the wordlists and masks and put them in the configfile --- config.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index 40cb851..6780e5c 100644 --- a/config.json +++ b/config.json @@ -10,5 +10,7 @@ "hcatMiddleCombinatorMasks": ["2","4"," ","-","_","+",",",".","&"], "hcatMiddleBaseList": "rockyou.txt", "hcatThoroughCombinatorMasks": ["0","1","2","3","4","5","6","7","8","9"," ","-","_","+",",","!","#","$","\"","%","&","'","(",")","*",",",".","/",":",";","<","=",">","?","@","[","\\","]","^","`","{","|","}","~"], - "hcatThoroughBaseList": "rockyou.txt" + "hcatThoroughBaseList": "rockyou.txt", + "hcatGoodMeasureBaseList": "rockyou.txt", + "hcatPrinceBaseList": "rockyou.txt" } \ No newline at end of file From b0a87096666a39add834d4c2673020f7a80fbc50 Mon Sep 17 00:00:00 2001 From: bandrel Date: Tue, 8 May 2018 12:10:19 -0400 Subject: [PATCH 4/9] Changed default for quickcrack back to 1 --- hate_crack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hate_crack.py b/hate_crack.py index 2045304..d12f7c9 100755 --- a/hate_crack.py +++ b/hate_crack.py @@ -791,7 +791,7 @@ def cleanup(): # Quick Dictionary Attack with Optional Chained Best64 Rules def quick_crack(): - hcatChainsInput = int(input("\nHow many times would you like to chain the best64.rule? (0): ") or 0) + hcatChainsInput = int(input("\nHow many times would you like to chain the best64.rule? (1): ") or 1) hcatChains = '' if hcatChainsInput > 0: for n in range(1, hcatChainsInput): From 78b2b7736869294ae04c67b23496434c9aecf821 Mon Sep 17 00:00:00 2001 From: bandrel Date: Tue, 8 May 2018 12:10:53 -0400 Subject: [PATCH 5/9] Updated version number --- hate_crack.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hate_crack.py b/hate_crack.py index d12f7c9..1abebe7 100755 --- a/hate_crack.py +++ b/hate_crack.py @@ -108,8 +108,7 @@ def ascii_art(): \ Y // __ \| | \ ___/ \ \____| | \// __ \\ \___| < \___|_ /(____ /__| \___ >____\______ /|__| (____ /\___ >__|_ \ \/ \/ \/_____/ \/ \/ \/ \/ - Public Release - Version 1.04 + Version 1.05 """) From 6019b55850ccae9734e34e07433ce70a376ef5f7 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Tue, 8 May 2018 14:47:58 -0400 Subject: [PATCH 6/9] Update readme.md --- readme.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 4809d12..0befcaf 100644 --- a/readme.md +++ b/readme.md @@ -57,8 +57,7 @@ $ ./hate_crack.py 1000 \ Y // __ \| | \ ___/ \ \____| | \// __ \\ \___| < \___|_ /(____ /__| \___ >____\______ /|__| (____ /\___ >__|_ \ \/ \/ \/_____/ \/ \/ \/ \/ - Public Release - Version 1.03 + Version 1.05 (1) Quick Crack @@ -165,6 +164,13 @@ https://jeffh.net/2018/04/26/combinator_methods/ ------------------------------------------------------------------- ### Version History +Version 1.05 + Abstraction of rockyou.txt so that you can use whatever dictionary that you would like to specified in the config.json + Minor change the quickcrack that allows you to specify 0 for number of times best64 is chained + +Version 1.04 + Two new attacks Middle Combinator and Thorough Combinator + Version 1.03 Introduction of new feature to use session files for multiple concurrent sessions of hate_crack Minor bug fix From e61241042b366f7ee321172b1418715c5a91cbde Mon Sep 17 00:00:00 2001 From: bandrel Date: Wed, 9 May 2018 12:55:54 -0400 Subject: [PATCH 7/9] Moved config.json to config.json.example and included checks for missing items that fall back to default if not set in config.json --- hate_crack.py | 60 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/hate_crack.py b/hate_crack.py index 1abebe7..f5187c1 100755 --- a/hate_crack.py +++ b/hate_crack.py @@ -11,6 +11,7 @@ import random import re import json import binascii +import shutil # python2/3 compatability try: @@ -18,25 +19,72 @@ try: except NameError: pass - hate_path = os.path.dirname(os.path.realpath(__file__)) +if not os.path.isfile(hate_path + '/config.json'): + print('Initializing config.json from config.json.example') + shutil.copy(hate_path + '/config.json.example',hate_path + '/config.json') +if not os.path.isfile(sys.argv[1]): + print('{0} is not a valid file containing hashes'.format(sys.argv[1])) + quit(1) + + with open(hate_path + '/config.json') as config: config_parser = json.load(config) - hcatPath = config_parser['hcatPath'] - hcatBin = config_parser['hcatBin'] - hcatTuning = config_parser['hcatTuning'] - hcatWordlists = config_parser['hcatWordlists'] - hcatOptimizedWordlists = config_parser['hcatOptimizedWordlists'] +with open(hate_path + '/config.json.example') as defaults: + default_config = json.load(defaults) + +hcatPath = config_parser['hcatPath'] +hcatBin = config_parser['hcatBin'] +hcatTuning = config_parser['hcatTuning'] +hcatWordlists = config_parser['hcatWordlists'] +hcatOptimizedWordlists = config_parser['hcatOptimizedWordlists'] + +try: hcatDictionaryWordlist = config_parser['hcatDictionaryWordlist'] +except KeyError as e: + print('{0} is not defined in config.json using defaults from config.json.example'.format(e)) + hcatDictionaryWordlist = default_config['hcatDictionaryWordlist'] +try: hcatHybridlist = config_parser['hcatHybridlist'] +except KeyError as e: + print('{0} is not defined in config.json using defaults from config.json.example'.format(e)) + hcatHybridlist = default_config[e.args[0]] +try: hcatCombinationWordlist = config_parser['hcatCombinationWordlist'] +except KeyError as e: + print('{0} is not defined in config.json using defaults from config.json.example'.format(e)) + hcatCombinationWordlist = default_config[e.args[0]] +try: hcatMiddleCombinatorMasks = config_parser['hcatMiddleCombinatorMasks'] +except KeyError as e: + print('{0} is not defined in config.json using defaults from config.json.example'.format(e)) + hcatMiddleCombinatorMasks = default_config[e.args[0]] +try: hcatMiddleBaseList = config_parser['hcatMiddleBaseList'] +except KeyError as e: + print('{0} is not defined in config.json using defaults from config.json.example'.format(e)) + hcatMiddleBaseList = default_config[e.args[0]] +try: hcatThoroughCombinatorMasks = config_parser['hcatThoroughCombinatorMasks'] +except KeyError as e: + print('{0} is not defined in config.json using defaults from config.json.example'.format(e)) + hcatThoroughCombinatorMasks = default_config[e.args[0]] +try: hcatThoroughBaseList = config_parser['hcatThoroughBaseList'] +except KeyError as e: + print('{0} is not defined in config.json using defaults from config.json.example'.format(e)) + hcatThoroughBaseList = default_config[e.args[0]] +try: hcatPrinceBaseList = config_parser['hcatPrinceBaseList'] +except KeyError as e: + print('{0} is not defined in config.json using defaults from config.json.example'.format(e)) + hcatPrinceBaseList = default_config[e.args[0]] +try: hcatGoodMeasureBaseList = config_parser['hcatGoodMeasureBaseList'] +except KeyError as e: + print('{0} is not defined in config.json using defaults from config.json.example'.format(e)) + hcatGoodMeasureBaseList = default_config[e.args[0]] if sys.platform == 'darwin': From 84b59039b95d9cc19d4fad85bd08d1fd9eb57426 Mon Sep 17 00:00:00 2001 From: bandrel Date: Wed, 9 May 2018 12:59:57 -0400 Subject: [PATCH 8/9] Moved config.json to a non tracked file --- .gitignore | 1 + config.json | 17 ++++------------- config.json.example | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 .gitignore create mode 100644 config.json.example diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d344ba6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.json diff --git a/config.json b/config.json index 6780e5c..0d19d81 100644 --- a/config.json +++ b/config.json @@ -1,16 +1,7 @@ { - "hcatPath": "/Passwords/hashcat", - "hcatBin": "hashcat", + "hcatPath": "/Users/justinbollinger/PycharmProjects/hashcat", + "hcatBin": "/usr/local/bin/hashcat", "hcatTuning": "--force", "hcatWordlists": "/Passwords/wordlists", - "hcatOptimizedWordlists": "/Passwords/optimized_wordlists", - "hcatDictionaryWordlist": ["rockyou.txt"], - "hcatCombinationWordlist": ["rockyou.txt","rockyou.txt"], - "hcatHybridlist": ["rockyou.txt"], - "hcatMiddleCombinatorMasks": ["2","4"," ","-","_","+",",",".","&"], - "hcatMiddleBaseList": "rockyou.txt", - "hcatThoroughCombinatorMasks": ["0","1","2","3","4","5","6","7","8","9"," ","-","_","+",",","!","#","$","\"","%","&","'","(",")","*",",",".","/",":",";","<","=",">","?","@","[","\\","]","^","`","{","|","}","~"], - "hcatThoroughBaseList": "rockyou.txt", - "hcatGoodMeasureBaseList": "rockyou.txt", - "hcatPrinceBaseList": "rockyou.txt" -} \ No newline at end of file + "hcatOptimizedWordlists": "/Passwords/optimized_wordlists" +} diff --git a/config.json.example b/config.json.example new file mode 100644 index 0000000..6780e5c --- /dev/null +++ b/config.json.example @@ -0,0 +1,16 @@ +{ + "hcatPath": "/Passwords/hashcat", + "hcatBin": "hashcat", + "hcatTuning": "--force", + "hcatWordlists": "/Passwords/wordlists", + "hcatOptimizedWordlists": "/Passwords/optimized_wordlists", + "hcatDictionaryWordlist": ["rockyou.txt"], + "hcatCombinationWordlist": ["rockyou.txt","rockyou.txt"], + "hcatHybridlist": ["rockyou.txt"], + "hcatMiddleCombinatorMasks": ["2","4"," ","-","_","+",",",".","&"], + "hcatMiddleBaseList": "rockyou.txt", + "hcatThoroughCombinatorMasks": ["0","1","2","3","4","5","6","7","8","9"," ","-","_","+",",","!","#","$","\"","%","&","'","(",")","*",",",".","/",":",";","<","=",">","?","@","[","\\","]","^","`","{","|","}","~"], + "hcatThoroughBaseList": "rockyou.txt", + "hcatGoodMeasureBaseList": "rockyou.txt", + "hcatPrinceBaseList": "rockyou.txt" +} \ No newline at end of file From 196f695762ad9774b0f90ff5024839fdfe67c305 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Wed, 9 May 2018 13:17:56 -0400 Subject: [PATCH 9/9] Delete config.json --- config.json | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 config.json diff --git a/config.json b/config.json deleted file mode 100644 index 0d19d81..0000000 --- a/config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "hcatPath": "/Users/justinbollinger/PycharmProjects/hashcat", - "hcatBin": "/usr/local/bin/hashcat", - "hcatTuning": "--force", - "hcatWordlists": "/Passwords/wordlists", - "hcatOptimizedWordlists": "/Passwords/optimized_wordlists" -}