1 min read

Commonly Abused Windows Token Privileges: SeImpersonatePrivilege

SeImpersonatePrivilege — Impersonate a client after authentication

Determines which programs are allowed to impersonate a user or another specified account and act on behalf of the user. If this user right is required for this type of impersonation, an unauthorized user cannot cause a client to connect (for example, by remote procedure call (RPC) or named pipes) to a service that they have created to impersonate that client. (Such an action could elevate the unauthorized user’s permissions to administrative or system levels.)

Impersonation is the ability of a thread to run in a security context that is different from the context of the process that owns the thread. Impersonation is designed to meet the security requirements of client/server applications. When running in a client’s security context, a service “is” the client, to some degree. One of the service’s threads uses an access token representing the client’s credentials to obtain access to the objects to which the client has access. The primary reason for impersonation is to cause access checks to be performed against the client’s identity. Using the client’s identity for access checks can cause access to be either restricted or expanded, depending on what the client has permission to do.

Services that are started by the Service Control Manager have the built-in Service group added by default to their access tokens. COM servers that are started by the COM infrastructure and configured to run under a specific account also have the Service group added to their access tokens. As a result, these processes are assigned this user right when they are started.

GPO Setting Path

Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment

GPO Setting Name

Impersonate a client after authentication

Token Privilege

SeImpersonatePrivilege

Associated ATT&CK Tactic(s)

Privilege Escalation (TA0004), Defense Evasion (TA0005)

Windows Logon Session Types: Network

Logon Type — Network Used to access a Windows resource (e.g. shared folder) from a system on the network.

READ MORE

Windows Logon Session Types: NetworkCleartext

Logon Type — NetworkCleartext Used to logon with credentials sent in clear text (only possible for certain services).

READ MORE

Windows Logon Session Types: Service

Logon Type — Service Used to run a service as a specified account.

READ MORE