Skip to content
System hardening
ASD ISMISM-1845

ASD ISM 1845 Remove disabled user accounts from all security groups

What it says

When a user account is disabled, it is removed from all security group memberships.

Quoted as published. Everything else on this page is written by Control Stack.

In plain English

Remove a user account from every security group as part of disabling it, because disabling alone leaves all of its group memberships in place.

When a user account is disabled, it must also be removed from all of its security group memberships. Disabling stops sign-in but leaves every membership in place, so removal is a separate step. User accounts include service accounts and privileged accounts. Security groups are those used to grant access; distribution groups, used only for email, are not covered. Each account keeps one primary group, normally Domain Users, which can be removed only after another group is made primary, so make a group that grants no access primary.

Why it matters

A disabled account that keeps its groups regains all of that access the moment it is re-enabled, whether by mistake or by an attacker able to enable accounts. With memberships removed, re-enabling it restores none of that access.

How to implement

  1. Find every way user accounts get disabled.

    Include the leaver process, helpdesk procedures, scripts, identity management workflows, and jobs that disable accounts to meet ISM-1404, ISM-1647 and ISM-1648. Each path needs the removal step, or accounts it disables keep their groups.

  2. Build the removal into the action that disables the account.

    Have the script, workflow or identity tool save the account's groups to the ticket, not a directory attribute others can read, then remove every security group membership, in every domain. If a bought tool cannot, run a script triggered by its disable event.

  3. Handle the primary group as well.

    The domain will not remove an account from its primary group, normally Domain Users. Add the account to a dedicated global security group with no access, make that its primary group, then remove Domain Users, so no membership that grants access remains.

  4. Clear the accounts that are already disabled.

    Query every disabled user account in each domain, with its memberships and primary group, and apply the same steps. Leave accounts the domain creates disabled, such as krbtgt, as they are: nobody disabled them, and krbtgt's membership of the Denied RODC Password Replication Group protects it.

Keep it running

Query at an interval you set for disabled user accounts that still hold security group memberships, including a primary group that grants access, and fix each one. A new way of disabling accounts should trigger a check that it removes memberships too.

Evidence and audit

  1. Check 1 of 3What an auditor asks for

    Ask for

    A live query of every disabled user account in each domain, with its group memberships and primary group.

    Look at

    Any disabled account still in a security group, setting aside accounts the domain creates disabled such as krbtgt and Guest, and checking primary groups too, since membership lists leave them out.

    Good evidence

    No disabled user account is a member of any security group, apart from a primary group that grants no access.

  2. Check 2 of 3What an auditor asks for

    Ask for

    Account-disabled events from the domain controllers' central logs (ISM-1830) over a recent period, matched with group membership removal events for the same accounts.

    Look at

    Whether each account lost its memberships when it was disabled, across manual, scripted and automatic disabling.

    Good evidence

    Every account disabled in the period, including those disabled automatically for inactivity, had all its security group memberships removed when it was disabled, not at a later clean-up.

  3. Check 3 of 3What an auditor asks for

    Ask for

    A test account with several group memberships, disabled through each disabling path in turn.

    Look at

    The account's memberships and primary group after each path disables it.

    Good evidence

    Every path leaves the test account with no security group memberships apart from a primary group that grants no access.

Mappings

Closest match in ISO/IEC 27001: A.5.16, Identity management, which this control partially meets.

ISO 27001

ISO/IEC 27001: 2 mappings

  • A.5.16Identity managementPartially meets
  • A.5.18Access rightsPartially meets

Mappings show how controls relate across frameworks. They do not imply full equivalence or certification.