Table of Contents
Description
User rights define what actions a user or group can perform on a system, such as logging in locally, accessing files, or performing administrative tasks. These rights are usually assigned via Local Security Policy (secpol.msc) or Group Policy (GPO) in domain environments.
Important rights
Depending on their current group membership, and other factors such as privileges that administrators can assign via Group Policy (GPO), users can have various rights assigned to their account. This Microsoft article on User Rights Assignment provides a detailed explanation of each of the user rights that can be set in Windows. Not every right listed here is important to us from a security standpoint as penetration testers or defenders, but some rights granted to an account can lead to unintended consequences such as privilege escalation or access to sensitive files. For example, let’s say we can gain write access over a Group Policy Object (GPO) applied to an OU containing one or more users that we control. In this example, we could potentially leverage a tool such as SharpGPOAbuse to assign targeted rights to a user (Abusing GPOs). We may perform many actions in the domain to further our access with these new rights. A few examples include:
SeDebugPrivilege - This allows a user to debug and adjust the memory of a process. With this privilege, attackers could utilize a tool such as Mimikatz to read the memory space of the Local System Authority (LSASS) process and obtain any credentials stored in memory.
SeImpersonatePrivilege - This privilege allows us to impersonate a token of a privileged account such as NT AUTHORITY\SYSTEM. This could be leveraged with a tool such as JuicyPotato, RogueWinRM, PrintSpoofer, etc., to escalate privileges on a target system.
SeBackupPrivilege - This grants a user the ability to create system backups and could be used to obtain copies of sensitive system files that can be used to retrieve passwords such as the SAM and SYSTEM Registry hives and the NTDS.dit Active Directory database file.
SeRemoteInteractiveLogonRight - This privilege could give our target user the right to log onto a host via Remote Desktop (RDP), which could potentially be used to obtain sensitive data or escalate privileges.
SeTakeOwnershipPrivilege - This allows a process to take ownership of an object. At its most basic level, we could use this privilege to gain access to a file share or a file on a share that was otherwise not accessible to us.
SeLoadDriverPrivilege - A user with this privilege can load and unload device drivers that could potentially be used to escalate privileges or compromise a system.
SeNetworkLogonRight - Determines which users can connect to the device from the network. This is required by network protocols such as SMB, NetBIOS, CIFS, and COM+.
SeSecurityPrivilege - This policy setting determines which users can specify object access audit options for individual resources such as files, Active Directory objects, and registry keys. These objects specify their system access control lists (SACL). A user assigned this user right can also view and clear the Security log in Event Viewer.
SeRestorePrivilege - This security setting determines which users can bypass file, directory, registry, and other persistent object permissions when they restore backed up files and directories. It determines which users can set valid security principals as the owner of an object.
Further information can be found here.
There are many techniques available to abuse user rights detailed here and here. Though outside the scope of this module, it is essential to understand the impact that assigning the wrong privilege to an account can have within Active Directory.
Note: Remember that you will likely not see all available rights of a user if you don’t have an elevated terminal running.
Commands
CMD:
whoami /priv - View user’s rights and groups
Powershell:
$username = "<username>"
Get-WmiObject -Class Win32_UserAccount -Filter "Name = '$username'" | Select-Object -Property Name, Domain - View user rights for an another user
Default user privileges
I usually and often found these rights on normal host users.
SeChangeNotifyPrivilege - Bypass traverse checking
SeIncreaseWorkingSetPrivilege - Increase a process working set
SeShutdownPrivilege - Can power off the system
Default admin privileges
I usually and often found these rights on normal host users.
Un-elevated:
SeShutdownPrivilege - Shut down the system
SeChangeNotifyPrivilege - Bypass traverse checking
SeUndockPrivilege - Remove computer from docking station
SeIncreaseWorkingSetPrivilege - Increase a process working set
SeTimeZonePrivilege - Change the time zone
Elevated:
SeIncreaseQuotaPrivilege - Adjust memory quotas for a process
SeMachineAccountPrivilege - Add workstations to domain
SeSecurityPrivilege - Manage auditing and security log
SeTakeOwnershipPrivilege - Take ownership of files or other objects
SeLoadDriverPrivilege - Load and unload device drivers
SeSystemProfilePrivilege - Profile system performance
SeSystemtimePrivilege - Change the system time
SeProfileSingleProcessPrivilege - Profile single process
SeIncreaseBasePriorityPrivilege - Increase scheduling priority
SeCreatePagefilePrivilege - Create a pagefile
SeBackupPrivilege - Back up files and directories
SeRestorePrivilege - Restore files and directories
SeShutdownPrivilege - Shut down the system
SeDebugPrivilege - Debug programs
SeSystemEnvironmentPrivilege - Modify firmware environment values
SeChangeNotifyPrivilege - Bypass traverse checking
SeRemoteShutdownPrivilege - Force shutdown from a remote system
SeUndockPrivilege - Remove computer from docking station
SeEnableDelegationPrivilege - Enable computer and user accounts to be trusted for delegation
SeManageVolumePrivilege - Perform volume maintenance tasks
SeImpersonatePrivilege - Impersonate a client after authentication
SeCreateGlobalPrivilege - Create global objects
SeIncreaseWorkingSetPrivilege - Increase a process working set
SeTimeZonePrivilege - Change the time zone
SeCreateSymbolicLinkPrivilege - Create symbolic links
SeDelegateSessionUserImpersonatePrivilege - Obtain an impersonation token for another user in the same session