Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is LDAP?

LDAP is the protocol applications use to read and search a directory of users, groups, and devices. In most organisations that directory is Active Directory.

Illustration for the cybersecurity term LDAP
Home / Blog / Cybersecurity Terms / What Is LDAP?
17 November 2026

What Is LDAP?

What Is LDAP?

LDAP is how applications talk to a directory. The Lightweight Directory Access Protocol, currently specified by RFC 4511, defines operations for searching, reading, adding, modifying, and deleting entries in a hierarchical store of information about people, groups, computers, and printers. When a VPN appliance checks whether someone is in the right group, or an intranet application looks up a job title, it is almost certainly speaking LDAP to Active Directory.

How the Directory Is Shaped

Entries sit in a tree. Each is identified by a distinguished name built from the path to the root, which in a domain called example.co.uk looks like:

CN=Priya Shah,OU=Finance,OU=Users,DC=example,DC=co,DC=uk

Each entry has attributes defined by an object class in the schema: sAMAccountName, mail, memberOf, userAccountControl, servicePrincipalName. Searches use a prefix-notation filter syntax from RFC 4515, which is worth being able to read because it appears constantly in both administrative scripts and attacker tooling:

(&(objectClass=user)(servicePrincipalName=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))

That filter asks for enabled accounts with a service principal name, which is the first step of Kerberoasting. The same query is run by administrators auditing service accounts and by attackers choosing targets; the protocol cannot tell them apart.

Binding, and Why Simple Binds Are a Problem

Before a client can search, it binds—LDAP’s word for authenticating. There are three cases, and the differences matter.

For encryption there are two options and they are not the same thing. LDAPS uses TLS from the start on port 636. StartTLS negotiates TLS on the standard port after the connection opens. Both are acceptable; what is not acceptable is a simple bind on port 389 with no protection, and an estate audit will normally find several of them.

Signing, Channel Binding, and the 2020 Scramble

Unsigned LDAP connections can be relayed. An attacker who coerces authentication from a machine—through a number of well-known triggers—relays it to a domain controller over LDAP and acts with that machine’s privileges, which in the case of a domain controller is everything.

Microsoft’s advisory ADV190023, issued in August 2019, set out the fix: require LDAP signing and enable LDAP channel binding, so that an authentication cannot be lifted from one channel and replayed on another. The change was originally scheduled to be enforced by default in January 2020, then deferred after widespread concern about legacy clients. Many organisations still have it switched off, and it remains one of the higher-value hardening steps available in a Windows estate. Audit first using the domain controller events that record unsigned and unbound connections, fix the clients that appear, then enforce.

Enumeration Is the Real Exposure

The most consequential thing about LDAP in a domain is that any authenticated user can read a great deal of it. Group membership, descriptions, service principal names, account flags, delegation settings, and access control entries are all queryable by an ordinary account. That is by design—applications need it—and it is also why tools such as BloodHound can map the entire privilege graph of a domain from a single low-privileged session.

You cannot switch that off without breaking the directory’s purpose, so the response is different in kind. Stop putting secrets in attributes people can read, and the description field of service accounts is the standing offender: passwords written there in 2016 are still being found in assessments today. Remove delegation and permission anomalies so that what an attacker enumerates is a short, boring graph. And monitor for the shape of enumeration rather than the fact of it—a single account issuing thousands of directory queries in a few minutes, or querying object classes it has no business reading, is a detectable pattern that precedes most domain compromise.

Finally, treat LDAP as an injection surface in applications. Building a filter by concatenating user input allows filter manipulation in much the same way SQL injection works, as covered in LDAP injection. Parameterise or escape input according to RFC 4515, and give the application’s bind account read-only access to the narrowest subtree it needs.

At Privia Security, we assess directory exposure and relay paths through our infrastructure security testing services.

FAQ – Frequently Asked Questions

What Is the Difference Between LDAP and Active Directory?

LDAP is a protocol; Active Directory is a directory service that speaks it. Active Directory also provides Kerberos authentication, Group Policy, DNS integration, and replication, none of which are part of LDAP. Other directories such as OpenLDAP, 389 Directory Server, and various appliance directories also implement the protocol, which is why applications can often target several of them.

Should I Use LDAPS or StartTLS?

Either is acceptable, and the choice usually comes down to what the client supports. LDAPS establishes TLS immediately on port 636, which is simpler to verify from a network perspective. StartTLS upgrades a connection on port 389, which keeps a single port but means an unprotected connection exists briefly. What matters most is that neither leaves credentials on a plain simple bind.

What Is LDAP Channel Binding?

It ties the authentication exchange to the specific TLS channel it was performed over, so an attacker cannot capture an authentication and relay it to the directory on a different connection. Together with LDAP signing it closes a widely exploited relay path. Microsoft set out the configuration in advisory ADV190023; audit for unsigned and unbound connections before enforcing it.

Can Ordinary Users Read the Whole Directory?

They can read far more of it than most people expect: group membership, account flags, descriptions, service principal names, delegation settings, and permissions are all visible to any authenticated account. That is how privilege mapping tools work from a low-privileged session. The response is to keep secrets out of readable attributes, remove permission anomalies, and monitor for bulk query patterns.

Related Terms

You May Be Interested In These

What Is a Shadow Credentials Attack?

Cybersecurity Terms

17 November 2026

What Is a Shadow Credentials Attack?

Read More
What Is Root Cause Analysis?

Cybersecurity Terms

17 November 2026

What Is Root Cause Analysis?

Read More
What Is a Web Shell?

Cybersecurity Terms

17 November 2026

What Is a Web Shell?

Read More