From 0a127ccbbcbc5bdc27552b064d78db4c44e36ad5 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Thu, 30 Jul 2020 18:24:46 -0400 Subject: [PATCH 1/5] Added new attack that takes a company name from input and appends six random characters and toggles the first letter. --- hate_crack.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/hate_crack.py b/hate_crack.py index 49aa6b6..9a541ca 100755 --- a/hate_crack.py +++ b/hate_crack.py @@ -526,6 +526,34 @@ def hcatYoloCombination(hcatHashType, hcatHashFile): print('Killing PID {0}...'.format(str(hcatProcess.pid))) hcatProcess.kill() +# Company Name plus +def hcatCnameplus(hcatHashType, hcatHashFile): + global hcatProcess + while True: + company_name = input('What is the company name? ') + if company_name: + break + mask1 = '-1={0}{1}'.format(company_name[0].lower(),company_name[0].upper()) + mask2 = ' ?1{0}'.format(company_name[1:]) + for x in range(6): + mask2 += '?a' + hcatProcess = subprocess.Popen( + "{hcatBin} -m {hash_type} -a 3 --session {session_name} -o {hash_file}.out " + "{tuning} --potfile-path={hate_path}/hashcat.pot -i {hcmask1} {hash_file} {hcmask2}".format( + hcatBin=hcatBin, + hash_type=hcatHashType, + hash_file=hcatHashFile, + session_name=os.path.basename(hcatHashFile), + tuning=hcatTuning, + hcmask1=mask1, + hcmask2=mask2, + hate_path=hate_path), shell=True) + try: + hcatProcess.wait() + except KeyboardInterrupt: + print('Killing PID {0}...'.format(str(hcatProcess.pid))) + hcatProcess.kill() + # Middle fast Combinator Attack def hcatMiddleCombinator(hcatHashType, hcatHashFile): global hcatProcess @@ -1027,6 +1055,12 @@ def thorough_combinator(): def middle_combinator(): hcatMiddleCombinator(hcatHashType, hcatHashFile) +# Company Name +def cname_plus(): + hcatCnameplus(hcatHashType, hcatHashFile) + + + # convert hex words for recycling def convert_hex(working_file): processed_words = [] @@ -1228,6 +1262,7 @@ def main(): print("\t(10) YOLO Combinator Attack") print("\t(11) Middle Combinator Attack") print("\t(12) Thorough Combinator Attack") + print("\t(13) Company Name plus") print("\n\t(95) Analyze hashes with Pipal") print("\t(96) Export Output to Excel Format") print("\t(97) Display Cracked Hashes") @@ -1245,6 +1280,7 @@ def main(): "10": yolo_combination, "11": middle_combinator, "12": thorough_combinator, + "13": cname_plus, "95": pipal, "96": export_excel, "97": show_results, From c8770515eb6ec9728d79a29d09b6e4d4473ede49 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Thu, 30 Jul 2020 20:28:30 -0400 Subject: [PATCH 2/5] added ability to put multiple company names --- hate_crack.py | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/hate_crack.py b/hate_crack.py index 9a541ca..dd5aad7 100755 --- a/hate_crack.py +++ b/hate_crack.py @@ -530,29 +530,30 @@ def hcatYoloCombination(hcatHashType, hcatHashFile): def hcatCnameplus(hcatHashType, hcatHashFile): global hcatProcess while True: - company_name = input('What is the company name? ') + company_name = input('What is the company name (Enter multiples comma separated)? ') if company_name: break - mask1 = '-1={0}{1}'.format(company_name[0].lower(),company_name[0].upper()) - mask2 = ' ?1{0}'.format(company_name[1:]) - for x in range(6): - mask2 += '?a' - hcatProcess = subprocess.Popen( - "{hcatBin} -m {hash_type} -a 3 --session {session_name} -o {hash_file}.out " - "{tuning} --potfile-path={hate_path}/hashcat.pot -i {hcmask1} {hash_file} {hcmask2}".format( - hcatBin=hcatBin, - hash_type=hcatHashType, - hash_file=hcatHashFile, - session_name=os.path.basename(hcatHashFile), - tuning=hcatTuning, - hcmask1=mask1, - hcmask2=mask2, - hate_path=hate_path), shell=True) - try: - hcatProcess.wait() - except KeyboardInterrupt: - print('Killing PID {0}...'.format(str(hcatProcess.pid))) - hcatProcess.kill() + for name in company_name.split(','): + mask1 = '-1={0}{1}'.format(name[0].lower(),name[0].upper()) + mask2 = ' ?1{0}'.format(name[1:]) + for x in range(6): + mask2 += '?a' + hcatProcess = subprocess.Popen( + "{hcatBin} -m {hash_type} -a 3 --session {session_name} -o {hash_file}.out " + "{tuning} --potfile-path={hate_path}/hashcat.pot -i {hcmask1} {hash_file} {hcmask2}".format( + hcatBin=hcatBin, + hash_type=hcatHashType, + hash_file=hcatHashFile, + session_name=os.path.basename(hcatHashFile), + tuning=hcatTuning, + hcmask1=mask1, + hcmask2=mask2, + hate_path=hate_path), shell=True) + try: + hcatProcess.wait() + except KeyboardInterrupt: + print('Killing PID {0}...'.format(str(hcatProcess.pid))) + hcatProcess.kill() # Middle fast Combinator Attack def hcatMiddleCombinator(hcatHashType, hcatHashFile): @@ -868,8 +869,9 @@ def combine_ntlm_output(): for crackedLine in hcatCrackedFile: with open(hcatHashFileOrig, "r") as hcatOrigFile: for origLine in hcatOrigFile: - if crackedLine.split(":")[0] == origLine.split(":")[3]: - hcatCombinedHashes.write(origLine.strip() + crackedLine.split(":")[1]) + if len(origLine.split(':')) == 7: + if crackedLine.split(":")[0] == origLine.split(":")[3]: + hcatCombinedHashes.write(origLine.strip() + crackedLine.split(":")[1]) # Cleanup Temp Files def cleanup(): From 6fa14b48739d8c9ac9bde62ac12f005dceddfc9a Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Fri, 31 Jul 2020 12:30:58 -0400 Subject: [PATCH 3/5] Changed company name to bandrel methodology. Added a max runtime component --- config.json.example | 4 +++- hate_crack.py | 24 +++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/config.json.example b/config.json.example index 274ff05..74b8631 100644 --- a/config.json.example +++ b/config.json.example @@ -14,5 +14,7 @@ "hcatGoodMeasureBaseList": "rockyou.txt", "hcatRules": ["best64.rule","d3ad0ne.rule", "T0XlC.rule", "dive.rule"], "hcatPrinceBaseList": "rockyou.txt", - "pipalPath": "/path/to/pipal" + "pipalPath": "/path/to/pipal", + "bandrelmaxruntime": "300", + "bandrel_common_basedwords": "welcome,password,letmein,summer,winter,spring,fall,autumn,monday,tuesday,wednesday,thursday,friday,satruday,sunday,january,february,march,april,may,june,july,august,september,october,november,december,christmas,covid19" } \ No newline at end of file diff --git a/hate_crack.py b/hate_crack.py index dd5aad7..7f07e36 100755 --- a/hate_crack.py +++ b/hate_crack.py @@ -36,6 +36,12 @@ hcatTuning = config_parser['hcatTuning'] hcatWordlists = config_parser['hcatWordlists'] hcatOptimizedWordlists = config_parser['hcatOptimizedWordlists'] +try: + maxruntime = config_parser['bandrelmaxruntime'] +except KeyError as e: + print('{0} is not defined in config.json using defaults from config.json.example'.format(e)) + maxruntime = default_config['bandrelmaxruntime'] + try: pipalPath = config_parser['pipalPath'] except KeyError as e: @@ -526,8 +532,8 @@ def hcatYoloCombination(hcatHashType, hcatHashFile): print('Killing PID {0}...'.format(str(hcatProcess.pid))) hcatProcess.kill() -# Company Name plus -def hcatCnameplus(hcatHashType, hcatHashFile): +# Bandrel methodlogy +def hcatBandrel(hcatHashType, hcatHashFile): global hcatProcess while True: company_name = input('What is the company name (Enter multiples comma separated)? ') @@ -540,7 +546,7 @@ def hcatCnameplus(hcatHashType, hcatHashFile): mask2 += '?a' hcatProcess = subprocess.Popen( "{hcatBin} -m {hash_type} -a 3 --session {session_name} -o {hash_file}.out " - "{tuning} --potfile-path={hate_path}/hashcat.pot -i {hcmask1} {hash_file} {hcmask2}".format( + "{tuning} --potfile-path={hate_path}/hashcat.pot --runtime {maxruntime} -i {hcmask1} {hash_file} {hcmask2}".format( hcatBin=hcatBin, hash_type=hcatHashType, hash_file=hcatHashFile, @@ -548,6 +554,7 @@ def hcatCnameplus(hcatHashType, hcatHashFile): tuning=hcatTuning, hcmask1=mask1, hcmask2=mask2, + maxruntime=maxruntime, hate_path=hate_path), shell=True) try: hcatProcess.wait() @@ -1057,10 +1064,9 @@ def thorough_combinator(): def middle_combinator(): hcatMiddleCombinator(hcatHashType, hcatHashFile) -# Company Name -def cname_plus(): - hcatCnameplus(hcatHashType, hcatHashFile) - +# Bandrel Methodology +def bandrel_method(): + hcatBandrel(hcatHashType, hcatHashFile) # convert hex words for recycling @@ -1264,7 +1270,7 @@ def main(): print("\t(10) YOLO Combinator Attack") print("\t(11) Middle Combinator Attack") print("\t(12) Thorough Combinator Attack") - print("\t(13) Company Name plus") + print("\t(13) Bandrel Methodology") print("\n\t(95) Analyze hashes with Pipal") print("\t(96) Export Output to Excel Format") print("\t(97) Display Cracked Hashes") @@ -1282,7 +1288,7 @@ def main(): "10": yolo_combination, "11": middle_combinator, "12": thorough_combinator, - "13": cname_plus, + "13": bandrel_method, "95": pipal, "96": export_excel, "97": show_results, From 0723aaf7ac2852d48117e66369a7a720dda29c5c Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Fri, 31 Jul 2020 12:58:07 -0400 Subject: [PATCH 4/5] Added a common baseword component --- hate_crack.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hate_crack.py b/hate_crack.py index 7f07e36..045fe6a 100755 --- a/hate_crack.py +++ b/hate_crack.py @@ -42,6 +42,12 @@ except KeyError as e: print('{0} is not defined in config.json using defaults from config.json.example'.format(e)) maxruntime = default_config['bandrelmaxruntime'] +try: + bandrelbasewords = config_parser['bandrel_common_basedwords'] +except KeyError as e: + print('{0} is not defined in config.json using defaults from config.json.example'.format(e)) + bandrelbasewords = default_config['bandrel_common_basedwords'] + try: pipalPath = config_parser['pipalPath'] except KeyError as e: @@ -535,11 +541,16 @@ def hcatYoloCombination(hcatHashType, hcatHashFile): # Bandrel methodlogy def hcatBandrel(hcatHashType, hcatHashFile): global hcatProcess + basewords = [] while True: company_name = input('What is the company name (Enter multiples comma separated)? ') if company_name: break for name in company_name.split(','): + basewords.append(name) + for word in bandrelbasewords.split(','): + basewords.append(word) + for name in basewords: mask1 = '-1={0}{1}'.format(name[0].lower(),name[0].upper()) mask2 = ' ?1{0}'.format(name[1:]) for x in range(6): From 7fc4defd6e4a8bd72b9be07f8e6ff2b2bc3e7ba4 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Mon, 3 Aug 2020 17:30:02 -0400 Subject: [PATCH 5/5] additional common basewords and spelling correction --- config.json.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json.example b/config.json.example index 74b8631..92a7f30 100644 --- a/config.json.example +++ b/config.json.example @@ -16,5 +16,5 @@ "hcatPrinceBaseList": "rockyou.txt", "pipalPath": "/path/to/pipal", "bandrelmaxruntime": "300", - "bandrel_common_basedwords": "welcome,password,letmein,summer,winter,spring,fall,autumn,monday,tuesday,wednesday,thursday,friday,satruday,sunday,january,february,march,april,may,june,july,august,september,october,november,december,christmas,covid19" + "bandrel_common_basedwords": "welcome,password,changeme,letmein,summer,winter,spring,springtime,fall,autumn,monday,tuesday,wednesday,thursday,friday,saturday,sunday,january,february,march,april,may,june,july,august,september,october,november,december,christmas,easter,covid19" } \ No newline at end of file