Skip to content

Commit dea04c9

Browse files
authored
Merge pull request Pennyw0rth#756 from Pennyw0rth/preauth
2 parents 26c3f66 + a6225e5 commit dea04c9

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

nxc/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def __init__(self, args, db, target):
140140
self.args.use_kcache or
141141
self.args.aesKey or
142142
(hasattr(self.args, "delegate") and self.args.delegate) or
143-
(hasattr(self.args, "no_preauth") and self.args.no_preauth))
143+
(hasattr(self.args, "no_preauth_targets") and self.args.no_preauth_targets))
144144
self.aesKey = None if not self.args.aesKey else self.args.aesKey[0]
145145
self.use_kcache = None if not self.args.use_kcache else self.args.use_kcache
146146
self.admin_privs = False

nxc/protocols/ldap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def kerberos_login(self, domain, username, password="", ntlm_hash="", aesKey="",
415415
color="yellow",
416416
)
417417
# If no preauth is set, we want to be able to execute commands such as --kerberoasting
418-
if self.args.no_preauth: # noqa: SIM103
418+
if self.args.no_preauth_targets: # noqa: SIM103
419419
return True
420420
else:
421421
return False
@@ -990,9 +990,9 @@ def asreproast(self):
990990
hash_asreproast.write(f"{hash_TGT}\n")
991991

992992
def kerberoasting(self):
993-
if self.args.no_preauth:
993+
if self.args.no_preauth_targets:
994994
usernames = []
995-
for item in self.args.no_preauth:
995+
for item in self.args.no_preauth_targets:
996996
if os.path.isfile(item):
997997
with open(item, encoding="utf-8") as f:
998998
usernames.extend(line.strip() for line in f if line.strip())

nxc/protocols/ldap/proto_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def proto_args(parser, parents):
1313
egroup = ldap_parser.add_argument_group("Retrieve hash on the remote DC", "Options to get hashes from Kerberos")
1414
egroup.add_argument("--asreproast", help="Output AS_REP response to crack with hashcat to file")
1515
egroup.add_argument("--kerberoasting", help="Output TGS ticket to crack with hashcat to file")
16-
egroup.add_argument("--no-preauth", nargs=1, dest="no_preauth", help="No-preauth user for AS-REQ Kerberoast (use with -u users/SPNs).")
16+
egroup.add_argument("--no-preauth-targets", nargs=1, dest="no_preauth_targets", help="Targeted kerberoastable users")
1717

1818
vgroup = ldap_parser.add_argument_group("Retrieve useful information on the domain")
1919
vgroup.add_argument("--base-dn", metavar="BASE_DN", dest="base_dn", type=str, default=None, help="base DN for search queries")

0 commit comments

Comments
 (0)