MachineAccountQuota
Last updated
Was this helpful?
Last updated
Was this helpful?
MachineAccountQuota (MAQ) is a domain level attribute that by default permits unprivileged users to attach up to 10 computers to an Active Directory (AD) domain ()
There are multiple ways attackers can leverage that power.
, to domain controllers using LDAPS, and take advantage of authenticated sessions to create a domain computer account. This account can then be used as a foothold on the AD domain to operate authenticated recon (i.e. for example)
Create a computer account and use it for when leveraging owned accounts with sufficient permissions (i.e. ACEs like GenericAll
, GenericWrite
or WriteProperty
) against a target machine
Create a computer account and use it for a attack when leveraging owned accounts with sufficient permissions (i.e. the SeEnableDelegationPrivilege
user right)
Profit from special rights that members of the Domain Computers group could inherit
Profit from special rights that could automatically be applied to new domain computers based on their account name
The module (for ) can be used to check the value of the MachineAccountQuota attribute.
Alternatively, it can be done manually with the following Python code.
The script (Python) can be used to create a computer account, using the credentials of a domain user the the MachineAccountQuota domain-level attribute is set higher than 0 (10 by default).
Testers can also use instead with the --add-computer
option, like
When using 's addcomputer script for the creation of a computer account, the "SAMR" method is used by default (instead of the LDAPS one). At the time of writing (10th of December, 2021), the SAMR method creates the account without SPNs.
The module (PowerShell) can be used to create a domain computer account.