ldapsearch
LDAP anonymous binds allow unauthenticated attackers to retrieve information from the domain, such as a complete listing of users, groups, computers, user account attributes, and the domain password policy.
For example, ldapsearch is a command-line utility used to search for information stored in a directory using the LDAP protocol. It is commonly used to query and retrieve data from an LDAP directory service.
This command can be broken down as follows:
- Connect to the server
ldap.example.comon port389. - Bind (authenticate) as
cn=admin,dc=example,dc=comwith passwordsecret123. - Search under the base DN
ou=people,dc=example,dc=com. - Use the filter
(mail=john.doe@example.com)to find entries that have this email address.
The server would process the request and send back a response, which might look something like this:
This response includes the entry's distinguished name (DN) that matches the search criteria and its attributes and values.
Basic use in Domain context
Other tools related to ldap: windapsearch.py, ldapsearch, ad-ldapdomaindump.py.
Example from the hutch.offsec machine: