LDAP (Lightweight Directory Access Protocol) runs on TCP port 389 (plaintext/STARTTLS) and TCP port 636 (LDAPS with TLS). Nmap identifies them as ldap and ldaps. In Active Directory environments, LDAP is the primary protocol for querying the directory: users, groups, computers, policies, and more.
Anonymous or null-bind LDAP access can expose the entire directory structure. Even without credentials, the root DSE and naming contexts are often readable, revealing the domain name and forest structure. With valid credentials, LDAP queries return detailed information about every object in the domain, including password policies, group memberships, SPNs, and delegation settings.
Check for anonymous bind access, then query the base DN, users, groups, and computer objects. Tools like ldapsearch, ldapdomaindump, and windapsearch automate this. Look for accounts with descriptions containing passwords, unconstrained delegation, and AS-REP roastable accounts.
Enumeration
Enumerate LDAP via anonymous and auth binds, users, groups, misconfigs
LDAP Authenticated Deep Dive
LDAP Authenticated User Group Enumeration
Enumerate Active Directory user groups via authenticated LDAP queries using tools like ldapsearch, BloodHound, and PowerView to map privilege relationships.
LDAP RootDSE and Anonymous Bind Checks
LDAP Targeted Misconfiguration Searches
Vulnerability Discovery
Guides on finding LDAP misconfigs via null bind, signing, and relay checks
LDAP Null Bind and Anonymous Access
LDAP Signing and Channel Binding
Exploitation
Anonymous bind, injection, pass-back, brute force, and credential extractio
LDAP Anonymous Bind – Unauthenticated Data Extraction
LDAP Brute Force and Password Spraying
Exploit LDAP authentication via brute force and password spraying techniques to enumerate valid credentials against directory services.
LDAP Credential Extraction – LAPS gMSA and Hidden Passwords
Exploits LDAP misconfigurations to extract LAPS passwords, gMSA credentials, and hidden attributes using tools like ldapsearch, BloodHound, and CrackMapExec.
LDAP Injection – Auth Bypass and Data Extraction
LDAP Relay and Signing Abuse
LDAP Pass-Back Attack – Credential Capture via Rogue Server
Exploit misconfigured LDAP authentication by redirecting credentials to a rogue server, capturing plaintext or hashed bind credentials during reconnection attempts.