This privilege grants a user account the ability to take ownership of any securable object, namely →
AD Objects ( Users, Groups… )
NTFS Files and Directories
Printers
Registry Keys ( Hives within HKLM, HKCU… )
Processes
That is, this privilege assigns the WriteOnwer right over a given object
Therefore, if an operator compromise a local or domain user account which has this privilege enabled, he can leverage it to take ownership of any securable object of the system by modifying the owner within its security descriptor
Once we modify its owner, we implicity have the WriteDACL right over the given objet. So, we can create, delete or modify any existing ACE within the DACL of the object’s security descriptor
From here, it’s as simple as create an ACE which grants Full Control to a principal controlled by the operator
Enumeration
Current User Privileges
whoami /priv
Abuse - Windows
Let’s suppose that we compromise a domain user account that can RDP to a a domain-joined machine as it belongs to the Remote Desktop Users group of the latter
Once we establish a remote connection to the target through RDP, we start by listing which privileges the given user account has
To do so, we can issue the following command
whoami /priv
Command Output
PRIVILEGES INFORMATION----------------------Privilege Name Description State============================= ======================================== ========SeTakeOwnershipPrivilege Take ownership of files or other objects DisabledSeChangeNotifyPrivilege Bypass traverse checking EnabledSeIncreaseWorkingSetPrivilege Increase a process working set Disabled
We see that the user has the SeTakeOwnershipPrivilege. So, we can leverage this privilege by abusing the WRITE_OWNER right to modify the owner of any secure object we want and take FULL CONTROL over it
However, there is a problem as the privilege in question is disable, so first we must enable it in order to accomplish our goal
Once again, we can run one of the following commands to list the owner of the given resource
Adding a new ACE to the Object’s DACL
As stated previously, once we own an object, we implicity gain the WRITE_DACL right over the latter, thereby being capable of create, modify and delete any existing ACE within the DACL of the object’s security descriptor
In this case we want FULL CONTROL over the object, so we can create a DACL which gives this right to the controlled user over the targeted resource