Fact-checked by Grok 2 weeks ago

Security Identifier

A Security Identifier (SID) is a unique, immutable alphanumeric string used in Windows operating systems to identify security principals, such as user accounts, groups, computer accounts, and processes, enabling the system to enforce and . SIDs are issued by a security authority, such as a local Security Accounts Manager () database or a in , and are stored in binary format within security tokens or directories like the . Unlike user names, which can change, SIDs remain constant throughout the lifetime of a security principal, ensuring reliable identification even if accounts are renamed or migrated across domains.

Historical Development

Security Identifiers were introduced in , released in 1993, as a core component of the operating system's advanced model designed to support secure multi-user and networked environments. The structure of a consists of a revision level, an identifier authority value, and a variable number of subauthority values, typically represented in string format as S-R-I-S1-S2-...-Sn. For domain-based SIDs, the domain portion uniquely identifies the security authority, while the relative identifier (RID)—ranging from 0 to 2,147,483,647 and managed by a domain's RID master—distinguishes the principal within that domain and is never reused to prevent conflicts. Local SIDs, used on standalone systems, follow a similar format but reference the local machine's authority, such as S-1-5-21 for machine-specific accounts. In the Windows security model, play a central role in by being embedded in access tokens generated during user logon, which the system references to grant or deny permissions to resources like files, registry keys, and services based on lists (ACLs). Well-known SIDs, which are predefined and consistent across all Windows installations, represent common entities without relying on specific domains; examples include S-1-1-0 for the "Everyone" group, S-1-5-32-544 for the built-in Administrators group, and S-1-5-18 for the Local System account. This design supports scalability in enterprise environments, where SIDs facilitate secure delegation and auditing while minimizing the risk of identifier collisions in distributed systems.

Introduction

Definition and Purpose

A is a unique, variable-length value used in Windows NT-based operating systems to identify principals, such as users, groups, and services. Issued by an authority like a local authority or , a SID serves as the definitive mechanism to distinguish these entities within the model, ensuring that each principal has a persistent and non-reusable identifier. The primary purposes of include enabling by specifying permissions in resource settings, facilitating processes during logon, and providing unique identification that remains consistent across domains and machines. Unlike names, which can change over time or be duplicated in different contexts, SIDs are immutable and scoped to their issuing authority, prioritizing enforcement over human-readable display. This distinction allows SIDs to function reliably in security descriptors, where they trustees without reliance on transient naming conventions. In , a SID consists of a revision byte, a subauthority count byte, an identifier authority (typically 6 bytes), and a variable array of subauthority values (each 4 bytes), forming a compact structure for efficient storage and comparison. Within the broader Windows architecture, SIDs integrate with access tokens—which contain the SID of the authenticated user and associated groups—and access control lists (ACLs), where they define allowable operations on securable objects, thereby enforcing the overall framework.

Historical Development

Security Identifiers (SIDs) were introduced with as a core component of the new security model, designed to provide unique and immutable identifiers for security principals such as users, groups, and accounts. The model's adoption of SIDs enabled more scalable in multi-user environments, emphasizing immutability to prevent reuse of deleted account identifiers and reduce security risks. The SID structure was formalized in the to include a revision number, identifier authority, and up to 15 subauthority values, ensuring consistent representation across systems. (2000) further evolved SIDs through integration with , introducing domain-specific SIDs for enterprise-wide management and the SID History attribute to preserve previous SIDs during domain migrations, facilitating seamless transitions without re-permissioning resources. This enhancement addressed the challenges of upgrading from domains to , allowing migrated accounts to retain access to legacy resources via the SID History list. Later versions built on this foundation to support modern security needs. Windows Vista and Server 2008 (2007) introduced service SIDs to enable service isolation, assigning unique identifiers to services for granular control over network access and resource restrictions without relying on shared user accounts. In Windows 10 and later (2015 onward), capability SIDs were added to represent app-specific permissions, such as access to documents or location services, providing unforgeable tokens that enhance security in the Universal Windows Platform ecosystem. The overarching design rationale for has been to create domain-independent identifiers that avoid dependence on changeable elements like usernames or relative IDs, supporting large-scale while maintaining through features like History. This evolution reflects Microsoft's ongoing efforts to balance scalability, , and migration ease in Windows operating systems.

SID Composition

Core Components

The Security Identifier (SID) is a variable-length structure in the Windows operating system, designed to uniquely identify security principals such as users, groups, or services. Its format ensures hierarchical uniqueness across different authorities and scopes, with a total length determined by the number of subauthorities included. The SID begins with a 1-byte revision number field, which specifies the structure version and is always set to 1 (0x01) for all current Windows implementations. Immediately following is a 1-byte subauthority count field, an unsigned integer value ranging from 0 to 15 (though 0 is a degenerate case rarely used in practice) that indicates the number of subauthority values present in the structure. These initial two fields form a fixed 2-byte header. The next component is the 6-byte identifier authority field, a fixed-size array of bytes that distinguishes the issuing authority responsible for generating the SID; for example, the NT Authority is represented by the byte sequence {0x00, 0x00, 0x00, 0x00, 0x00, 0x05}. This field is typically zero-padded in the first five bytes, with the authority value in the sixth byte for standard Windows SIDs. Following the identifier authority is the variable-length subauthority , consisting of up to 15 entries, each a 4-byte (32-bit) unsigned known as a relative identifier (RID). These values form a hierarchical that narrows down the identification of , with earlier entries often representing or authority-specific components and later ones providing finer granularity. The 's length is exactly the value specified in the subauthority count field, making the total SID size 8 bytes plus 4 bytes per subauthority (up to a maximum of 68 bytes). Within the subauthority array, the Relative Identifier (RID) is specifically the final 4-byte value, which uniquely identifies the security principal relative to the preceding subauthorities and the issuing authority's scope, such as a user account within a domain. For clarity, the binary layout of a SID can be summarized in the following table:
FieldSize (bytes)Description
Revision1Version number (always 1 for current SIDs).
Subauthority Count1Number of subauthority values (0-15).
Identifier Authority6Issuing authority identifier (e.g., {0,0,0,0,0,5} for NT Authority).
Subauthority Array4 × countArray of 32-bit RIDs forming the hierarchical path; last is the RID.
This structure is reflected in the human-readable string representation of a SID, formatted as S-R-I-S1-S2-...-Sn (where S is the revision, R is the subauthority count, I is the identifier authority, and S1 to Sn are the subauthority values including the RID), such as S-1-5-21-1234567890-1234567890-1234567890-1001 for a .

Identifier Authority

The identifier in a () serves as the top-level component that specifies the issuing entity or , thereby ensuring the global uniqueness of the across different systems and contexts. This 48-bit value, typically represented as a small in the portion of the format (e.g., S-1-*), distinguishes between various categories of principals, such as built-in accounts, universal groups, or -specific entities, preventing identifier collisions in Windows operations. Common predefined values for the identifier authority include 1, which corresponds to the World Authority and is used for universal like S-1-1-0 representing the "Everyone" group applicable to all users; 5, known as the NT , which prefixes SIDs for Windows-specific built-in accounts and groups, such as S-1-5-32 for the Builtin ; and 6, the Non-Unique Authority, employed for relative or domain-relative identifiers where uniqueness is maintained through prefixing with a domain SID rather than global allocation. These values interact with subsequent subauthority fields to form complete SIDs; for instance, under authority 5, subauthorities like 32 denote well-known built-in domains, while 21 indicates machine or domain-specific RIDs that are non-unique outside their issuing . The allocation of identifier authority values has been centrally managed by since the inception of the Windows NT security model to promote and avoid overlaps between different SID issuers. Reserved ranges, such as those below 32 for well-known authorities, are predefined in Microsoft's protocol specifications to guarantee consistent interpretation across operating systems, with no provision for third-party assignment to maintain integrity.

Subauthority Values

The subauthorities in a form a of up to 15 32-bit unsigned integers (DWORDs), with the exact number specified by the SubAuthorityCount field in the SID structure. These values follow the and provide the hierarchical specificity needed to distinguish individual principals within that authority's . The first subauthority typically indicates the domain or group type, such as 21 for domain-issued SIDs or 32 for built-in local groups, while subsequent values build the , culminating in the last subauthority, known as the Relative Identifier (RID). In domain SIDs, the subauthorities encode a multi-level hierarchy where the initial values (after the first) represent a unique domain identifier—often a 96-bit random number split across three 32-bit subauthorities—followed by the RID for the specific object. This structure ensures global uniqueness by nesting the principal's identifier within its issuing domain's context, preventing collisions across different authorities. Relative Identifiers (RIDs) are allocated from predefined ranges to maintain consistency and avoid overlap. Well-known RIDs, reserved for predefined accounts and groups, occupy the range 0 through 999; for example, RID 500 denotes the built-in account, while 544 identifies the local Administrators group. User-assigned RIDs, used for custom accounts and groups in , begin at 1000 and are dynamically allocated in blocks by the domain's RID master to domain controllers, ensuring sequential and unique assignment within the . Special cases include null RIDs, which have a value of 0 and are used for generic or placeholder groups that do not represent specific principals, such as the Null SID (S-1-0-0) indicating no security context or the World SID (S-1-1-0) encompassing all users. These null values simplify for broad categories without requiring individual identification. The number of subauthorities directly influences the SID's overall and complexity, as each additional 32-bit value extends the binary structure and the corresponding string representation (e.g., S-R-I-Y1-Y2-...-Yn). SIDs typically have 1 to 15 subauthorities in practice, with algorithms extracting the domain portion from all but the final value to reconstruct the efficiently.

SID Categories

Well-Known SIDs

Well-known security identifiers () are predefined values that represent generic users, groups, and logon types, applicable universally across all Windows installations. These feature fixed structures, with many falling under the NT Authority (prefix S-1-5), ensuring their values remain constant and independent of local machine or domain configurations. This design promotes consistency in security modeling, allowing the operating system to reference standard principals without variability introduced by environment-specific factors. These are hardcoded directly into the Windows and subsystems, serving as foundational elements for bootstrap security. They enable the assignment of permissions to essential system resources, such as core files, registry keys, and services, during system initialization and runtime operations. By using immutable identifiers, Windows avoids dependencies on dynamically generated SIDs, reducing risks in access control and simplifying policy enforcement across diverse deployments. The relative identifier (RID), encoded as the final subauthority value in the SID structure, uniquely distinguishes each well-known principal within its authority. Below is a table of major well-known , focusing on those with fixed RIDs under key authorities like (5) and (1), along with their purposes. These examples illustrate common system accounts, logon sessions, and built-in groups used in .
SIDRIDPurpose
S-1-1-00Everyone (World): Represents a group encompassing all users, including and authenticated, for broad permission grants.
S-1-5-11Dialup: Identifies users who log on via dial-up connections, used in legacy network access controls.
S-1-5-22Network: Denotes users authenticating over a network, excluding interactive or local logons, for remote access policies.
S-1-5-33Batch: Covers logons through batch queue facilities, such as scheduled tasks, to restrict automated processes.
S-1-5-44Interactive: Applies to users logging on directly at the console, distinguishing local interactive sessions.
S-1-5-66: Groups all principals logging on as services, enabling secure execution of background processes.
S-1-5-77 Logon: Represents unauthenticated or null sessions, often denied access to sensitive resources by default.
S-1-5-1111Authenticated Users: Includes all users who have successfully authenticated, excluding guests and , for post-login permissions.
S-1-5-1818: A high-privilege used by the operating for functions, equivalent to full administrative .
S-1-5-1919: A low-privilege service for local, non-networked operations, limiting exposure in case of .
S-1-5-2020: Similar to Local Service but for network-accessible operations, using the machine for authentication.
S-1-5-32-544544Administrators (Built-in): The local Administrators group, granting full to members for management tasks.
These SIDs' fixed nature, as defined by the relative identifier in the subauthority, ensures they can be programmatically generated and compared using Windows APIs like CreateWellKnownSid, facilitating reliable security implementations.

Domain and Machine SIDs

Domain SIDs are security identifiers issued by Active Directory domain controllers to uniquely identify users, groups, and other security principals within a specific domain. They follow the format S-1-5-21-domain_identifier-RID, where the domain identifier consists of a random 96-bit value (represented as three 32-bit subauthorities, such as 21-1004336348-1177238915-682003330) that is unique to each domain, and the relative identifier (RID) is a unique value assigned to the principal within that domain. This structure ensures that domain SIDs are authoritative across the enterprise, facilitating consistent identification in networked environments. Machine serve as the local equivalent for security principals on individual computers, whether standalone or joined to a . They share a similar format, S-1-5-21-machine_identifier-RID, but use a machine-specific random generated during operating system to distinguish local accounts and groups. RIDs for these SIDs are allocated sequentially within the local subauthority space, typically starting from 1000 for accounts. The generation process for domain SIDs begins with a creating a unique random domain identifier upon domain establishment, after which RIDs are assigned by the domain's RID role holder as new principals are created. In contrast, machine SIDs are produced by the Local Security Authority (LSA) subsystem at setup time, using a randomly generated 96-bit to ensure per-machine uniqueness without reliance on . A key difference lies in their scope: domain SIDs enable cross-machine trust by allowing security principals to be recognized and authorized seamlessly across all domain-joined systems, supporting centralized management in networked setups. Machine SIDs, however, isolate to the local computer, preventing local principals from being directly accessible or trusted on other machines and thus maintaining separation in standalone configurations.

Service and Capability SIDs

Service SIDs, also known as per-service , are security identifiers designed to provide isolation for Windows services by assigning each service a unique identity that enables least-privilege access to system resources. These SIDs follow the format S-1-5-80 followed by five 32-bit values derived from a cryptographic of the service's binary name, ensuring uniqueness without relying on shared accounts like . Introduced in and , this mechanism allows services to authenticate and access resources directly under their own , reducing the by avoiding the need for elevated or shared credentials. The prefix S-1-5-80 identifies the NT Service authority, with S-1-5-80-0 specifically representing the "All Services" group that encompasses all configured service processes on the system. For example, the Database Engine service uses a per-service SID in the form NT Service\MSSQL$<instance_name>, which translates to an S-1-5-80-based identifier unique to the instance, granting it only the permissions necessary for database operations such as file access and network communication. Similarly, (IIS) application pools employ virtual accounts with SIDs generated from the pool name, prefixed by NT Service, to isolate web applications and prevent one pool from accessing another's resources. This approach facilitates service isolation, where access control lists (ACLs) on files, registry keys, or other objects can explicitly reference the service SID to enforce granular permissions without exposing broader system accounts. Capability SIDs extend this isolation model to modern applications, particularly those in app containers, by representing specific permissions or "capabilities" such as to the , pictures , or removable . These SIDs use the prefix S-1-15-3, where 15 denotes the App Package Authority and 3 indicates a capability subauthority, followed by hashed values (often SHA-256 derivatives) tied to the capability declaration in the app's . Introduced in and , capability SIDs enable apps to request and receive only the minimal set of rights needed, avoiding the use of overly permissive well-known SIDs and enhancing in sandboxed environments like (UWP) apps packaged as AppX files. For instance, an app requiring network access might include the capability SID for "internetClient," formatted as S-1-15-3 with subauthorities representing the well-known constant SECURITY_CAPABILITY_INTERNET_CLIENT (0x00000001), which is then added to the app's upon declaration and verification during installation. In practice, capability SIDs are derived from the app package's and , ensuring that permissions are scoped to the specific AppX package and cannot be shared across unrelated apps, thereby mitigating risks from malicious or compromised software. These SIDs do not resolve to human-readable names by design, maintaining their immutability and preventing enumeration attacks, while functions like DeriveCapabilitySidsFromName allow developers to generate and validate them programmatically for custom capabilities. By integrating with app container security boundaries, capability SIDs support a declarative model where apps declare needs in their package, and the enforces access at , promoting secure-by-default development for , , and interactions.

Applications in Security

Access Control Lists

Access control lists () are integral to the Windows security model, serving as mechanisms to define permissions on securable objects such as files, registry keys, and processes. An consists of a sequence of access control entries (), where each specifies security permissions for a particular identified by a security identifier (SID). There are two primary types of : the discretionary (DACL), which governs access rights by allowing or denying operations, and the system (SACL), which controls auditing of access attempts. In a DACL, each ACE references a SID to designate the trustee—such as a , group, or logon session—and associates it with an that enumerates specific , including read, write, execute, or full . For instance, an access-allowed ACE grants permissions to the trustee's SID, while an access-denied ACE explicitly revokes them, with the system evaluating ACEs in order until access is fully resolved. Similarly, in an SACL, ACEs use SIDs to specify which trustees' actions should trigger events, such as success or failure logs for file modifications. This SID-based structure ensures precise attribution of permissions and audits to principals without relying on transient names. A practical example is a file's DACL granting full control to the built-in Administrators group, whose well-known SID is S-1-5-32-544. This would include the SID S-1-5-32-544 paired with an access mask enabling read, write, delete, and execute operations, allowing any member of the group to manage the file comprehensively. In contrast, an SACL might audit write attempts by the same SID to log administrative changes for compliance purposes. The distinction between discretionary and system ACLs lies in their management and scope: DACLs are modifiable by the object's owner, enabling user-defined access policies tied to for flexible control, whereas SACLs are typically administered by system administrators to enforce auditing without altering access. This separation allows to support both owner-centric permissions in DACLs and system-wide monitoring in SACLs, enhancing granularity on securable objects.

Authentication and Authorization

During the process in Windows, when a user logs on, the Local Security Authority Subsystem Service (LSASS) verifies the provided credentials against a security database and constructs an to represent the user's security context. This encapsulates the user's primary , which uniquely identifies the individual account, along with for all groups to which the user belongs, and any associated privileges derived from those memberships. The primary SID is typically composed of the domain SID followed by a relative identifier (RID) specific to the user, while group SIDs include both domain-local and domain-global groups, ensuring the token reflects the full scope of the user's permissions. Privileges, such as the right to back up files or log on interactively, are also populated into the token based on policy settings and group affiliations. Once the is created, it is attached to the user's initial and inherited by subsequent threads and child processes, serving as the basis for runtime authorization decisions throughout the session. In the authorization phase, the Windows security subsystem compares the within the access token against the listed in an object's (ACL) to evaluate access requests. If a matching SID grants the requested permissions—such as read, write, or execute—the access is allowed; otherwise, it is denied, enforcing without requiring repeated . This SID-based comparison occurs dynamically for each protected resource, like files, registry keys, or processes, ensuring efficient and secure enforcement of policies. In scenarios involving trusts between domains or forests, SID filtering is applied to mitigate risks by stripping unauthorized from incoming access tokens. This mechanism, enabled by default on external trusts since , removes SIDs originating from outside the trusting domain to prevent malicious of privileges, such as a compromised injecting high-privilege SIDs from another domain. The filtering process examines the token's SID history and group memberships, retaining only those verifiable within the trust boundary, and logs the action via event ID 4675 for auditing purposes. Administrators can selectively disable SID filtering using tools like Netdom, but this is generally discouraged due to heightened vulnerability. For example, consider a logging on to a -joined in the "Contoso" (with SID S-1-5-21-1004336348-1177238915-682003330); LSASS would generate a containing the user's primary (e.g., S-1-5-21-1004336348-1177238915-682003330-1001), supplemented by group SIDs like S-1-5-21-1004336348-1177238915-682003330-513 for Domain Users and any additional groups such as Domain Admins (S-1-5-21-1004336348-1177238915-682003330-512). This enables the user to domain resources, such as shared folders, where ACLs reference these for permission grants.

SID Resolution Processes

SID resolution processes in Windows involve translating between security identifiers (SIDs) and account names to facilitate security operations across local and domain environments. These processes are primarily handled by the Local Security Authority (LSA) subsystem, which provides APIs for bidirectional lookups. The key functions are LookupAccountName, which converts an account name to a SID, and LookupAccountSid, which performs the reverse by retrieving an account name from a SID. For local resolution, the LSA queries the Security Accounts Manager (SAM) database on the local machine, which stores information for built-in and local user accounts. Well-known SIDs, such as those for Everyone (S-1-1-0) or Local System (S-1-5-18), are resolved directly from predefined structures without database access. In domain environments, resolution extends to Active Directory (AD) via LDAP queries to domain controllers; the process first checks the primary domain, then trusted domains, and may involve the global catalog for forest-wide SIDs, including those in SID history attributes. If the account name is fully qualified (e.g., DOMAIN\username) or in UPN format (e.g., [email protected]), the lookup targets the specified domain directly. To optimize performance and reduce network traffic, the maintains an in-memory of successfully resolved SID-name pairs on member workstations and servers. This , with a default size of 4,096 entries in and later, stores entries in valid, stale, or expired states, with a time-to-live () of 7 days (10,080 minutes) and a 10-minute refresh extension. controllers do not use this , relying instead on direct access. Negative caching for unresolved isolated names (up to 8,000 entries) has a 2-hour to prevent repeated failed queries. Cache size can be adjusted via the LsaLookupCacheMaxSize registry value, and setting it to 0 disables caching entirely. Error handling in SID resolution returns specific Windows error codes via GetLastError when lookups fail. Common issues include ERROR_NONE_MAPPED (1332), indicating no account matches the or name, often due to deleted or non-existent principals. Buffer-related errors like ERROR_INSUFFICIENT_BUFFER (122) occur if output buffers are too small. For orphaned —those from deleted users or groups that persist in access control lists ()—resolution attempts fail with ERROR_NONE_MAPPED, as the SID no longer maps to an active account in or . In , however, decisions rely on direct binary SID comparisons between the caller's and the object's ACL, bypassing name resolution; thus, orphaned SIDs in ACLs do not grant or deny to any current principal but can complicate auditing and management by appearing as unresolved entries. Resolved SIDs from these processes are incorporated into access tokens during to represent and group identities for subsequent checks.

Management and Challenges

SID Generation and Uniqueness

are generated during the creation of accounts, groups, or machines, combining a fixed or randomly generated with a relative identifier (RID) to ensure uniqueness within their scope. For domain-based SIDs, the serves as the , which is established at domain creation and consists of the revision level (S-1), authority (5 for NT Authority), and three 32-bit subauthority values generated randomly to provide a for the . This is then concatenated with an RID assigned sequentially from the domain's RID pool. Local machine SIDs, used for standalone or non-domain-joined systems, follow a similar structure but are generated by the Local Security Authority () subsystem during operating system installation, incorporating random subauthority values unique to that machine installation. Uniqueness is guaranteed through centralized RID allocation managed by the RID Master (FSMO) role in domains. Domain controllers request blocks of RIDs from the RID Master, typically in increments of 500, drawn from a global pool ranging from 1,000 to 2,147,483,647 for security principals like users and groups. Each domain controller maintains its own local pool from this block and assigns RIDs sequentially without overlap, ensuring no duplicate SIDs within the domain. For local accounts on standalone machines, the Security Accounts Manager (SAM) database handles RID assignment sequentially from a similar starting range, with the machine SID prefix preventing collisions across systems. Machine SIDs are inherently unique per installation due to the random generation process by the LSA. Policies enforce strict non-reuse of to maintain security integrity; once an is assigned to an or group and subsequently deleted, it is not recycled or reassigned, even if the account is recreated. RID recycling is disabled by default in both and to prevent potential vulnerabilities from lingering permissions. In cases of RID pool exhaustion, administrative intervention is required, such as raising the pool ceiling, but this does not involve reusing prior RIDs. For managing SID uniqueness in deployment scenarios, such as imaging multiple machines, the NewSID utility was historically used to generate and apply a new machine post-cloning, but it has been deprecated and is no longer recommended or supported by due to untested compatibility with various deployment methods. Instead, the modern standard is to use with the /generalize option during image preparation, which removes the existing machine and other system-specific data, allowing a new unique to be generated automatically by the upon the first boot of each deployed instance.

Duplication Risks and Mitigation

Duplication of in Windows environments poses significant security and operational challenges, primarily arising when system uniqueness is not properly maintained during deployment or recovery processes. Common causes include cloning virtual machines (VMs) or physical systems without executing , which fails to regenerate the machine , leading to identical identifiers across instances. Manual attempts to copy SIDs, such as through unauthorized tools or scripts, can also introduce duplicates, though this is rare and unsupported. Additionally, improper backup restores—where a single image is deployed to multiple machines without generalization—exacerbate the issue by propagating the original . The impacts of SID duplication are multifaceted, often manifesting as authentication disruptions that hinder network operations. In domain-joined scenarios, duplicate SIDs can trigger and authentication failures, resulting in repeated credential prompts, denied access to shared resources, and inability to establish Remote Desktop sessions. These issues have become more pronounced following security updates released in 2024 and 2025 that enforce stricter SID validation. This may escalate to privilege elevation risks, where one machine inadvertently gains unauthorized access to another's resources due to overlapping identities, or cause outright logon denials across affected systems. Operationally, failover clustering can fail with "access denied" errors, and event logs may record Event ID 6167 indicating partial machine ID mismatches. Detection of duplicate SIDs typically involves querying individual machines and () for overlaps. The PsGetSid tool can retrieve the machine on a local system by running it without parameters, allowing administrators to compare outputs across devices for matches. In environments, Ntdsutil provides a structured approach: after launching ntdsutil and entering security account management mode, the check duplicate sid command scans for and lists duplicate SIDs in the SAM database or directory. queries, such as using PowerShell's Get-ADComputer with select name, SID, further aid in identifying overlaps by exporting and analyzing SID attributes for multiple objects. Mitigation strategies emphasize proactive and reactive measures to restore uniqueness. For existing duplicates on domain-joined systems, the recommended Microsoft-supported approach is to disjoin the computer from the , delete the corresponding computer account in if necessary, and rejoin the to generate a new machine . Alternatively, rebuild the system from a properly generalized image using . In cases of duplicate SIDs within the directory (e.g., for or group objects), use Ntdsutil's cleanup duplicate sid command to remove the redundant objects. Best practices include always running with the /generalize option before or to ensure SID regeneration, combined with unique machine naming conventions to facilitate tracking and prevent deployment errors. For ongoing prevention, organizations should audit deployment processes and avoid direct disk copies, opting instead for supported tools.

Migration and Translation

In environments, the SIDHistory attribute serves as a multivalued property on user and group objects, storing previous security identifiers from source domains to preserve access rights during migrations without requiring immediate updates to existing lists (ACLs). When a security principal is migrated to a new domain, generates a new primary for the object while appending the original SID—and potentially others from prior domains—to the SIDHistory attribute, enabling the principal to impersonate its former identity for legacy resource access. This mechanism ensures continuity of permissions on file shares, printers, and other secured objects that reference the old , avoiding disruptions in multi-domain or inter-forest scenarios. During trust configurations between forests, SID translation mechanisms determine how , including those in SIDHistory, are handled across boundaries to balance security and access needs. By default, trusts employ selective SID filtering, which strips foreign (including SIDHistory entries) from tokens to prevent unauthorized elevation of privileges from trusted domains, such as an attacker in one forest exploiting administrative to access resources in another. Administrators can configure full pass-through by disabling SID filtering on the trusting side using tools like the Netdom trust command, allowing SIDHistory to propagate fully for seamless resource access, though this increases risks like cross-forest and is recommended only in highly controlled environments with additional safeguards. The Migration Tool (ADMT), provided by , facilitates bulk migrations of users, groups, and computers while preserving SIDHistory to maintain ACL continuity. During inter-forest or intra-forest migrations, ADMT populates the SIDHistory attribute on target objects by default when the "Migrate SID history from source domain" option is selected in the User Migration Wizard, ensuring that migrated principals retain permissions on source-domain resources without manual ACL reconfiguration. For scripted or automated processes, ADMT supports command-line switches like /SidHistory in conjunction with password export servers to enable SID preservation, though successful operation requires trusts, schema compatibility, and the Password Export Server service for credential migration. Managing SIDHistory introduces challenges, particularly around quota limits and maintenance, as the attribute can accumulate multiple entries over repeated migrations, inflating the size of Kerberos tickets and access . Active Directory imposes a practical limit of approximately 1,024 per (including primary , group memberships, and SIDHistory entries), beyond which authentication failures occur due to token overflow, potentially locking out users in environments with deep nesting or frequent migrations. To mitigate this, administrators must periodically clean up obsolete from SIDHistory after re-ACLing resources to the new primary , using tools like the Dsacls command, scripts with the module, or third-party utilities such as SUBINACL to identify and remove unused entries without disrupting active permissions. Failure to perform timely cleanup can lead to degradation and increased to denial-of-service attacks exploiting token bloat.

References

  1. [1]
    Security Identifiers - Microsoft Learn
    Jun 26, 2025 · A SID is used to uniquely identify a security principal or security group. Security principals can represent any entity that the operating ...What are SIDs? · How SIDs work
  2. [2]
    Security Identifiers
    ### Summary of Hierarchical Structure of Subauthorities, Count, Length, and Parsing in SID Architecture
  3. [3]
  4. [4]
    Security Identifiers
    ### Summary of Well-Known SIDs and Their RIDs
  5. [5]
    Security Identifiers - Win32 apps - Microsoft Learn
    Jul 9, 2025 · A security identifier (SID) is a unique value of variable length used to identify a trustee. Each account has a unique SID issued by an authority.
  6. [6]
    Security Identifier - Windows drivers | Microsoft Learn
    Sep 6, 2024 · Windows uses the security identifier (SID) as the definitive value to distinguish security entities from one another.
  7. [7]
    SID structure (winnt.h) - Win32 apps - Microsoft Learn
    Feb 22, 2024 · The security identifier (SID) structure is a variable-length structure used to uniquely identify users or groups.
  8. [8]
    NewSID - Sysinternals - Microsoft Learn
    Nov 1, 2006 · NewSID ensures that this SID is in a standard format (3 32-bit subauthorities preceded by three 32-bit authority fields). Next, NewSID generates ...
  9. [9]
    Using DsAddSidHistory - Win32 apps | Microsoft Learn
    Aug 25, 2021 · The DsAddSidHistory function gets the primary account security identifier (SID) of a security principal from one domain (the source domain) and adds it to the ...
  10. [10]
    Service Changes for Windows Vista - Win32 apps | Microsoft Learn
    Jan 7, 2021 · You can use service SIDs to restrict access to ports, protocols, or the direction of network traffic. To restrict a service's access to the ...
  11. [11]
    [MS-DTYP]: SID - Microsoft Learn
    Oct 30, 2024 · A security identifier (SID) uniquely identifies a security principal. Each security principal has a unique SID that is issued by a security agent.
  12. [12]
    [MS-DTYP]: SID--Packet Representation
    ### SID Structure Binary Layout
  13. [13]
    SID structure (ntifs.h) - Windows drivers - Microsoft Learn
    Feb 22, 2024 · The security identifier (SID) structure is a variable-length structure used to uniquely identify users or groups.
  14. [14]
    SID Components - Win32 apps - Microsoft Learn
    Jan 7, 2021 · A SID includes a revision level, a 48-bit identifier authority, and a variable number of subauthority or relative identifier (RID) values.
  15. [15]
    [MS-DTYP]: SID_IDENTIFIER_AUTHORITY - Microsoft Learn
    Oct 30, 2020 · The identifier authority value identifies the domain security authority that issued the SID. The following identifier authorities are predefined ...
  16. [16]
    Well-known SIDs - Win32 apps - Microsoft Learn
    Nov 25, 2024 · A security identifier to be replaced by the security identifier of the user who created a new object. This SID is used in inheritable ACEs.
  17. [17]
    [MS-DTYP]: Well-Known SID Structures - Microsoft Learn
    Aug 28, 2023 · Well-known SID structures are a group of SIDs that identify generic users or generic groups. Their values remain constant across all operating systems.
  18. [18]
    [MS-AZOD]: Security Identifiers (SIDs) - Microsoft Learn
    Jun 14, 2022 · It consists of a 6-byte identifier authority field that is followed by one to fourteen 32-bit subauthority values and ends in a single 32-bit ...
  19. [19]
    Security Identifiers
    ### Summary of RID Allocation Ranges
  20. [20]
    Security Identifiers Technical Overview
    ### Summary of Machine SIDs and Domain SIDs (Focus on Local Security Authority Role)
  21. [21]
    Configure Windows Service Accounts and Permissions - SQL Server
    For example, a service SID name for a named instance of the Database Engine service might be NT Service\MSSQL$<instance_name> . Service isolation enables access ...
  22. [22]
    Application Pool Identities | Microsoft Learn
    Jun 14, 2022 · Whenever a new application pool is created, the IIS management process creates a security identifier (SID) that represents the name of the ...Configuring Iis Application... · Securing Resources · Accessing The Network
  23. [23]
    Capability SID Constants (Winnt.h) - Win32 apps | Microsoft Learn
    Jan 7, 2021 · The capability SID constants define for applications well-known capabilities by using the AllocateAndInitializeSid function.Missing: AppX | Show results with:AppX
  24. [24]
    Launch an AppContainer - Win32 apps - Microsoft Learn
    Sep 3, 2025 · AppContainer SIDs (Package and Capability SIDs) are separate from the traditional user and group SIDs with both portions of the token being ...
  25. [25]
    Some SIDs don't resolve into friendly names - Windows Server
    Jan 15, 2025 · Removing a Capability SID from file system permissions or registry permissions might cause a feature or application to function incorrectly.Missing: 2 | Show results with:2
  26. [26]
    DeriveCapabilitySidsFromName function (securitybaseapi.h)
    Mar 27, 2025 · This function constructs two arrays of SIDs out of a capability name. One is an array group SID with NT Authority, and the other is an array of capability SIDs ...
  27. [27]
    Parts of the Access Control Model - Win32 apps | Microsoft Learn
    Jan 7, 2021 · An ACL contains a list of access control entries (ACEs). Each ACE specifies a set of access rights and contains a SID that identifies a trustee ...
  28. [28]
    Access Control Lists - Win32 apps
    ### Summary of ACL Types, Purposes, and SIDs
  29. [29]
    Access Control Entries - Win32 apps | Microsoft Learn
    Jul 9, 2025 · Used in a DACL to allow access rights to a trustee. System-audit ACE, Used in a system access control list (SACL) to generate an audit record ...Missing: example | Show results with:example
  30. [30]
    Authorization Structures - Win32 apps | Microsoft Learn
    Jan 7, 2021 · An access-allowed ACE allows access to an object for a specific trustee identified by a security identifier (SID). ACCESS_ALLOWED_CALLBACK_ACE
  31. [31]
    Trustees - Win32 apps - Microsoft Learn
    Jan 7, 2021 · Each ACE in an access control list (ACL) has one security identifier (SID) that identifies a trustee. User accounts include accounts that human ...<|control11|><|separator|>
  32. [32]
    Access Tokens - Win32 apps - Microsoft Learn
    Jul 8, 2025 · An access token is an object that describes the security context of a process or thread. The information in a token includes the identity and privileges of the ...Missing: LSASS | Show results with:LSASS
  33. [33]
    Access Control (Authorization) - Win32 apps
    ### Summary of Authorization Process: Token SIDs vs. Object ACL SIDs
  34. [34]
    4675(S) SIDs were filtered. - Windows 10 - Microsoft Learn
    Sep 6, 2021 · Describes security event 4675(S) SIDs were filtered. This event is generated when SIDs were filtered for a specific Active Directory trust.
  35. [35]
    LookupAccountNameA function (winbase.h) - Win32 apps
    Feb 8, 2023 · The LookupAccountName function accepts the name of a system and an account as input. It retrieves a security identifier (SID) for the account and the name of ...
  36. [36]
    LookupAccountSidA function (winbase.h) - Win32 apps
    Feb 8, 2023 · The LookupAccountSid function accepts a security identifier (SID) as input. It retrieves the name of the account for this SID and the name of the first domain ...Syntax · Parameters · Remarks
  37. [37]
    LSA Lookup performance counters - Windows Server - Microsoft Learn
    Oct 25, 2024 · LSA is also used to manage password changes and create access tokens that define permissions for available resources and operations. The top ...
  38. [38]
    Windows Security Model for Driver Developers - Microsoft Learn
    Dec 9, 2024 · The security descriptor describes the owner and group SIDs for the object along with its ACLs. An object's security descriptor is usually ...Acls For Device Objects · Security Checks Using Acls · Windows Security Boundaries
  39. [39]
    Managing RID Issuance | Microsoft Learn
    May 12, 2025 · To remove the block and allow RID pool allocation to continue, set that value to TRUE. On the next RID allocation performed by the RID master, ...
  40. [40]
    Sysprep (Generalize) a Windows installation - Microsoft Learn
    Dec 15, 2021 · Generalizing the image removes computer-specific information such as installed drivers and the computer security identifier (SID).
  41. [41]
    Disk duplication of Windows installations - Windows Server
    Jun 11, 2025 · This article describes the SID and supported methods for cloning or duplicating a Windows installation.
  42. [42]
    Kerberos and NTLM authentication failures due to duplicate SIDs
    You might experience Kerberos and New Technology LAN Manager (NTLM) authentication failures across devices that have duplicate Security IDs (SIDs). This ...
  43. [43]
    Use Ntdsutil to find and clean up duplicate security identifiers
    Jan 15, 2025 · Use Ntdsutil to find duplicate SIDs by typing 'security account management', then 'check duplicate sid'. Clean up by typing 'cleanup duplicate ...Missing: PsGetSid queries
  44. [44]
    SIDCHG SID Change Utility - Stratesave
    SIDCHG is a command-line utility to modify local computer SID and computer name, replacing the current SID with a new random one.
  45. [45]
    SID-History attribute - Win32 apps | Microsoft Learn
    Dec 14, 2020 · Contains previous SIDs used for the object if the object was moved from another domain. Whenever an object is moved from one domain to another, a new SID is ...Implementations · Windows 2000 Server
  46. [46]
    How trust relationships work for forests in Active Directory
    Jun 30, 2025 · Active Directory Domain Services (AD DS) provides security across multiple domains or forests through domain and forest trust relationships.<|separator|>
  47. [47]
    Security Considerations for Active Directory (AD) Trusts
    Feb 23, 2014 · SID filtering helps prevent malicious users with administrative credentials in a trusted forest from taking control of a trusting forest.
  48. [48]
    How to troubleshoot inter-forest sIDHistory migration with ADMTv2
    Jan 15, 2025 · This article describes how to troubleshoot inter-forest sIDHistory migration with Active Directory Migration Tool version 2 (ADMTv2).Missing: mitigate SIDChg
  49. [49]
    Support policy and known issues for ADMT - Windows Server
    Jan 15, 2025 · This article discusses information about the current level of support for Active Directory Migration Tool (ADMT) on current Windows Client and Windows Server ...
  50. [50]
    Active Directory Domain Services Maximum Limits and Scalability
    Jul 21, 2025 · The maximum number of security identifiers that you can create over the lifetime of a domain controller is 2,147,483,647 relative identifiers ( ...
  51. [51]
    How to clean up orphaned SID's in ACEs in AD? - Server Fault
    Nov 4, 2010 · Orphaned SIDs can be cleaned using SUBINACL, Security Explorer, or a GUI program. SUBINACL can delete ACEs with deleted SIDs.Remove security permissions from AD objects for old SID´sFind deleted username from SID in Windows Active DirectoryMore results from serverfault.comMissing: obsolete | Show results with:obsolete