Skip to content

Commit a636fb4

Browse files
committed
feat: new option to retrieve old hashes
1 parent 56795fc commit a636fb4

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

nxc/modules/timeroast.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ class NXCModule:
1717
Module by Disgame: @Disgame
1818
Based on research from SecuraBV (@SecuraBV)
1919
20+
https://github.com/SecuraBV/Timeroast/
21+
2022
Much of this code was copied from the original implementation.
2123
'''
2224

2325
name = 'timeroast'
2426
description = 'Timeroasting exploits Windows NTP authentication to request password hashes of any computer or trust account'
2527
supported_protocols = ['smb']
2628
opsec_safe = True
27-
multiple_hosts = True
29+
multiple_hosts = False
2830

2931
def __init__(self):
3032
self.context = None
@@ -35,13 +37,11 @@ def __init__(self):
3537

3638

3739
def options(self, context, module_options):
38-
"""Required.
39-
Module options get parsed here. Additionally, put the modules usage here as well
40-
"""
4140
self.rids = range(1, 2**31)
4241
self.rate = 180
4342
self.timeout = 24
4443
self.src_port = 0
44+
self.old_hashes = False
4545
self.target = None
4646

4747
if "rids" in module_options:
@@ -52,13 +52,14 @@ def options(self, context, module_options):
5252
self.timeout = module_options["timeout"]
5353
if "src_port" in module_options:
5454
self.src_port = module_options["src_port"]
55+
if "old_hashes" in module_options:
56+
self.old_hashes = module_options["old_hashes"]
5557

5658
def on_login(self, context, connection):
57-
5859
if self.target is None:
5960
self.target = connection.host
6061

61-
for rid, hash, salt in self.run_ntp_roast(context, self.target, self.rids, self.rate, self.timeout, False, self.src_port):
62+
for rid, hash, salt in self.run_ntp_roast(context, self.target, self.rids, self.rate, self.timeout, self.old_hashes, self.src_port):
6263
context.log.highlight(hashcat_format(rid, hash, salt))
6364

6465
def run_ntp_roast(self, context, dc_host, rids, rate, giveup_time, old_pwd, src_port = 0):

0 commit comments

Comments
 (0)