Skip to content

Commit 725c96f

Browse files
committed
Use host IP for DNS resolution for asreproasting
1 parent f8293d1 commit 725c96f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

nxc/protocols/ldap.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,11 @@ def active_users(self):
805805
def asreproast(self):
806806
if self.password == "" and self.nthash == "" and self.kerberos is False:
807807
return False
808+
809+
# If kdcHost isn't set, use the target IP for DNS resolution
810+
if not self.kdcHost:
811+
self.kdcHost = self.host
812+
808813
# Building the search filter
809814
search_filter = "(&(UserAccountControl:1.2.840.113556.1.4.803:=%d)(!(UserAccountControl:1.2.840.113556.1.4.803:=%d))(!(objectCategory=computer)))" % (UF_DONT_REQUIRE_PREAUTH, UF_ACCOUNTDISABLE)
810815
attributes = [

0 commit comments

Comments
 (0)