LDAP Check
Evaluates LDAP signing, LDAP channel binding, and anonymous bind configuration across every discovered Domain Controller.
Prerequisite
Requires the Domain Controller hostname inventory from ad-kit enum. The
check itself is unauthenticated.
Commands run
For each Domain Controller, ad-kit runs NetExec directly:
What it checks
ad-kit records:
- LDAP signing - whether the controller requires signed LDAP traffic.
- Channel binding - whether LDAPS authentication is bound to the TLS session.
- Anonymous bind - whether the controller accepts unauthenticated LDAP binds.
How it works
LDAP is the protocol Windows systems use to query Active Directory. It runs on the Domain Controllers, normally on:
- TCP 389 (plaintext LDAP).
- TCP 636 (LDAPS, LDAP over TLS).
- TCP 3268 and 3269 (Global Catalog).
Clients authenticate with a bind operation:
- Simple bind sends the credentials directly, in cleartext over plain LDAP.
- SASL bind authenticates with Kerberos or NTLM first and reuses that security context, which includes a session key.
LDAP signing uses that session key to add a cryptographic checksum to each message so both sides can confirm its integrity and authenticity. A closely related control, sealing, uses the same key to encrypt the message contents. Because both require a session key, they work only with SASL binds; simple bind is incompatible with signing.
LDAP channel binding protects the encrypted path (LDAPS). It binds a Channel Binding Token (CBT), derived from the TLS session, to the authentication so the controller can verify that the authentication belongs to the same TLS channel the client established. Without it, an attacker in an Adversary-in-the-Middle position can relay authentication captured over one TLS session and replay it over a new one.
Why it matters
- Without signing, LDAP traffic can be modified in transit and authentication requests can be relayed.
- Without channel binding, authentication intended for a secure LDAPS channel can be relayed to a Domain Controller.
- With anonymous bind permitted, an unauthenticated client can query directory objects such as users and groups.
All three feed credential-relay attacks and directory reconnaissance.
Findings
| Finding ID | Title |
|---|---|
| LDAP-001 | LDAP Signing Not Enforced |
| LDAP-002 | LDAP Channel Binding Not Enforced |
| LDAP-003 | Anonymous LDAP Bind Permitted |
Tooling
- NetExec: used by this check.
- windapsearch: LDAP enumeration.
- ldapsearch-ad: LDAP enumeration.
- ldapdomaindump: directory dump.