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

Event ID 3052: The directory has been configured to not enforce per-attribute authorization during LDAP add operations

Error a domain controller writes when the CVE-2021-42291 add check is switched off (character 28 of dSHeuristics set to 2): no events, no blocking. Users who may create computer objects can again set attributes beyond their rights, unseen.

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
6 groups that MITRE ATT&CK records using these techniques
Fields the rules read
The event ID and the provider only

When it is written

KB5008383, released with the November 9, 2021 updates for CVE-2021-42291, controls its authorization checks for LDAP add operations on computer objects with character 28 of the forest-wide dSHeuristics attribute: 0 audit mode (the default), 1 enforcement, 2 disabled. Microsoft lists three mode change events written when that character changes: 3050 for enforcement, 3051 for audit mode and 3052 for disabled. 3052 says that the directory no longer enforces per-attribute authorization during LDAP add operations, that no events will be logged and no requests will be blocked, and that the setting is not secure and should only be a temporary troubleshooting step. Microsoft gives it the event type Error.

From then on, a user without domain administrator rights who may create computer objects can again include attributes and a security descriptor beyond their rights in the add request (the protocol specification, MS-ADTS, lets the check succeed without processing at this value), and the add events 3044, 3045, 3047 and 3048 stop.

KB5008383 does not say whether every domain controller writes the event when the change replicates to it, or whether it is repeated, for example when the service starts. The event does not name who made the change.

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.

The event is written by domain controllers with the November 9, 2021 or later updates; nothing else needs to be turned on. To see the current state of the forest, read dSHeuristics (read only, Active Directory module); character 28 at 2 is the state this event announces:

Get-ADObject -Identity ("CN=Directory Service,CN=Windows NT,CN=Services," + (Get-ADRootDSE).configurationNamingContext) -Properties dSHeuristics | Select-Object -ExpandProperty dSHeuristics

To learn who changed the attribute, the domain controller that received the write logs event 5136 with the old and new string when an audit entry (SACL) on the CN=Directory Service object covers writes to dSHeuristics, and Audit Directory Service Changes is on.

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
Event TextFixed text with no inserted values: the add check is not enforced, no events will be logged and no requests blocked, and the setting is not secure. It does not say who changed the setting or when; read that from event 5136 on the dSHeuristics attribute.

Values to know

Event Text

ValueMeaningSignal
to enforce per-attribute authorizationEvent 3050: enforcement, character 28 is 1Microsoft calls it the most secure setting.Expected
Warning events will be logged, but no requests will be blockedEvent 3051: audit mode, character 28 is 0 or not set (the default after the update)Worth knowing
No events will be logged, and no requests will be blockedEvent 3052, this event: the check and its events are off, character 28 is 2Microsoft: not secure, only as a temporary troubleshooting step.Attack signal

Volume and noise

Microsoft accepts value 2 only as a temporary troubleshooting step, so the event should be rare and explained by a change record. A forest administrator who disables the check to unblock a failing provisioning process is the ordinary cause; the setting should then be restored.

Keeping it manageable

  • Keep every 3052 and alert on it: the rule matches the event ID alone, and the event is rare.
  • Pair it with event 5136 on dSHeuristics (the dSHeuristics Modification rule) to see who made the change and from which session.
  • Once the troubleshooting is over, check that character 28 is back at 1 (or 0), and expect event 3050 or 3051 when it changes.

Attacks this event reveals

Detection rules that read this event:

Frequently asked questions

What does event 3052 mean?

Character 28 of the forest's dSHeuristics attribute was set to 2. The CVE-2021-42291 checks for LDAP add operations on computer objects are switched off: nothing is blocked and no audit event is written. Microsoft calls the setting not secure and acceptable only as a temporary troubleshooting step.

Which events stop after event 3052?

Microsoft says only that no events will be logged for the add check. That covers the denied and audited add requests, 3044 and 3047, and by the protocol specification, which skips the whole add check at this value, 3045 and 3048 as well. The implicit owner check for modify requests, events 3046 and 3049, depends on character 29 and is announced separately (3053, 3054, 3055).

How do I find out who switched the check off?

Event 3052 does not say. With an audit entry on the Directory Service object of the configuration partition and Audit Directory Service Changes turned on, the domain controller that received the write logs event 5136 with the old and new dSHeuristics string and the account.

How do I turn the check back on?

Set character 28 of dSHeuristics to 1 for enforcement (or 0 for audit mode), keeping every other character of the string. KB5008383 also repeats that in a string of 10 characters or more the 10th must be 1, and in one of 20 or more the 20th must be 2.

References