Skip to content

Commit

Permalink
Version bump, wordlist update and minor tweaks to execution logic
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Kamath <[email protected]>
  • Loading branch information
pwnfoo committed May 15, 2020
1 parent 7adcbe8 commit 4249ea2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
setup(
name='ntlmrecon', # Required

version='0.2.1-beta', # Required
version='0.4b0', # Required

description='A tool to enumerate information from NTLM authentication enabled web endpoints', # Optional

Expand Down
18 changes: 11 additions & 7 deletions src/ntlmrecon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

from colorama import init as init_colorama
from multiprocessing.dummy import Pool as ThreadPool
from ntlmrecon.ntlmutil import gather_ntlm_info, url_is_reachable
from ntlmrecon.ntlmutil import gather_ntlm_info
from ntlmrecon.misc import print_banner, INTERNAL_WORDLIST
from ntlmrecon.inpututils import readfile_and_gen_input, read_input_and_gen_list
from termcolor import colored
from urllib.parse import urlsplit, urlunsplit
from urllib.parse import urlsplit

# Initialize colors in Windows - Because I like Windows too!
init_colorama()
Expand Down Expand Up @@ -71,12 +71,15 @@ def main():
parser.add_argument('-f', '--force', help="Force replace output file if it already exists", action="store_true", default=False)
args = parser.parse_args()

if not args.input or not args.infile:
print(colored("[!] How about you check the -h flag?", "red"))

if os.path.isdir(args.outfile):
print(colored("[!] Invalid filename. Please enter a valid filename!", "red"))
sys.exit()
elif os.path.exists(args.outfile) and not args.force:
print(colored("[!] Output file {} already exists. "
"Choose a different file name or use -f to overwrite file!".format(args.outfile), "red"))
"Choose a different file name or use -f to overwrite the file".format(args.outfile), "red"))
sys.exit()

pool = ThreadPool(int(args.threads))
Expand Down Expand Up @@ -113,10 +116,11 @@ def main():

results = pool.map(gather_ntlm_info, all_combos)
results = [x for x in results if x]

write_records_to_csv(results, args.outfile)

print(colored('[+] All done! Output saved to {}. Happy hacking!'.format(args.outfile), 'green'))
if results:
write_records_to_csv(results, args.outfile)
print(colored('[+] All done! Output saved to {}. Happy hacking!'.format(args.outfile), 'green'))
else:
print(colored("[!] Failed to find any NTLM endpoints :("))



Expand Down
7 changes: 5 additions & 2 deletions src/ntlmrecon/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ def print_banner():
| |\ | | | | |____| | | || |\ \ __/ (_| (_) | | | |
\_| \_/ \_/ \_____/\_| |_/\_| \_\___|\___\___/|_| |_|
""" + colored("""v.0.2 beta - Y'all still exposing NTLM endpoints?
""" + colored("""v.0.4 beta - Y'all still exposing NTLM endpoints?
""", 'green') + colored("""
Bug Reports, Feature Requests : https://github.com/sachinkamath/NTLMRecon
""", "yellow"), 'red'))
""", "cyan"), 'red'))


INTERNAL_WORDLIST = [
"/abs",
"/adfs/services/trust/2005/windowstransport",
"/aspnet_client/",
"/Autodiscover",
"/Autodiscover/AutodiscoverService.svc/root",
Expand All @@ -28,6 +29,8 @@ def print_banner():
"/CertProv",
"/CertSrv/",
"/Conf/",
"/deviceupdatefiles_ext/",
"/deviceupdatefiles_int/",
"/dialin",
"/ecp/",
"/Etc/",
Expand Down

0 comments on commit 4249ea2

Please sign in to comment.