1. Resources
  2. Detection rules
  3. Computer Object Created With Unauthorized Attributes (CVE-2021-42291)

Computer Object Created With Unauthorized Attributes (CVE-2021-42291) detection rules

A user who may create computer accounts could set security-sensitive attributes or a permissive security descriptor on them. Updated domain controllers audit or block this and log Directory Service events 3044 to 3049.

Platform
Active Directory
Severity
Medium
Log source
Directory Service event log (domain controllers)
Last updated
MITRE ATT&CK technique
T1098Account Manipulation
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
An account that may create computer objects and a domain controller that audits the CVE-2021-42291 checks instead of enforcing them.
Impact
The attacker holds a computer account whose security-sensitive attributes or security descriptor they chose, which Microsoft describes as an elevation of privilege in certain scenarios.
Response
Disable the computer account, reset the password of the user who made the request, and correct or delete the object.
Mitigation
Install the current updates and set characters 28 and 29 of dSHeuristics to enforcement once the audit events are resolved.
Event IDs
30473048304930443045304630523055

How the attack works

CVE-2021-42291 is a security bypass in the way Active Directory handled the creation of computer objects. Microsoft describes it as a vulnerability that allows certain users to set arbitrary values on security-sensitive attributes of specific objects. A user who has enough rights to create a computer-derived object, for example the permission to create computer objects in an organizational unit, could create the account with an LDAP add call that allows overly permissive access to its security descriptor. Creators and owners could also modify security-sensitive attributes after creating the account. Microsoft states that this can be leveraged to perform an elevation of privilege in certain scenarios.

The fix has two parts, both controlled by the forest-wide dSHeuristics attribute. The first adds authorization checks when a user without domain administrator rights creates a computer-derived object with an LDAP add operation (character 28). The second temporarily removes the implicit owner privileges when such a user writes the security descriptor of an object with an LDAP modify operation, and checks whether the write would be allowed without them (character 29). Each part runs in audit mode by default on domain controllers with the updates of November 9, 2021 or later. In audit mode the request succeeds and the domain controller logs a warning. In enforcement mode the request is denied and logged. A third value switches the check and its events off, which Microsoft does not recommend.

The events are written to the Directory Service log of the domain controller that received the request. Events 3047, 3048 and 3049 say that an add or modify request would have been blocked and was allowed because of audit mode. Events 3044, 3045 and 3046 say that the request was denied. Each names the object, its class, the user who made the request and the client IP address. Events 3051, 3052, 3054 and 3055 announce that one of the two checks is not enforced or is switched off. This page is the companion of Computer Account Created by a User, which reports every computer account a user creates. The events here report the smaller set in which the creator asked for more than the default.

What an attacker needs

  • An account that may create computer objects, through the machine account quota of the domain or through delegated create rights on an organizational unit.
  • A domain controller that does not enforce the checks. It is missing the November 2021 or later updates, or the two dSHeuristics characters are still at audit mode or set to disabled.

Impact

The attacker ends up with a computer account whose security-sensitive attributes or security descriptor they chose. Microsoft describes the result as an elevation of privilege in certain scenarios. In practice the account is a controlled identity with settings that the default permissions of its creator would not have allowed, and it can serve the attack chains that start from a computer account.

Detection rules

LDAP Add or Modify That Would Have Been Blocked (CVE-2021-42291 Audit)

Detects events 3047, 3048 and 3049 in the Directory Service log of a domain controller. They are the audit events of the protections for CVE-2021-42291. Event 3047 says that an LDAP add request would have been blocked because the client did not have permission to write one or more attributes included in the request. Event 3048 says the same for an add request that included an nTSecurityDescriptor the client had no explicit permission to write in full. Event 3049 reports an LDAP modify request of that kind on an existing object. In all three the request was allowed to proceed because the directory is in audit-only mode for the check, so the object exists with the settings that were asked for. The event text names the object, its class, the user and the client IP address. Microsoft's article gives the event text and not the names of the event data fields, and it does not name the event source, so the rule matches the event IDs together with the provider that the other rules for this log use. The events exist on domain controllers with the updates of November 9, 2021 or later.

LevelMediumStatusExperimentalLog sourceDirectory Service event log (domain controllers)
title: LDAP Add or Modify That Would Have Been Blocked (CVE-2021-42291 Audit)
id: babc83ef-6dae-46fb-918f-e8a96537ef42
status: experimental
description: >-
  Detects events 3047, 3048 and 3049 in the Directory Service log of a
  domain controller. They are the audit events of the protections for
  CVE-2021-42291. Event 3047 says that an LDAP add request would have been
  blocked because the client did not have permission to write one or more
  attributes included in the request. Event 3048 says the same for an add
  request that included an nTSecurityDescriptor the client had no explicit
  permission to write in full. Event 3049 reports an LDAP modify request of
  that kind on an existing object. In all three the request was allowed to
  proceed because the directory is in audit-only mode for the check, so the
  object exists with the settings that were asked for. The event text names
  the object, its class, the user and the client IP address. Microsoft's
  article gives the event text and not the names of the event data fields,
  and it does not name the event source, so the rule matches the event IDs
  together with the provider that the other rules for this log use. The
  events exist on domain controllers with the updates of November 9, 2021
  or later.
references:
  - https://support.microsoft.com/en-us/topic/kb5008383-active-directory-permissions-updates-cve-2021-42291-536d5555-ffba-4248-a60e-d6cbc849cde1
  - https://attack.mitre.org/techniques/T1098/
author: Forestall
date: 2026-11-18
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1098
logsource:
  product: windows
  service: directory-service
detection:
  selection:
    Provider_Name|contains: DomainService
    EventID:
      - 3047
      - 3048
      - 3049
  condition: selection
falsepositives:
  - Domain join, imaging and provisioning tools that create computer accounts with attributes or a security descriptor beyond what their account may write. Microsoft expects these and recommends delegating the missing permission on a dedicated organizational unit. Exclude what remains by the user in the event.
level: medium

False positives

  • Domain join, imaging and provisioning tools that create computer accounts with attributes or a security descriptor beyond what their account may write. Microsoft expects these and recommends delegating the missing permission on a dedicated organizational unit. Exclude what remains by the user in the event.

LDAP Add or Modify Denied by the CVE-2021-42291 Permission Checks

Detects events 3044, 3045 and 3046 in the Directory Service log of a domain controller. They are written in the enforcement mode of the protections for CVE-2021-42291. Event 3044 says that an LDAP add request was denied because the client did not have permission to write one or more attributes included in the request. Event 3045 says that an add request was denied because it included an nTSecurityDescriptor the client had no explicit permission to write in full. Event 3046 reports a denied LDAP modify request of that kind on an existing object. Each event is an attempt, by a user without domain administrator rights, to give a computer-derived object settings beyond what that user may write. The event text names the object, its class, the user and the client IP address. Microsoft's article gives the event text and not the names of the event data fields or the event source, so the rule matches the event IDs together with the provider that the other rules for this log use. The events appear only where character 28 or 29 of dSHeuristics is set to 1.

LevelMediumStatusExperimentalLog sourceDirectory Service event log (domain controllers)
title: LDAP Add or Modify Denied by the CVE-2021-42291 Permission Checks
id: 8367878d-c9a9-45eb-8c14-3e9e0f303858
status: experimental
description: >-
  Detects events 3044, 3045 and 3046 in the Directory Service log of a
  domain controller. They are written in the enforcement mode of the
  protections for CVE-2021-42291. Event 3044 says that an LDAP add request
  was denied because the client did not have permission to write one or
  more attributes included in the request. Event 3045 says that an add
  request was denied because it included an nTSecurityDescriptor the client
  had no explicit permission to write in full. Event 3046 reports a denied
  LDAP modify request of that kind on an existing object. Each event is an
  attempt, by a user without domain administrator rights, to give a
  computer-derived object settings beyond what that user may write. The
  event text names the object, its class, the user and the client IP
  address. Microsoft's article gives the event text and not the names of
  the event data fields or the event source, so the rule matches the event
  IDs together with the provider that the other rules for this log use.
  The events appear only where character 28 or 29 of dSHeuristics is set to
  1.
references:
  - https://support.microsoft.com/en-us/topic/kb5008383-active-directory-permissions-updates-cve-2021-42291-536d5555-ffba-4248-a60e-d6cbc849cde1
  - https://attack.mitre.org/techniques/T1098/
author: Forestall
date: 2026-11-18
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1098
logsource:
  product: windows
  service: directory-service
detection:
  selection:
    Provider_Name|contains: DomainService
    EventID:
      - 3044
      - 3045
      - 3046
  condition: selection
falsepositives:
  - A provisioning or deployment process that was not adjusted before enforcement was switched on and now fails. Microsoft recommends delegating the missing permission on a dedicated organizational unit, not adding the account to Domain Admins.
level: medium

False positives

  • A provisioning or deployment process that was not adjusted before enforcement was switched on and now fails. Microsoft recommends delegating the missing permission on a dedicated organizational unit, not adding the account to Domain Admins.

CVE-2021-42291 Permission Checks Switched Off

Detects events 3052 and 3055 in the Directory Service log of a domain controller. Event 3052 says that the directory has been configured to not enforce per-attribute authorization during LDAP add operations and that no events will be logged and no requests blocked. Event 3055 says the same for implicit owner privileges when the nTSecurityDescriptor attribute is set or modified. Microsoft logs both as errors and calls the setting not secure. They are written when character 28 or 29 of the forest-wide dSHeuristics attribute is changed to 2, which disables the check and its audit events. After that a user who may create computer accounts can again set attributes and security descriptors beyond their permissions, and events 3044 to 3049 no longer report it. The warning events 3051 and 3054, which announce audit mode, are the default state of an updated forest and are not matched. Microsoft's article does not name the event source, so the rule matches the event IDs together with the provider that the other rules for this log use. The directory change itself is covered by the attack dSHeuristics Modification.

LevelMediumStatusExperimentalLog sourceDirectory Service event log (domain controllers)
title: CVE-2021-42291 Permission Checks Switched Off
id: 5db4e520-9d95-403e-8bed-49f9767acc42
status: experimental
description: >-
  Detects events 3052 and 3055 in the Directory Service log of a domain
  controller. Event 3052 says that the directory has been configured to
  not enforce per-attribute authorization during LDAP add operations and
  that no events will be logged and no requests blocked. Event 3055 says
  the same for implicit owner privileges when the nTSecurityDescriptor
  attribute is set or modified. Microsoft logs both as errors and calls
  the setting not secure. They are written when character 28 or 29 of the
  forest-wide dSHeuristics attribute is changed to 2, which disables the
  check and its audit events. After that a user who may create computer
  accounts can again set attributes and security descriptors beyond their
  permissions, and events 3044 to 3049 no longer report it. The warning
  events 3051 and 3054, which announce audit mode, are the default state of
  an updated forest and are not matched. Microsoft's article does not name
  the event source, so the rule matches the event IDs together with the
  provider that the other rules for this log use. The directory change
  itself is covered by the attack dSHeuristics Modification.
references:
  - https://support.microsoft.com/en-us/topic/kb5008383-active-directory-permissions-updates-cve-2021-42291-536d5555-ffba-4248-a60e-d6cbc849cde1
  - https://learn.microsoft.com/en-us/windows/win32/adschema/a-dsheuristics
  - https://attack.mitre.org/techniques/T1098/
author: Forestall
date: 2026-11-18
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1098
logsource:
  product: windows
  service: directory-service
detection:
  selection:
    Provider_Name|contains: DomainService
    EventID:
      - 3052
      - 3055
  condition: selection
falsepositives:
  - A forest administrator who disables a check as a temporary troubleshooting step, which Microsoft describes as the only acceptable use. Confirm the change record and that the setting was restored.
level: medium

False positives

  • A forest administrator who disables a check as a temporary troubleshooting step, which Microsoft describes as the only acceptable use. Confirm the change record and that the setting was restored.

Triage

  • Read the object, its class, the user and the client IP address in the event. In events 3044 and 3047 the security descriptor that was attempted is included as well.
  • Decide whether the user is a provisioning, deployment or domain join account. Tools that create computer accounts with extra attributes are the routine source of these events.
  • For an audit event (3047 to 3049) the request succeeded. Read the new object in the directory, above all its security descriptor, its owner and its account control flags, and compare them with a computer account created the normal way.
  • Look for what the same user did next with the account, such as a rename (event 4781), a write of delegation attributes (event 5136) or service ticket requests (event 4769).
  • For the mode events (3051, 3052, 3054, 3055) find the change to dSHeuristics and who made it.

Response

Once the attack is confirmed:

  1. Disable the computer account that was created or changed and reset the password of the user who made the request.
  2. Correct the security descriptor and the attributes of the object, or delete the account once the evidence is preserved.
  3. Search for other computer accounts created by the same user and review them in the same way.
  4. Move the forest to enforcement mode for both checks once the legitimate provisioning cases are resolved.

Mitigation

  • Install the current updates on every domain controller and, once the audit events are resolved, set characters 28 and 29 of dSHeuristics to 1 so that both checks are enforced.
  • Set ms-DS-MachineAccountQuota to 0 and delegate the creation of computer accounts to a dedicated provisioning group on specific organizational units.
  • Resolve every audit event. Microsoft advises giving a provisioning process the specific permission it lacks on a dedicated organizational unit instead of adding it to Domain Admins.
  • Collect the Directory Service log of every domain controller.

Frequently asked questions

Do events 3047 to 3049 mean that the request was blocked?

No. They are the audit events. The domain controller detected a request that would have been blocked and allowed it to proceed because the directory is in audit-only mode for the check. The object was created or changed. Events 3044 to 3046 are the ones that report a denied request, and they appear only in enforcement mode.

Which setting moves a forest from audit mode to enforcement?

Characters 28 and 29 of the dSHeuristics attribute on the Directory Service object in the configuration partition. Character 28 controls the checks for LDAP add operations and character 29 the removal of implicit owner privileges for LDAP modify operations. In both, 0 is audit mode, 1 is enforcement and 2 disables the check and its events.

Who triggers these events in normal operation?

Accounts without domain administrator rights that create computer objects and set more than their permissions allow, typically domain join, imaging or provisioning tools. Microsoft's guidance is to read the event, see which permission is missing and delegate that permission on a dedicated organizational unit.

Is there a public report of this vulnerability being used in an attack?

This page does not rely on one. The description follows Microsoft's article for CVE-2021-42291, which explains what the checks audit and block. The events are worth collecting because they report the precondition, a user who creates computer accounts with settings beyond the default.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.