Skip to content

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.

ad-kit check maq

Prerequisite

Requires a valid Standard User account (authenticated).

Commands run

ad-kit runs NetExec directly:

nxc ldap <dc_ip> -u <username> -p <password> -M maq

If the Machine Account Quota is greater than zero, ad-kit attempts to create a test machine account:

nxc ldap <dc_ip> -u <username> -p <password> -M add-computer -o NAME=<name> PASSWORD=<password>

It then authenticates as the machine account over SMB:

nxc smb <dc_ip> -u <name>$ -p <password>

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:

  1. Reads the ms-DS-MachineAccountQuota value and the group permitted to join machines.
  2. If the quota is greater than zero, attempts to create a test machine account.
  3. 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

References