ldapdomaindump icon indicating copy to clipboard operation
ldapdomaindump copied to clipboard

gid = int(group.objectSid.value.split('-')[-1]) TypeError: a bytes-like object is required, not 'str'

Open flashoop opened this issue 1 year ago • 3 comments
trafficstars

python3 ldapdomaindump.py ldap://10.10.73.150

[] Connecting as anonymous user, dumping will probably fail. Consider specifying a username/password to login with [] Connecting to host... [] Binding to host [+] Bind OK [] Starting domain dump Traceback (most recent call last): File "/home/kali/tools/ldap/ldapdomaindump/ldapdomaindump.py", line 3, in ldapdomaindump.main() File "/home/kali/tools/ldap/ldapdomaindump/ldapdomaindump/init.py", line 956, in main dd.domainDump() File "/home/kali/tools/ldap/ldapdomaindump/ldapdomaindump/init.py", line 418, in domainDump rw.generateUsersReport(self) File "/home/kali/tools/ldap/ldapdomaindump/ldapdomaindump/init.py", line 801, in generateUsersReport dd.mapGroupsIdsToDns() File "/home/kali/tools/ldap/ldapdomaindump/ldapdomaindump/init.py", line 346, in mapGroupsIdsToDns gid = int(group.objectSid.value.split('-')[-1]) TypeError: a bytes-like object is required, not 'str'

flashoop avatar Apr 07 '24 06:04 flashoop

"Connecting as anonymous user, dumping will probably fail"

What scenario are you encountering that you expect anonymous enumeration to work? I'd need some more info to have a look at this issue. In a normal environment, anonymous enumeration will not work so an error is expected.

dirkjanm avatar Apr 09 '24 06:04 dirkjanm

I just got the same error on a Vulnlab machine (it's probably the same one). It seems to be because the DC allows anonymous bind but only to query a few specific DNs (CN=Users and some OUs), so it's normal the tool can't dump it all :)

apolloteapot avatar Apr 13 '24 14:04 apolloteapot