Closed kalidor closed 4 years ago
Hi!
Thanks for the submission.
Could you try changing the ip with cascade.local
as well as adding the machine and domain to your host file (since there is no zone to query for DNS) And rerun?
Another note to add is that when running with —no-creds
the -u
flag is not required. Eventually check out https://github.com/CasperGN/ActiveDirectoryEnumeration/pull/15 which is practically tested on cascade.
Cheers! / C
Added as bug either way as this exception should be caught.
Note to self: Possible catch of this issue can be the regex for domain name validation:
$ grep "domainRE" activeDirectoryEnum.py
domainRE = re.compile(r'^((?:[a-zA-Z0-9-.]+)?(?:[a-zA-Z0-9-.]+)?[a-zA-Z0-9-]+\.[a-zA-Z]+)$')
The removal of 0-9
and -
from the last matchgroup ensures that ip's in dc
argument would trigger a fail and exit.
@kalidor The issue is from Pythons protection against stack overflow (from what i've gathered atleast) as there is recursive functions (most likely in the ldap calls) that tries to exceed 1000. The problem is that it (the code) is not aware which domain to query LDAP ojects from regardless of binding succesfully on the dc's IP. A quick test with:
$ echo "10.10.10.182 cascade.local" >> /etc/hosts; ./activeDirectoryEnum.py cascade.local --no-creds -o cascade.local
[ INFO ] Attempting to get objects without credentials
[ OK ] Bound to LDAP server: cascade.local
[ OK ] Got all Computer objects
[ OK ] Got all Person objects
[ OK ] Got all Group objects
[ OK ] Got all SPN objects
[ OK ] Got all ACL objects
[ OK ] Got all GPO objects
[ OK ] Got all Domains
[ OK ] Got all OUs
[ OK ] Got all deleted users
[ INFO ] Searching for juicy info in deleted users
[ INFO ] Found possible password in properties
[ INFO ] Attempting to determine if it is a password
[ INFO ] User: "<redacted>" with: "<redacted>" was not cleartext
...
Can you see if this also works for you?
Cheers! / C
As you suggested, using cascade.local instead of IP works like a charm.
Describe the bug Playing with Cascade machine on hackthebox, I want to try your tools. ps: I root the box,
To Reproduce
The output file is not created, so i don't really know where it's crashing...
Expected behavior Some output, and no error :-)