Skip to main content

Security Exposure

LDAPS exposes the directory, which holds account and group data, to anyone who can reach it. Microsoft notes that unsigned or unprotected LDAP traffic is open to replay and man-in-the-middle attacks, and that channel binding tokens make LDAP over TLS more resistant to them.

Hardening

  • Restrict 636 to internal networks and approved application servers; do not publish domain controllers to the internet.
  • Enable LDAP channel binding on domain controllers so LDAPS binds are tied to the TLS session.
  • Require LDAP signing and reject simple binds over non-TLS connections on 389.
  • Deploy valid server certificates on domain controllers and monitor their expiry.

Monitoring

Collect Directory Service event 3039 (LDAPS bind that failed channel binding token validation), 3040 (daily count of unprotected LDAPS binds) and 3041 (channel binding not enforced), plus events 2887 and 2889 for binds that do not use signing or TLS. Investigate clients that keep appearing in these events.

Frequently Asked Questions

What is the difference between port 389 and 636?→

Microsoft explains that LDAP uses port 389, while LDAPS uses port 636 and establishes SSL/TLS upon connecting.

Is port 636 TCP or UDP?→

LDAPS runs over TCP. IANA lists ldaps on both TCP and UDP, and Microsoft's port reference lists LDAP SSL on TCP 636.

Port assignments from the IANA Service Name and Transport Protocol Port Number Registry. Services can be configured to run on any port, so traffic on port 636 is not guaranteed to be LDAPS. Exploited-in-the-wild data from the CISA KEV catalog (CC0).