Merge remote-tracking branch 'remotes/origin/master' into local_fork

This commit is contained in:
bandrel
2018-05-07 14:25:03 -04:00
4 changed files with 57 additions and 32 deletions
+1 -5
View File
@@ -3,9 +3,5 @@
"hcatBin": "hashcat",
"hcatTuning": "--force",
"hcatWordlists": "/Passwords/wordlists",
"hcatOptimizedWordlists": "/Passwords/optimized_wordlists",
"_comment": "Change extension to .bin for Linux and .app for OSX",
"hcatExpanderBin": "expander.app",
"hcatCombinatorBin": "combinator.app",
"hcatPrinceBin": "pp64.app"
"hcatOptimizedWordlists": "/Passwords/optimized_wordlists"
}
+42 -21
View File
@@ -30,9 +30,16 @@ with open(hate_path + '/config.json') as config:
hcatTuning = config_parser['hcatTuning']
hcatWordlists = config_parser['hcatWordlists']
hcatOptimizedWordlists = config_parser['hcatOptimizedWordlists']
hcatExpanderBin = config_parser['hcatExpanderBin']
hcatCombinatorBin = config_parser['hcatCombinatorBin']
hcatPrinceBin = config_parser['hcatPrinceBin']
if sys.platform == 'darwin':
hcatExpanderBin = "expander.app"
hcatCombinatorBin = "combinator.app"
hcatPrinceBin = "pp64.app"
else:
hcatExpanderBin = "expander.bin"
hcatCombinatorBin = "combinator.bin"
hcatPrinceBin = "pp64.bin"
# hashcat biniary checks for systems that install hashcat binary in different location than the rest of the hashcat files
if os.path.isfile(hcatBin):
@@ -40,7 +47,7 @@ if os.path.isfile(hcatBin):
elif os.path.isfile(hcatPath.rstrip('/') + '/' + hcatBin):
hcatBin = hcatPath.rstrip('/') + '/' + hcatBin
else:
print('Invalid path for hashcat biniary. Please check configuration and try again.')
print('Invalid path for hashcat binary. Please check configuration and try again.')
quit(1)
hcatHashCount = 0
@@ -73,7 +80,7 @@ def ascii_art():
\___|_ /(____ /__| \___ >____\______ /|__| (____ /\___ >__|_ \
\/ \/ \/_____/ \/ \/ \/ \/
Public Release
Version 1.01
Version 1.04
""")
@@ -93,11 +100,12 @@ def hcatBruteForce(hcatHashType, hcatHashFile, hcatMinLen, hcatMaxLen):
global hcatBruteCount
global hcatProcess
hcatProcess = subprocess.Popen(
"{hcbin} -m {hash_type} {hash_file} --remove -o {hash_file}.out --increment --increment-min={min} "
"{hcbin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out --increment --increment-min={min} "
"--increment-max={max} -a 3 ?a?a?a?a?a?a?a?a?a?a?a?a?a?a {tuning} --potfile-path={hate_path}/hashcat.pot".format(
hcbin=hcatBin,
hash_type=hcatHashType,
hash_file=hcatHashFile,
session_name=os.path.basename(hcatHashFile),
min=hcatMinLen,
max=hcatMaxLen,
tuning=hcatTuning,
@@ -110,18 +118,19 @@ def hcatDictionary(hcatHashType, hcatHashFile):
global hcatDictionaryCount
global hcatProcess
hcatProcess = subprocess.Popen(
"{hcatPath} -m {hcatHashType} {hash_file} --remove -o {hash_file}.out {optimized_wordlists}/* "
"{hcatBin} -m {hcatHashType} {hash_file} --session {session_name} --remove -o {hash_file}.out {optimized_wordlists}/* "
"-r {hcatPath}/rules/best64.rule {tuning} --potfile-path={hate_path}/hashcat.pot".format(
hcatPath=hcatPath,
hcatBin=hcatBin,
hcatHashType=hcatHashType,
hash_file=hcatHashFile,
session_name=os.path.basename(hcatHashFile),
optimized_wordlists=hcatOptimizedWordlists,
tuning=hcatTuning,
hate_path=hate_path), shell=True).wait()
hcatProcess = subprocess.Popen(
"{hcatBin} -m {hcatHashType} {hash_file} --remove -o {hash_file}.out {hcatWordlists}/rockyou.txt "
"{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,
@@ -132,12 +141,13 @@ def hcatDictionary(hcatHashType, hcatHashFile):
hate_path=hate_path), shell=True).wait()
hcatProcess = subprocess.Popen(
"{hcatBin} -m {hcatHashType} {hash_file} --remove -o {hash_file}.out {hcatWordlists}/rockyou.txt "
"{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).wait()
@@ -148,11 +158,12 @@ def hcatDictionary(hcatHashType, hcatHashFile):
def hcatQuickDictionary(hcatHashType, hcatHashFile, hcatChains):
global hcatProcess
hcatProcess = subprocess.Popen(
"{hcatBin} -m {hcatHashType} {hash_file} --remove -o {hash_file}.out {optimized_wordlists}/* {chains} "
"{tuning} --potfile-path={hate_path}/hashcat.pot".format(
"{hcatBin} -m {hcatHashType} {hash_file} --session {session_name} --remove -o {hash_file}.out "
"{optimized_wordlists}/* {chains} {tuning} --potfile-path={hate_path}/hashcat.pot".format(
hcatBin=hcatBin,
hcatHashType=hcatHashType,
hash_file=hcatHashFile,
session_name=os.path.basename(hcatHashFile),
optimized_wordlists=hcatOptimizedWordlists,
chains=hcatChains,
tuning=hcatTuning,
@@ -177,11 +188,12 @@ def hcatTopMask(hcatHashType, hcatHashFile, hcatTargetTime):
target_time=hcatTargetTime,
hate_path=hate_path), shell=True).wait()
hcatProcess = subprocess.Popen(
"{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 3 {hash_file}.hcmask {tuning} "
"{hcatBin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out -a 3 {hash_file}.hcmask {tuning} "
"--potfile-path={hate_path}/hashcat.pot".format(
hcatBin=hcatBin,
hash_type=hcatHashType,
hash_file=hcatHashFile,
session_name=os.path.basename(hcatHashFile),
tuning=hcatTuning,
hate_path=hate_path), shell=True).wait()
hcatMaskCount = lineCount(hcatHashFile + ".out") - hcatHashCracked
@@ -203,11 +215,12 @@ def hcatFingerprint(hcatHashType, hcatHashFile):
hash_file=hcatHashFile,
hate_path=hate_path), shell=True).wait()
hcatProcess = subprocess.Popen(
"{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 1 {hash_file}.expanded "
"{hcatBin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out -a 1 {hash_file}.expanded "
"{hash_file}.expanded {tuning} --potfile-path={hate_path}/hashcat.pot".format(
hcatBin=hcatBin,
hash_type=hcatHashType,
hash_file=hcatHashFile,
session_name=os.path.basename(hcatHashFile),
tuning=hcatTuning,
hate_path=hate_path), shell=True).wait()
crackedAfter = lineCount(hcatHashFile + ".out")
@@ -219,11 +232,12 @@ def hcatCombination(hcatHashType, hcatHashFile):
global hcatCombinationCount
global hcatProcess
hcatProcess = subprocess.Popen(
"{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 1 {word_lists}/rockyou.txt "
"{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=hcatBin,
hash_type=hcatHashType,
hash_file=hcatHashFile,
session_name=os.path.basename(hcatHashFile),
word_lists=hcatWordlists,
tuning=hcatTuning,
hate_path=hate_path),
@@ -299,11 +313,12 @@ def hcatYoloCombination(hcatHashType, hcatHashFile):
hcatLeft = random.choice(os.listdir(hcatOptimizedWordlists))
hcatRight = random.choice(os.listdir(hcatOptimizedWordlists))
hcatProcess = subprocess.Popen(
"{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 1 {optimized_lists}/{left} "
"{hcatBin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out -a 1 {optimized_lists}/{left} "
"{optimized_lists}/{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,
optimized_lists=hcatOptimizedWordlists,
tuning=hcatTuning,
@@ -394,11 +409,12 @@ def hcatThoroughCombinator(hcatHashType, hcatHashFile):
def hcatPathwellBruteForce(hcatHashType, hcatHashFile):
global hcatProcess
hcatProcess = subprocess.Popen(
"{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -a 3 {hate_path}/masks/pathwell.hcmask "
"{hcatBin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out -a 3 {hate_path}/masks/pathwell.hcmask "
"{tuning} --potfile-path={hate_path}/hashcat.pot".format(
hcatBin=hcatBin,
hash_type=hcatHashType,
hash_file=hcatHashFile,
session_name=os.path.basename(hcatHashFile),
tuning=hcatTuning,
hate_path=hate_path), shell=True).wait()
@@ -409,12 +425,13 @@ 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} --remove -o {hash_file}.out "
"{word_lists}/rockyou.txt | {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,
tuning=hcatTuning,
@@ -426,13 +443,14 @@ def hcatGoodMeasure(hcatHashType, hcatHashFile):
global hcatExtraCount
global hcatProcess
hcatProcess = subprocess.Popen(
"{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out -r {hcatPath}/rules/combinator.rule "
"{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} "
"--potfile-path={hate_path}/hashcat.pot".format(
hcatPath=hcatPath,
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).wait()
@@ -448,10 +466,11 @@ def hcatLMtoNT():
hash_file=hcatHashFile,
hate_path=hate_path), shell=True).wait()
hcatProcess = subprocess.Popen(
"{hcatBin} -m 3000 {hash_file}.lm --remove -o {hash_file}.lm.cracked -1 ?u?d?s --increment -a 3 ?1?1?1?1?1?1?1 "
"{hcatBin} -m 3000 {hash_file}.lm --session {session_name} --remove -o {hash_file}.lm.cracked -1 ?u?d?s --increment -a 3 ?1?1?1?1?1?1?1 "
"{tuning} --potfile-path={hate_path}/hashcat.pot".format(
hcatBin=hcatBin,
hash_file=hcatHashFile,
session_name=os.path.basename(hcatHashFile),
tuning=hcatTuning,
hate_path=hate_path), shell=True).wait()
hcatProcess = subprocess.Popen("cat {hash_file}.lm.cracked | cut -d : -f 2 > {hash_file}.working".format(
@@ -472,10 +491,11 @@ def hcatLMtoNT():
tuning=hcatTuning,
hate_path=hate_path), shell=True).wait()
hcatProcess = subprocess.Popen(
"{hcatBin} -m 1000 {hash_file}.nt --remove -o {hash_file}.nt.out {hash_file}.combined "
"{hcatBin} -m 1000 {hash_file}.nt --session {session_name} --remove -o {hash_file}.nt.out {hash_file}.combined "
"-r {hate_path}/rules/toggles-lm-ntlm.rule {tuning} --potfile-path={hate_path}/hashcat.pot".format(
hcatBin=hcatBin,
hash_file=hcatHashFile,
session_name=os.path.basename(hcatHashFile),
tuning=hcatTuning,
hate_path=hate_path), shell=True).wait()
# toggle-lm-ntlm.rule by Didier Stevens https://blog.didierstevens.com/2016/07/16/tool-to-generate-hashcat-toggle-rules/
@@ -495,11 +515,12 @@ def hcatRecycle(hcatHashType, hcatHashFile, hcatNewPasswords):
f.write("\n".join(converted))
hcatProcess = subprocess.Popen(
"{hcatBin} -m {hash_type} {hash_file} --remove -o {hash_file}.out {hash_file}.working "
"{hcatBin} -m {hash_type} {hash_file} --session {session_name} --remove -o {hash_file}.out {hash_file}.working "
"-r {hcatPath}/rules/d3ad0ne.rule {tuning} --potfile-path={hate_path}/hashcat.pot".format(
hcatBin=hcatBin,
hash_type=hcatHashType,
hash_file=hcatHashFile,
session_name=os.path.basename(hcatHashFile),
hcatPath=hcatPath,
tuning=hcatTuning,
hate_path=hate_path), shell=True).wait()
+5 -1
View File
@@ -58,7 +58,7 @@ $ ./hate_crack.py <hash file> 1000
\___|_ /(____ /__| \___ >____\______ /|__| (____ /\___ >__|_ \
\/ \/ \/_____/ \/ \/ \/ \/
Public Release
Version 1.02
Version 1.03
(1) Quick Crack
@@ -165,6 +165,10 @@ https://jeffh.net/2018/04/26/combinator_methods/
-------------------------------------------------------------------
### Version History
Version 1.03
Introduction of new feature to use session files for multiple concurrent sessions of hate_crack
Minor bug fix
Version 1.02
Introduction of new feature to export the output of pwdump formated NTDS outputs to excel with clear-text passwords
+9 -5
View File
@@ -5,9 +5,6 @@ import os
import subprocess
import shutil
splitlen_bin = "hashcat-utils/bin/splitlen.app"
rli_bin = "hashcat-utils/bin/rli.app"
# Help
def usage():
print("usage: python %s <input file list> <output directory>" % sys.argv[0])
@@ -32,8 +29,15 @@ def main():
except IndexError:
usage()
sys.exit()
# Get list of wordlists from <input file list> argument
if sys.platform == 'darwin':
splitlen_bin = "hashcat-utils/bin/splitlen.app"
rli_bin = "hashcat-utils/bin/rli.app"
else:
splitlen_bin = "hashcat-utils/bin/splitlen.bin"
rli_bin = "hashcat-utils/bin/rli.bin"
# Get list of wordlists from <input file list> argument
for wordlist in input_list:
print(wordlist.strip())