Skip to content

Commit ae653c2

Browse files
committed
Add fix from ea7e092 to the ldap protocol
1 parent 7162fd9 commit ae653c2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

nxc/protocols/ldap.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def enum_host_info(self):
259259
ntlm_info = parse_challenge(ntlm_challenge)
260260
self.server_os = ntlm_info["os_version"]
261261

262-
if not self.kdcHost and self.domain and self.domain == self.remoteName:
262+
# using kdcHost is buggy on impacket when using trust relation between ad so we kdcHost must stay to none if targetdomain is not equal to domain
263+
if not self.kdcHost and self.domain and self.domain == self.targetDomain:
263264
result = self.resolver(self.domain)
264265
self.kdcHost = result["host"] if result else None
265266
self.logger.info(f"Resolved domain: {self.domain} with dns, kdcHost: {self.kdcHost}")

0 commit comments

Comments
 (0)