LDAP
— Lightweight Directory Access ProtocolLDAP is the foundation of enterprise identity management (Active Directory, FreeIPA, OpenLDAP). It organizes data into a hierarchical tree of Distinguished Names (DN) optimized for rapid read lookups and authentication binds.
Interactive Session: How LDAP Works
Step through the packet exchange sequence between nodes.
Interactive Execution Sandbox
Interact with a live or clearly-labelled simulated instance of LDAP.
Threat Model & Attack Simulation
How this protocol is attacked in practice, what defenders can see, and which control stops it.
Threat model & attack simulation
SimulatedDefensive education. Every step runs in this page; no traffic is generated or sent.
LDAP filter injection
InjectionUnescaped input in an LDAP filter can change the query logic and bypass authentication or expose entries.
Supply a crafted value
A login field contains filter metacharacters instead of a plain name.
LDAP errors and unusual filter strings in logs.
Authentication bypass and directory disclosure.
Defences that matter
- Escape all filter input
- Use parameterised directory APIs
- Least-privilege bind accounts
This is a conceptual model for defenders, not an exploit toolkit. It contains no payloads, tooling or instructions for attacking systems you do not own.
Protocol Specification & Architecture
Key characteristics, real-world deployment patterns, and trade-offs.
Core Technical Features
- Hierarchical Directory Information Tree (DIT) structure
- Distinguished Names (DN) e.g., "cn=Alice,ou=Engineering,dc=corp,dc=com"
- LDAP Bind operation for centralized user authentication
- Port 389 (Plaintext/STARTTLS) and Port 636 (LDAPS over TLS)
Real-World Use Cases
- Enterprise Single Sign-On and employee directory lookup
- VPN and Linux server PAM authentication
- Email client address book discovery
Advantages & Strengths
- Extremely fast, indexed read and search queries across millions of user accounts
Limitations & Vulnerabilities
- Complex query syntax and rigid schema structure compared to modern REST/SCIM APIs