ldapsearch -x -H 'ldap://10.10.10.172:389' -D '' -w '' -b "DC=MEGABANK,DC=LOCAL" | grep sAMAccountName | tr -d ':' | sed 's/s//' | sed 's/A//' | sed 's/M//' | sed 's/A//'| sed 's/c//' | sed 's/c//'| sed 's/o//' | sed 's/u//' | sed 's/n//'| sed 's/t//' | sed 's/N//'| sed 's/a//' | sed 's/m//' | sed 's/e//' > ldapusers.txt
We could make a new directory and use this command and host a python webserver.
ldapdomaindump -u 'htb.local\amanda' -p 'Ashare1972' 10.10.10.103
[*] Connecting to host...
[*] Binding to host
[+] Bind OK
[*] Starting domain dump
[+] Domain dump finished
Use the following command to easily naviaget to the use descriptions
└─# cat domain_users.grep | cut -d " " -f12 | grep "\S"
If a group is part of the Remote management Group, it means we can log in via winrm.