1. Resources
  2. Detection sources
  3. Event ID 3039

Event ID 3039: The following client performed an LDAP bind over SSL/TLS and failed the LDAP channel binding token validation

Written by a domain controller that validates LDAP channel binding tokens when a bind over TLS fails the check. An authentication relayed over another TLS session fails here. Needs 16 LDAP Interface Events at level 2.

Log source
Directory Service log
Detection value
Supporting
Volume
Low (estimate)
Last updated
Log
Directory Service log (Microsoft-Windows-ActiveDirectory_DomainService, on by default)
Logged on
Domain controllers only
Event versions
Not published
Detects
1 attack (1 rule)
MITRE ATT&CK
1 technique in 2 tactics
Threat groups
2 groups that MITRE ATT&CK records using these techniques
Fields the rules read
The event ID and the provider only

When it is written

A domain controller writes 3039 when a client authenticates with SASL over an LDAP connection protected by TLS (LDAPS, or STARTTLS on port 389) and fails the validation of its channel binding token. The token ties the authentication to the TLS session it was made on, and Microsoft explains that the domain controller rejects the authentication when the token does not match its own session or is missing where it is required. Microsoft states that channel binding does not apply to simple binds or certificate binds over TLS, nor to binds without TLS, so those are outside this event.

Validation happens only when Domain controller: LDAP server channel binding token requirements is set to When supported or Always. KB4520412 lists three triggers: a client sends an improperly formatted token (either setting); a client that is capable of channel binding sends no token (When supported); any client sends no token (Always). Microsoft counts a client as capable when Extended Protection for Authentication is installed or available in its operating system and not turned off with the registry setting SuppressExtendedProtection.

The event needs the 16 LDAP Interface Events diagnostic level 2 on the domain controller. Microsoft documents 3039 only in a table: it gives the first sentence of the event text and the triggers, and tells administrators to identify the device behind each IP address the event cites, but it does not print the rest of the message.

Why it matters for detection: a machine in the middle that forwards a client's authentication to the domain controller over its own TLS session carries a token computed for the other session, so Microsoft describes the relayed authentication as rejected by this check. On a domain controller that validates tokens, the attempt shows up here.

How to turn it on

Microsoft-Windows-ActiveDirectory_DomainService writes the event to the Directory Service log (Event Viewer > Applications and Services Logs > Directory Service), which is on by default. Microsoft

The log needs nothing to be turned on: a domain controller writes it from the moment it is promoted. What Active Directory writes there depends on its diagnostic logging levels, one REG_DWORD value per category under HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics (for example 16 LDAP Interface Events), each from 0 (None) to 5 (Internal). Microsoft's default for every category is 0, which it describes as recording only critical and error events; several warning and information events of this library are nonetheless documented as written at that level (the CVE-2021-42291 events, the daily LDAP summaries). Some events, such as the per-client LDAP signing and channel binding events, are written only at level 2 or higher of their category; their pages say so.

Microsoft recommends keeping the levels at 0 unless you investigate an issue, notes that a higher level adds detail and events, and advises against 3 or more because it costs resources and can slow the server. The levels are set per domain controller, so set them on every domain controller whose events you need. AD LDS instances write the same kind of events to their own instance log, which this library does not cover.

Show the diagnostic logging levels of this domain controller
reg query "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics"
Based on vendor documentation.
Show the log's settings (size and retention)
wevtutil gl "Directory Service"
Based on vendor documentation.

Two settings on each domain controller. The channel binding policy, registry value LdapEnforceChannelBinding (0 Never, 1 When supported, 2 Always; Windows Server 2022 and earlier default to Never, new Windows Server 2025 deployments to When supported), and the diagnostic level, 16 LDAP Interface Events at 2. Read both:

reg query "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters" /v LdapEnforceChannelBinding
reg query "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics" /v "16 LDAP Interface Events"

Microsoft's update article sets the diagnostic level with reg add "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics" /v "16 LDAP Interface Events" /t REG_DWORD /d 2. Set the policy itself through the Group Policy setting: moving it from Never to When supported or Always makes the domain controller reject failing clients, so Microsoft recommends finding them first with the audit events 3074 and 3075.

Fields

The template of this event is not part of client Windows and Microsoft does not publish its XML field names, so the fields are named by the labels of Microsoft’s documentation.

FieldWhat it holds
Client IP addressAddress of the client whose bind failed the check. KB4520412 tells administrators to identify the device behind each IP address cited by event 3039; it does not print the message, so this is the label Microsoft shows for the same value in events 2889, 3074 and 3075 (address and TCP port). For a relayed authentication it is the relaying machine.

Values to know

Client IP address

ValueMeaningSignal
Address of a known client that cannot send a valid tokenAn appliance, an application or a Windows client with Extended Protection turned offFix or update it, as Microsoft recommends, then exclude what remains by address.Noise
Any other addressA new source of failing bindsA relayed authentication fails here. Find the machine behind the address and what it was connecting as.Attack signal

Volume and noise

The event comes from clients that cannot pass the check: applications and appliances that send a malformed token, Windows clients on which Extended Protection for Authentication is turned off, and, under the Always setting, every client that sends no token. Microsoft's remedy is to identify the make and model behind each address and update or reconfigure it.

On a domain controller set to Never the event does not exist; the daily summary 3040 counts the binds over TLS that were not protected instead.

Keeping it manageable

  • Keep every 3039: the relay rule matches the event ID alone, and failures should be rare once the clients are fixed.
  • Record the addresses of the known clients that fail and fix or exclude them by address, so that a new address stands out.
  • Use the audit events 3074 and 3075 before you move the policy up a step: they list the clients that would fail without rejecting them.
  • Collect the event from every domain controller: each validates the binds it receives, and the policy and diagnostic level are set per domain controller.

Attacks this event reveals

Detection rules that read this event:

Frequently asked questions

Why is there no event 3039 although some LDAPS clients do not use channel binding?

The domain controller validates tokens, and writes 3039, only when the channel binding policy is When supported or Always, and only with the 16 LDAP Interface Events diagnostic level at 2. Windows Server 2022 and earlier default to Never. At Never the daily summary 3040 counts the unprotected binds over TLS instead.

Was the bind in event 3039 rejected?

Microsoft describes 3039 as a failed channel binding validation and explains that the domain controller rejects an authentication whose token does not match or is missing where it is required. A bind that the domain controller let through without a token is what the audit event 3075 describes in its own text: it will be rejected once validation is enforced.

Which clients cause event 3039 besides an attack?

Clients that send a malformed token, Windows clients on which Extended Protection for Authentication is turned off through SuppressExtendedProtection, and, under the Always setting, any client that sends no token at all. Microsoft recommends identifying the device behind each address and updating or reconfiguring it.

References