From d1e76b813b816394e9a6893edfffaae092f82603 Mon Sep 17 00:00:00 2001 From: Thomas Underhay Date: Sat, 10 Feb 2018 15:02:27 +0200 Subject: [PATCH 1/5] Add files via upload --- crackapd/crackapd.py | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/crackapd/crackapd.py b/crackapd/crackapd.py index 1ef992a..564edc0 100755 --- a/crackapd/crackapd.py +++ b/crackapd/crackapd.py @@ -193,14 +193,37 @@ def run(self): # We'll now enter the main loop. We check to see whether the runfile exists. # if it does, we continue processing. # If it does not, we exit and put None in the queues... - while(os.path.isfile(RUNFILE)): + # Open tow files(hashcat_hashes.txt / John_hashes.txt) to write the hashes to. + fh_hashcat_hashes = open("/tmp/Hashcat_hashes.txt", "a", 1) + fh_john_hashes = open("/tmp/John_hashes.txt", "a", 1) + + while(os.path.isfile(RUNFILE)): if INPUTNODE == None: break s = INPUTNODE.readline() if str(s) != "": s = str(s).replace("\r", "").replace("\n", "") PrintResult(VERBOSE, "MANA - CrackApd - ITEM ADDED TO QUEUE " + str(s)) - WRKQUEUE.put(s) + + # Thomas edit + print(str(s)) + + (a,b,c,d) = str(s).split("|") + hash_name = str(b) + hash_part1 = str(c).replace(":", "") + hash_part2 = str(d).replace(":", "") + + # hashcat + hashcat_hash = hash_name + ":" * 4 + hash_part2 + ":" * 1 + hash_part1 + fh_hashcat_hashes.write(hashcat_hash + "\n") + # John + john_hash = hash_name + ":" * 1 + "$NETNTLM$" + hash_part1 + "$" + hash_part2 + ":" * 7 + fh_john_hashes.write(john_hash + "\n") + print("Hashcat hash is: " + str(hashcat_hash)) + print + print("John hash is: " + str(john_hash)) + + WRKQUEUE.put(s) # If we reach this, the runfile has been removed. We exit. PrintResult(VERBOSE, "MANA - CrackApd - Run file has been removed. We're exiting now...") @@ -211,3 +234,7 @@ def run(self): for i in range(THREADS): PrintResult(VERBOSE, "MANA - CrackApd - Clearing Threads") WRKQUEUE.put(None) + + # Close hash files + fh_hashcat_hashes.close + fh_john_hashes.close From 5b41e892c94ebb7552c8c03b7ca017cf292fafc4 Mon Sep 17 00:00:00 2001 From: Thomas Underhay Date: Sat, 10 Feb 2018 15:05:15 +0200 Subject: [PATCH 2/5] Add files via upload --- run-mana/mana_wrapper.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 run-mana/mana_wrapper.py diff --git a/run-mana/mana_wrapper.py b/run-mana/mana_wrapper.py new file mode 100644 index 0000000..2e82b05 --- /dev/null +++ b/run-mana/mana_wrapper.py @@ -0,0 +1,36 @@ +#!/usr/bin/python2 + +import argparse +import sys +import os + + +parser = argparse.ArgumentParser( + description='Mana script wrapper', + epilog='*** Making Mana great again! ***', + formatter_class=argparse.RawTextHelpFormatter) +group = parser.add_mutually_exclusive_group(required=True) +group.add_argument("-snf", action='store_true', help="Will fire up MANA in NAT mode (you'll need an upstream link) with all the MitM bells and whistles") +group.add_argument("-sns", action='store_true', help="Will fire up MANA in NAT mode, but without any of the firelamb, sslstrip, sslsplit etc") +group.add_argument("-snos", action='store_true', help="Will start MANA in a 'fake Internet' mode. Useful for places where people leave their\n" + + "wifi on, but there is no upstream Internet. Also containsthe captive portal.") +group.add_argument("-snoseap", action='store_true', help="Will start MANA with the EAP attack and noupstream mode") +#parser.add_argument("hash_file", help="File containing NTLM hashes", type=str) +#parser.add_argument("working_directory", help="Directory where files will be written to.") +#parser.add_argument("-l", "--level", type=int, choices=[0, 1, 2],default=0, help="0-> Default" + '\n' + "1-> GPU Cracking" + '\n' + "2-> Mask Cracking") +#parser.add_argument("-l", "--level", type=int, choices=[0, 1, 2], help="0-> Default" + '\n' + "1-> Default + GPU Cracking" + '\n' + "2-> Default + GPU Cracking + Mask Cracking") + +args = parser.parse_args() + +#quick_Cracking = False +#gpu_Cracking = False +#mask_Cracking = False + +if args.snf: + os.system("bash start-nat-full.sh") +elif args.sns: + os.system("bash start-nat-simple.sh") +elif args.snos: + os.system("bash start-noupstream.sh") +elif args.snoseap: + os.system("bash start-noupstream-eap.sh") From cf33b1c30f39da62ad700e5fced1f608843f00e2 Mon Sep 17 00:00:00 2001 From: Thomas Underhay Date: Sat, 10 Feb 2018 15:12:48 +0200 Subject: [PATCH 3/5] Add files via upload --- mana_wrapper.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 mana_wrapper.py diff --git a/mana_wrapper.py b/mana_wrapper.py new file mode 100644 index 0000000..91ae4e7 --- /dev/null +++ b/mana_wrapper.py @@ -0,0 +1,36 @@ +#!/usr/bin/python2 + +import argparse +import sys +import os + + +parser = argparse.ArgumentParser( + description='Mana script wrapper', + epilog='*** Making Mana great again! ***', + formatter_class=argparse.RawTextHelpFormatter) +group = parser.add_mutually_exclusive_group(required=True) +group.add_argument("-snf", action='store_true', help="Will fire up MANA in NAT mode (you'll need an upstream link) with all the MitM bells and whistles") +group.add_argument("-sns", action='store_true', help="Will fire up MANA in NAT mode, but without any of the firelamb, sslstrip, sslsplit etc") +group.add_argument("-snos", action='store_true', help="Will start MANA in a 'fake Internet' mode. Useful for places where people leave their\n" + + "wifi on, but there is no upstream Internet. Also containsthe captive portal.") +group.add_argument("-snoseap", action='store_true', help="Will start MANA with the EAP attack and noupstream mode") +#parser.add_argument("hash_file", help="File containing NTLM hashes", type=str) +#parser.add_argument("working_directory", help="Directory where files will be written to.") +#parser.add_argument("-l", "--level", type=int, choices=[0, 1, 2],default=0, help="0-> Default" + '\n' + "1-> GPU Cracking" + '\n' + "2-> Mask Cracking") +#parser.add_argument("-l", "--level", type=int, choices=[0, 1, 2], help="0-> Default" + '\n' + "1-> Default + GPU Cracking" + '\n' + "2-> Default + GPU Cracking + Mask Cracking") + +args = parser.parse_args() + +#quick_Cracking = False +#gpu_Cracking = False +#mask_Cracking = False + +if args.snf: + os.system("bash start-nat-full.sh") +elif args.sns: + os.system("bash start-nat-simple.sh") +elif args.snos: + os.system("bash start-noupstream.sh") +elif args.snoseap: + os.system("bash start-noupstream-eaponly.sh") From d4173e0ee2d7735d65099bb338af2518fd570032 Mon Sep 17 00:00:00 2001 From: Thomas Underhay Date: Sat, 10 Feb 2018 15:16:38 +0200 Subject: [PATCH 4/5] Changes to mana_wrapper --- run-mana/mana_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-mana/mana_wrapper.py b/run-mana/mana_wrapper.py index 2e82b05..91ae4e7 100644 --- a/run-mana/mana_wrapper.py +++ b/run-mana/mana_wrapper.py @@ -33,4 +33,4 @@ elif args.snos: os.system("bash start-noupstream.sh") elif args.snoseap: - os.system("bash start-noupstream-eap.sh") + os.system("bash start-noupstream-eaponly.sh") From a401b124fde6dec3f1c99ef105a900d0e1bc89f9 Mon Sep 17 00:00:00 2001 From: Thomas Underhay Date: Sat, 10 Feb 2018 15:21:12 +0200 Subject: [PATCH 5/5] Delete mana_wrapper.py --- mana_wrapper.py | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 mana_wrapper.py diff --git a/mana_wrapper.py b/mana_wrapper.py deleted file mode 100644 index 91ae4e7..0000000 --- a/mana_wrapper.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/python2 - -import argparse -import sys -import os - - -parser = argparse.ArgumentParser( - description='Mana script wrapper', - epilog='*** Making Mana great again! ***', - formatter_class=argparse.RawTextHelpFormatter) -group = parser.add_mutually_exclusive_group(required=True) -group.add_argument("-snf", action='store_true', help="Will fire up MANA in NAT mode (you'll need an upstream link) with all the MitM bells and whistles") -group.add_argument("-sns", action='store_true', help="Will fire up MANA in NAT mode, but without any of the firelamb, sslstrip, sslsplit etc") -group.add_argument("-snos", action='store_true', help="Will start MANA in a 'fake Internet' mode. Useful for places where people leave their\n" + - "wifi on, but there is no upstream Internet. Also containsthe captive portal.") -group.add_argument("-snoseap", action='store_true', help="Will start MANA with the EAP attack and noupstream mode") -#parser.add_argument("hash_file", help="File containing NTLM hashes", type=str) -#parser.add_argument("working_directory", help="Directory where files will be written to.") -#parser.add_argument("-l", "--level", type=int, choices=[0, 1, 2],default=0, help="0-> Default" + '\n' + "1-> GPU Cracking" + '\n' + "2-> Mask Cracking") -#parser.add_argument("-l", "--level", type=int, choices=[0, 1, 2], help="0-> Default" + '\n' + "1-> Default + GPU Cracking" + '\n' + "2-> Default + GPU Cracking + Mask Cracking") - -args = parser.parse_args() - -#quick_Cracking = False -#gpu_Cracking = False -#mask_Cracking = False - -if args.snf: - os.system("bash start-nat-full.sh") -elif args.sns: - os.system("bash start-nat-simple.sh") -elif args.snos: - os.system("bash start-noupstream.sh") -elif args.snoseap: - os.system("bash start-noupstream-eaponly.sh")