Skip to content

Commit b3c19ad

Browse files
authored
Merge pull request #94 from ShutdownRepo/aclattack
Unfiltered SID query when operating ACL attack
2 parents 3f8c102 + 1b3693d commit b3c19ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

impacket/examples/ntlmrelayx/attacks/ldapattack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,9 @@ def aclAttack(self, userDn, domainDumper):
476476
# Dictionary for restore data
477477
restoredata = {}
478478

479-
# Query for the sid of our user
479+
# Query for the sid of our incoming account (can be a user or a computer in case of a newly creation computer account (i.e. MachineAccountQuot abuse)
480480
try:
481-
self.client.search(userDn, '(objectClass=user)', attributes=['sAMAccountName', 'objectSid'])
481+
self.client.search(userDn, '(objectClass=*)', attributes=['sAMAccountName', 'objectSid'])
482482
entry = self.client.entries[0]
483483
except IndexError:
484484
LOG.error('Could not retrieve infos for user: %s' % userDn)

0 commit comments

Comments
 (0)