Machine Account Quota Check
Retrieves the domain Machine Account Quota (MAQ) and tests whether an authenticated user can create, authenticate with, and delete a machine account.
Prerequisite
Requires a valid Standard User account (authenticated).
Commands run
ad-kit runs NetExec directly:
If the Machine Account Quota is greater than zero, ad-kit attempts to create a test machine account:
It then authenticates as the machine account over SMB:
And removes the test machine account:
nxc ldap <dc_ip> -u <username> -p <password> -M add-computer -o NAME=<name> PASSWORD=<password> DELETE=True
What it checks
ad-kit:
- Reads the
ms-DS-MachineAccountQuotavalue and the group permitted to join machines. - If the quota is greater than zero, attempts to create a test machine account.
- Authenticates as the machine account, then deletes it and records the cleanup method.
How it works
By default Active Directory allows any authenticated user to create up to 10 computer accounts. This simplifies workstation provisioning but is often unnecessary in mature environments. A non-zero quota grants machine-account creation domain-wide, which can be combined with Resource-Based Constrained Delegation or other Kerberos techniques to extend a foothold.
Why it matters
Machine-account creation is a building block for several escalation paths and represents a deviation from least privilege when left at its default.
Findings
| Finding ID | Title |
|---|---|
| MAQ-001 | Machine Account Quota Permits Machine Creation |
Tooling
- NetExec: used by this check.