Skip to content

Commit 4f10c0b

Browse files
committed
Update impacket so ldaps channel binding is supported
1 parent 05ad3c6 commit 4f10c0b

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

nxc/protocols/ldap.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -495,15 +495,12 @@ def plaintext_login(self, domain, username, password):
495495
f"{self.domain}\\{self.username}:{process_secret(self.password)} {ldap_error_status[error_code] if error_code in ldap_error_status else ''}",
496496
color="magenta" if (error_code in ldap_error_status and error_code != 1) else "red",
497497
)
498-
self.logger.fail("LDAPS channel binding might be enabled, this is only supported with kerberos authentication. Try using '-k'.")
499498
else:
500499
error_code = str(e).split()[-2][:-1]
501500
self.logger.fail(
502501
f"{self.domain}\\{self.username}:{process_secret(self.password)} {ldap_error_status[error_code] if error_code in ldap_error_status else ''}",
503502
color="magenta" if (error_code in ldap_error_status and error_code != 1) else "red",
504503
)
505-
if proto == "ldaps":
506-
self.logger.fail("LDAPS channel binding might be enabled, this is only supported with kerberos authentication. Try using '-k'.")
507504
return False
508505
except OSError as e:
509506
self.logger.fail(f"{self.domain}\\{self.username}:{process_secret(self.password)} {'Error connecting to the domain, are you sure LDAP service is running on the target?'} \nError: {e}")
@@ -585,15 +582,12 @@ def hash_login(self, domain, username, ntlm_hash):
585582
f"{self.domain}\\{self.username}:{process_secret(nthash)} {ldap_error_status[error_code] if error_code in ldap_error_status else ''}",
586583
color="magenta" if (error_code in ldap_error_status and error_code != 1) else "red",
587584
)
588-
self.logger.fail("LDAPS channel binding might be enabled, this is only supported with kerberos authentication. Try using '-k'.")
589585
else:
590586
error_code = str(e).split()[-2][:-1]
591587
self.logger.fail(
592588
f"{self.domain}\\{self.username}:{process_secret(nthash)} {ldap_error_status[error_code] if error_code in ldap_error_status else ''}",
593589
color="magenta" if (error_code in ldap_error_status and error_code != 1) else "red",
594590
)
595-
if proto == "ldaps":
596-
self.logger.fail("LDAPS channel binding might be enabled, this is only supported with kerberos authentication. Try using '-k'.")
597591
return False
598592
except OSError as e:
599593
self.logger.fail(f"{self.domain}\\{self.username}:{process_secret(self.password)} {'Error connecting to the domain, are you sure LDAP service is running on the target?'} \nError: {e}")

poetry.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)