📚LDAPSearch
Authentication
# Basic authentication
ldapsearch -H ldap://10.10.10.10 -D 'user@domain.htb' -w 'password'
# Authentication via Kerberos (TGT must be exported in KRB5CCNAME beforehand)
ldapsearch -H ldap://dc.domain.htb -Y GSSAPIEnumerating LDAP with ldapsearch
Domain Name Identification
ldapsearch -x -H ldap://10.10.10.10 -s base | grep defaultNamingContextSearch for Password-Related Content
# Enumerate LDAP for content containing "pwd|password"
ldapsearch -x -H ldap://10.10.10.10 -b "dc=domain,dc=htb" | grep -ie "pwd\|password"Query Objects with Info Field Data
# Enumerate objects in LDAP that have data in the "info" field
ldapsearch -x -H ldap://10.10.10.10 -D 'user@domain.htb' -w 'password' -b 'dc=domain,dc=htb' "(info=*)" infoRead LAPS Password
User Enumeration with Pattern Matching
Enumerate Users Starting with "m.lov"
Enumerate Users Containing "lov"
Enumerate Users Ending with "god"
General User Enumeration
Enumerate Users via LDAP
Enumerate AD Users and Show Group Memberships
Computer Enumeration
Enumerate AD Computers with Full Information
Group Enumeration
Enumerate Members of 'Moderators' Group (Example)
Detailed User Information
Enumerate Important Fields for Specific User
Key Parameters
Last updated