From 5fb9946d8a9e044bb756bea5ce38e2e0534d68ce Mon Sep 17 00:00:00 2001 From: Alexander Neff Date: Mon, 16 Jun 2025 09:50:19 -0400 Subject: [PATCH] Swap logic to -u asreproastable --no-preauth kerberoastable --- nxc/protocols/ldap.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/nxc/protocols/ldap.py b/nxc/protocols/ldap.py index dddd9b09..3eb980f9 100644 --- a/nxc/protocols/ldap.py +++ b/nxc/protocols/ldap.py @@ -986,15 +986,11 @@ class ldap(connection): def kerberoasting(self): if self.args.no_preauth: - if not self.args.username: - self.logger.fail("Use -u/--username to supply a list of usernames or SPNs (file or comma-separated list)") - return - usernames = [] - for item in self.args.username: + for item in self.args.no_preauth: if os.path.isfile(item): with open(item, encoding="utf-8") as f: - usernames.extend(l.strip() for l in f if l.strip()) + usernames.extend(line.strip() for line in f if line.strip()) else: usernames.append(item.strip()) @@ -1008,10 +1004,7 @@ class ldap(connection): skipped.append(base_name) continue - hashline = KerberosAttacks(self).get_tgs_no_preauth( - self.args.no_preauth, - spn - ) + hashline = KerberosAttacks(self).get_tgs_no_preauth(self.username, spn) if hashline: hashes.append(hashline)