Skip to content
Access control Write-up Intermediate

Bug Or Feature: Privilege Escalation In Windows Autopilot

During Windows Autopilot deployment, an error screen's 'View Diagnostics' button opens a folder picker that can be abused to run a remote DLL, giving a shell as the defaultuser0 account which is a local administrator. The attacker can then bypass UAC and create a persistent backdoor admin account that survives the completed deployment.

sec-consult.com

Published on sec-consult.com

SEC Consult identified a local privilege escalation vulnerability in the Windows Autopilot deployment process.

The author, on sec-consult.com

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 folder picker dialog launched from the error screen allows executing arbitrary commands (via the address bar) with the privileges of the defaultuser0 deployment account, which is a local administrator.

Impact

An attacker with physical access during deployment could gain local administrator rights and leave a persistent backdoor account, even when the profile forbids local admins and CMD in OOBE is disabled; Microsoft classified it as by design, not a security issue.

What the attacker needed

Physical access to device during Autopilot; attacker-controlled SMB share on same network; ability to trigger a deployment error

The fix

Microsoft did not fix it (closed as by design); a workaround is to disable the 'Allow Users to collect logs about installation errors' setting in Intune.

How it was found

  1. Power on the new device, select language and connect to the network so the Autopilot profile is assigned.
  2. Trigger an error during deployment, for example by removing the TPM or disconnecting the network.
  3. On the error window, click 'View Diagnostics' to open a select folder dialog.
  4. In the dialog's address bar, enter a command that runs a remote DLL from an attacker-controlled SMB share, obtaining a shell as defaultuser0.
  5. Bypass UAC to get full administrator privileges, then create a new local administrator account as a backdoor.
  6. Restore the failed component (reconnect network, reattach TPM) and click 'Retry' so deployment completes; the backdoor account remains.

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 Autopilot is a Microsoft tool that sets up new Windows computers automatically. The researchers found that if an error happens during setup, a button meant to show logs opens a file picker, and from there you can run a program from another computer. That program runs with administrator rights, letting someone create a hidden admin account that stays after setup finishes.

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.

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.