Definition
Lightweight Directory Access Protocol (LDAP) is an open protocol used to access and manage distributed directory information services, commonly used for centralized authentication and storing user account information.
People Also Ask
Common questions about LDAP answered by our security experts.
LDAP in Practice
LDAP is the protocol for querying and modifying directory services — the hierarchical stores holding users, groups, devices and their attributes. It is old, widely implemented, and still central to enterprise identity because Active Directory and its equivalents speak it.
The configuration problems that recur
Unencrypted connections. Plain LDAP transmits queries and frequently credentials in clear text. LDAPS or StartTLS addresses this and is not always enabled, particularly for older applications configured years ago.
Anonymous bind. Where the directory permits unauthenticated queries, anyone who can reach it can enumerate users, groups and organisational structure — which is reconnaissance an attacker would otherwise have to work for.
Over-privileged service accounts. Applications integrating with the directory are frequently given broad read access, or write access they do not need, because narrowing it required effort during deployment.
LDAP injection is a real and overlooked class
Where user input is concatenated into a directory query without proper escaping, an attacker can alter the query's meaning — bypassing authentication, retrieving records they should not see, or enumerating the directory.
It is the same class of flaw as SQL injection and receives far less attention, partly because directory queries appear in authentication code that is assumed to be mature. Applications that build filters by string concatenation are worth reviewing specifically.
Bind accounts are a recurring escalation path
Applications that query the directory authenticate to it with a bind account, and those accounts are frequently over-privileged, given long-lived passwords, and configured in application files that many people can read.
An attacker who obtains a bind credential gains whatever the account can do — often reading the entire directory, sometimes modifying it. Because the credential is legitimate, the activity looks like an application doing its job.
Scoping bind accounts narrowly, rotating their credentials, and logging their queries converts them from a quiet escalation route into an observable one. Where the directory supports it, certificate-based authentication for applications removes the stored password entirely.
What the directory reveals when queried broadly
Directory data is a description of the organisation: who works where, who reports to whom, which accounts are service accounts, what naming conventions are used, which groups confer privilege and who belongs to them.
That is precisely the information required to plan a privilege escalation path or write a convincing pretext for a social engineering call. Attackers enumerate directories early for exactly this reason.
Restricting who can perform broad queries, and alerting on enumeration-shaped activity, addresses a reconnaissance step that otherwise happens invisibly and informs everything that follows.
The thing most worth getting right
Directory queries are also worth logging. Because applications query constantly, the baseline is noisy — and a sudden broad enumeration from an account that normally performs narrow lookups stands out clearly against it once anyone is watching.
Where to start
Check whether anonymous bind is permitted and whether connections are encrypted. Both are quick to determine, both are common findings, and both are usually configuration rather than architecture.
See Active Directory. GuardsArm runs security risk assessments.
Related Terms
Active Directory
Active Directory (AD) is Microsoft's directory service for Windows domain networks that provides authentication, authorization, group policy management, and centralized resource management across an organization.
Authentication
Authentication is the process of verifying the identity of a user, device, or system before granting access to resources. It typically involves credentials such as passwords, biometrics, security tokens, or digital certificates.
Access Control
Access control is a security mechanism that regulates who or what can view, use, or interact with resources in a computing environment. It enforces policies that grant or deny permissions based on user identity, role, or other attributes.
Related Reading
Privileged Access Management: Vaults, Secrets and Machine Identities
Most PAM programmes secure human administrators and ignore the service accounts, which outnumber them heavily and never change their passwords.
Multi-Factor Authentication (MFA): Complete Implementation and Best Practices Guide
Learn about multi-factor authentication (mfa): complete implementation and best practices guide and how it impacts your organization's cybersecurity…
MFA Won't Save You: Why Token Theft Is Healthcare's Next Crisis
Attackers don't need your password anymore. They're stealing session tokens after MFA approval, and healthcare organizations running Microsoft 365…
Speak With an Expert
Book a free consultation to discuss ldap for your organization.
Related Services
Need Help With LDAP?
Our certified security professionals can help you implement the right ldap strategy for your organization. Get a free assessment today.