Lesson 13 of 14 · 13m
UAC Is Split Tokens, Not Sudo
Admin logon mints filtered and full tokens, elevation is always a new process at High integrity, and Microsoft doesn't call UAC a boundary — design accordingly.
Two tokens at logon, not one escalated process
When a member of Administrators logs on, lsass.exe mints two access tokens: a filtered token — Medium integrity, the Administrators group marked "used for deny only" — and a full token at High integrity with every privilege. Every process you launch inherits the filtered one. "Run as administrator" sends a request to the AppInfo service, which calls consent.exe — on the secure desktop, a separate Winlogon desktop no user-mode code can reach — and launches a new process carrying the full token. The prompt that dimmed the rest of the screen is that desktop switch made visible; malware can't fake or click it. Check your own split:
whoami /groupsMandatory Label\Medium Mandatory Level and that deny-only Administrators entry mean the process is running as a standard user with an admin identity in its pocket.
Kill the wrong model: "UAC is sudo — the process escalates." No process gains privilege mid-run; elevation is always a fresh process with a fresh token. The corollary people miss: "the user is an admin" says nothing about the running process — an admin's unelevated cmd is Medium integrity and gets denied exactly like a user's.
The mechanism underneath: Mandatory Integrity Control
UAC rides on MIC — integrity labels on processes and objects: Low < Medium < High < System. Write-up is denied, so a Medium process can't write to a High-integrity object. UIPI goes with it — User Interface Privilege Isolation blocks lower-integrity processes from sending window messages upward, the fix for the old shatter-attack class. Browsers run Low (Protected Mode, the legacy IE innovation that became the sandboxing story); AppContainers sit below that.
And there's a compatibility crutch still running: file and registry virtualization. A Medium process writing to C:\Program Files or HKLM\Software without rights gets silently redirected to %LOCALAPPDATA%\VirtualStore — which is why the legacy app's "config file" sometimes exists in two places and why your edit "didn't take."
This is why a malware process running as "admin-but-unelevated" still can't tamper with system files — and why the first thing real malware does is hunt a UAC bypass.
Which brings the honest part: Microsoft does not consider UAC a security boundary, and the bypass catalog is long — auto-elevated binaries plus COM and protocol-handler hijacks (fodhelper.exe via ms-settings, eventvwr, sdclt) are the taught examples, and every one of them is a Medium→High transition without a consent prompt. The actual boundary is the admin credential; UAC is a speed bump that keeps accidents and lazy malware honest. Design accordingly: detection on children of auto-elevating binaries, not faith in the prompt.
The remote and disablement traps
Two more traps worth knowing cold. First, remote UAC token filtering: when a local account logs on over the network, it also gets a filtered token — which is why LocalAccountTokenFilterPolicy = 1 exists (it disables that filter and is what PsExec-style lateral movement wants set). Leave it off; use domain accounts. Second, EnableLUA = 0 doesn't just kill prompts — it breaks UWP/Store apps entirely and deletes the integrity separation that keeps Medium processes away from system objects. Nobody who understands the mechanism turns it off.
The same mechanism explains one more daily confusion: runas /user:admin cmd is not elevation — it launches the process as a different user entirely, still Medium integrity if that user's own token isn't elevated; and runas /trustlevel constrains a token down, never up. There is no sudo -s. The token decision happens at process creation and cannot be revised mid-life.
Concrete practice: elevate per-process ("Run as administrator"), not per-session; use separate -a admin accounts and privileged access workstations; keep EnableLUA at 1; keep LocalAccountTokenFilterPolicy absent; and watch for the auto-elevate bypasses instead of pretending the prompt is the wall.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
BlueHammer: The Unpatched Windows Zero-Day That Weaponizes Microsoft Defender Against Your Own System
BlueHammer is an unpatched, publicly released Windows local privilege escalation exploit that chains Microsoft Defender's update workflow, Volume Shadow Copy, Cloud Files callbacks, and opportunistic locks to reach NT AUTHORITY\SYSTEM from a standard user account.
A Fake GTA 6 ISO Didn’t Install a Game. It Installed a Wiper.
A fake GTA 6 ISO used a believable installer error to cover remote-access malware, browser-data theft, and destructive file wiping. The “License not found” message wasn’t the crack failing. It was there so the victim would stop looking.
Running a Minecraft Network: Four JVMs, One Box, and the Settings That Lie to You
Four servers on one host means four JVMs each sizing its thread pools for a machine it does not own. The measured cost of that, the systemd ordering that guarantees nothing, and the throttle that switches itself back on when your forwarding breaks.
Building a Minecraft Network: Four Servers Pretending to Be One Place
A proxy, a lobby, an SMP and a PvP arena is four JVMs that know nothing about each other. What actually has to be shared, why your permissions don't follow players, and the two LuckPerms defaults that silently share nothing at all.