Abusing the SeRelabelPrivilege
A Group Policy assigned the SeRelabelPrivilege user right to the built-in Users group on several computers. The author showed that this privilege lets a standard user take ownership of higher-integrity processes such as winlogon and then grant themselves full control, leading to local privilege escalation to SYSTEM.
In a recent assessment, it was found that a specific Group Poilcy granted via “User Right Assignments” the SeRelabelPrivilege to the built-in Users group and was applied on several computer accounts.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the SeRelabelPrivilege user right was granted too broadly via Group Policy, and the privilege implicitly allows taking ownership of objects with a higher integrity level than the caller.
Impact
A standard user could escalate to NT AUTHORITY\SYSTEM on affected machines, although the privilege is only usable from a High Integrity Level context.
What the attacker needed
SeRelabelPrivilege granted to the user; High Integrity Level context
How it was found
- Assign SeRelabelPrivilege to a standard user via Group Policy.
- Run the tool at High Integrity Level (for example, cmd.exe run as administrator).
- Get the current user SID and enable the privilege.
- Open the target process with WRITE_OWNER access and call SetSecurityInfo with the LABEL_SECURITY_INFORMATION flag to take ownership.
- Open the process with WRITE_DAC access and set explicit PROCESS_ALL_ACCESS to gain full control.
- Use parent process injection to create a process running as SYSTEM.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Windows gives processes an 'integrity level' that limits what they can change; higher levels are more trusted. A user right called SeRelabelPrivilege was granted to ordinary users, and the author found it also lets them take ownership of more trusted processes. Once they own a process, they can give themselves full control and start a new process as the SYSTEM account, which is the highest local privilege.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.