Skip to content
Access control Write-up Advanced

Bypassing Windows Administrator Protection

The new Administrator Protection feature in Windows 11 25H2 creates a per-logon-session DOS device object directory on demand using a kernel call that skips access checking, and the directory's owner is taken from the caller's primary token rather than the impersonated identification token. By impersonating the shadow administrator's identification token, an attacker could force creation of that directory owned by the limited user and then hijack the C: drive of an elevated process to run code as administrator.

James Forshaw Follow

Published on projectzero.google

A headline feature introduced in the latest release of Windows 11, 25H2 is Administrator Protection. The goal of this feature is to replace User Account Control (UAC) with a more robust and importantly, securable system to allow a local user to access administrator privileges only when necessary.

James Forshaw, on projectzero.google

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 kernel creates the per-logon-session DOS device directory with a Zw call that disables access checking, and assigns the directory owner from the caller's primary token instead of the impersonated identification token, letting a limited user own and write to a directory used by an elevated process.

Impact

An attacker could silently gain full administrator privileges, though the run-once route requires winning a race condition and the feature was later disabled by Microsoft over an unrelated compatibility issue.

What the attacker needed

Local user in administrators group; Administrator Protection enabled; race to run before elevated process code

The fix

The issues were fixed by Microsoft, either before the feature's official release or through subsequent security bulletins.

How it was found

  1. Obtain the linked administrator token via the TokenLinkedToken information class, which returns an identification-level handle to the shadow administrator token.
  2. Impersonate that identification token and open the \?? directory so the kernel creates the session's DOS device object directory.
  3. Because access checking is skipped and the owner comes from the primary token, the created directory is owned by the limited user.
  4. Create a symbolic link in that directory to hijack the C: drive for processes in that logon session.
  5. Get an elevated process running in that session (for example via the run-once API) and win a race before its code executes so its drive is redirected to attacker-controlled files.

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 lets a normal user temporarily become an administrator through a prompt. This feature was meant to make that a real security wall. The researcher found that a normal user could trick Windows into creating a special per-session folder that the user then controls, and use it to redirect files that an administrator-level program loads, so the attacker's code runs with full rights.

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.

More by James Forshaw

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.