Auditing Windows UAC and integrity boundaries: when elevation happens without a real prompt
Windows separates code that runs elevated from code that does not, marks processes with an integrity level,
and asks the user to consent before a process gains administrative rights. That boundary holds only when
crossing it requires either a genuine consent prompt or an existing high-integrity context. It breaks when an
auto-elevating binary, one the system elevates without prompting, can be steered by a medium-integrity process
into loading an input the attacker controls, when an already-elevated process consumes a file, registry value,
or path a non-administrator can write, when the elevation policy is broad enough to elevate more than it
should, or when an integrity level is set but does not actually gate the operation it is meant to protect. In
each case a medium-integrity foothold reaches a high-integrity context without the consent the boundary
promised. The bug is elevation without genuine consent. You audit these by finding every way a non-elevated
process influences what an elevated one does.
When to use
- A host has auto-elevating binaries or an elevation policy and you can enumerate what they consume.
- An elevated process reads a file, registry value, or path that a non-administrator may write.
- An integrity level is relied on to gate an operation you can test from a medium-integrity context.
Scope check
Audit elevation boundaries only on hosts you own or are authorized to assess, on non-production or a snapshot,
using a benign marker that proves the high-integrity context was reached rather than taking real
administrative action. A confirmed crossing yields administrative rights, so keep every probe within scope. If
you can't name the authorization, stop.
The loop
Establish whether crossing the boundary needs genuine consent or an existing high context first. For
each way a medium-integrity process might reach high integrity, determine whether it requires a real consent
prompt or an already-elevated context, or whether an auto-elevating binary, a writable consumed input, or a
permissive policy lets the crossing happen without consent. This is the false-positive killer: a boundary
that always requires genuine consent or existing elevation is not crossed by a medium-integrity foothold.
Name the consent-free crossing before crafting a proof.
Enumerate auto-elevating binaries and elevated processes. List the binaries the system elevates without
prompting and the processes already running elevated, and for each note the inputs it consumes: files it
loads, registry values it reads, paths it resolves, and objects it opens. These consumed inputs are where a
medium-integrity process may exert influence.
Check for medium-integrity influence over a consumed input. Determine whether a non-administrator can
write a file, registry value, or path that an auto-elevating or elevated process then consumes, so the
elevated code acts on attacker-controlled input. A writable consumed input is the crossing.
Check the elevation policy breadth. Determine whether the policy elevates more than it should:
auto-elevation that extends to a binary that loads external input, or a configuration that suppresses the
prompt for operations that should require it. A broad policy turns an ordinary action into a consent-free
elevation.
Check that integrity levels actually gate. Determine whether an operation relied on to be gated by
integrity level is truly refused from medium integrity, or whether the object's permissions or the
operation's implementation let a medium-integrity process perform it anyway. A level that is set but not
enforced is no boundary.
Confirm and record. Confirm by influencing a consumed input or exercising the policy so a benign marker
runs in the high-integrity context on an isolated host, without genuine consent. Kill the lead if every
crossing requires a real prompt or existing elevation, if no consumed input is writable by a
non-administrator, and if the integrity level actually refuses the operation. Record the crossing, the
consumed input or policy, and the high-integrity marker, or set a kill_reason.
Where the integrity boundary leaks
- The consent-free crossing is the finding. Elevation with a genuine prompt is the design; the bug is a
medium-integrity foothold reaching high integrity without one. Name how consent is skipped.
- Auto-elevating binaries that load input are levers. A binary the system elevates without prompting
becomes an escalation when a medium-integrity process steers what it loads.
- Elevated processes consuming writable inputs. An elevated process reading a file, registry value, or
path a non-administrator can write acts on attacker input at high integrity.
- Broad elevation policy skips the prompt. A policy that elevates too much, or suppresses the prompt for
operations that should require it, removes the consent the boundary depends on.
- A set integrity level that does not gate. An integrity level marked on an object but not enforced by its
permissions or the operation lets a medium-integrity process act as though the boundary were absent.
Worked example (a confirm and a kill)
Confirm. An auto-elevating binary loads a configuration file from a path a standard user can write.
Planting a benign marker configuration there causes the elevated binary to act on it in a high-integrity
context at the next run, with no consent prompt, on an isolated host. Confirmed elevation without
genuine consent through a writable input to an auto-elevating binary, high, remediation = load inputs to
auto-elevating binaries only from administrator-writable locations, require a genuine consent prompt for the
operation, and narrow the auto-elevation policy to binaries that consume no external input.
Kill. The same binary loads its configuration only from an administrator-writable location, the
elevation policy prompts for the operation, and the integrity level on the target object refuses a
medium-integrity write. A standard user cannot influence what the elevated code consumes and cannot elevate
without consenting. Killed, kill_reason = "the elevated binary consumes only admin-writable inputs, the
operation requires a genuine consent prompt, and the integrity level refuses the medium-integrity write; no
consent-free crossing exists."
Rationalizations to reject
- "The user has to approve elevation." -> Only if the crossing actually prompts; an auto-elevating binary or
a writable consumed input reaches high integrity without any prompt, which is the finding.
- "That binary is signed and trusted." -> Trust in the binary does not sanitize the input it loads; a
writable configuration or resource it consumes carries the attacker's influence into the elevated context.
- "Elevation is a convenience, not a security boundary." -> Whether or not it is called a boundary, crossing
it without consent reaches administrative rights, which is the impact this audit measures.
- "The integrity level is set on that object." -> Set is not enforced; confirm the operation is actually
refused from medium integrity rather than only labeled.
- "Only the installer writes there." -> Confirm the live permissions; a path left writable by a
non-administrator is a writable consumed input regardless of who was meant to write it.
Executing this in practice
You need every auto-elevating binary and elevated process with the inputs it consumes, the write permissions
on each consumed file, registry value, and path, the elevation policy, and whether each integrity level
actually refuses the operation it gates. For each, decide whether a medium-integrity process can influence
what the elevated code consumes or cross the boundary without consent. Reading the consumed inputs and the
policy settles most leads; planting a benign marker input and observing it act in the high-integrity context
on an isolated host settles the rest.
Related
hunting-windows-dll-hijacking-and-search-order - a writable library that an auto-elevating binary loads is
a consumed input in the sense this skill audits, so the two meet on the elevated load.
hunting-windows-service-privilege-escalation - a service escalation reaches a privileged account by a
related write-reaches-execution shape, a companion route across the same host.
auditing-windows-token-and-privilege-abuse - reaching a high-integrity context grants a token whose
privileges that skill then audits as the next lever.
detecting-race-conditions - a writable input consumed by an elevated process is often exploitable through
a check-to-use window that skill treats generally.
- FINDING-SCHEMA.md - source = the medium-integrity influence over what an elevated
process consumes, sink = the auto-elevating or elevated operation, evidence = a benign marker running in the
high-integrity context without genuine consent on an isolated host.
1---2name: auditing-windows-uac-and-integrity-boundaries3description: Audit elevation and integrity boundaries on Windows, where a medium-integrity process reaches a high- integrity context without a genuine consent prompt, through an auto-elevating binary that loads an attacker-influenced input, a writable resource an elevated process consumes, an over-broad elevation policy, or an integrity level that does not gate the operation it should. Use when reviewing how a host distinguishes elevated from non-elevated code and whether a non-administrator can cross that line without real consent. Covers auto-elevation abuse, elevated processes consuming writable inputs, permissive elevation policy, and integrity levels that fail to gate an operation. The medium-integrity influence over what an elevated process consumes is the source, the auto-elevating or elevated operation is the sink, and reaching a high- integrity context without genuine consent is the bug.4license: MIT5---67# Auditing Windows UAC and integrity boundaries: when elevation happens without a real prompt89Windows separates code that runs elevated from code that does not, marks processes with an integrity level,10and asks the user to consent before a process gains administrative rights. That boundary holds only when11crossing it requires either a genuine consent prompt or an existing high-integrity context. It breaks when an12auto-elevating binary, one the system elevates without prompting, can be steered by a medium-integrity process13into loading an input the attacker controls, when an already-elevated process consumes a file, registry value,14or path a non-administrator can write, when the elevation policy is broad enough to elevate more than it15should, or when an integrity level is set but does not actually gate the operation it is meant to protect. In16each case a medium-integrity foothold reaches a high-integrity context without the consent the boundary17promised. The bug is elevation without genuine consent. You audit these by finding every way a non-elevated18process influences what an elevated one does.1920## When to use2122- A host has auto-elevating binaries or an elevation policy and you can enumerate what they consume.23- An elevated process reads a file, registry value, or path that a non-administrator may write.24- An integrity level is relied on to gate an operation you can test from a medium-integrity context.2526## Scope check2728Audit elevation boundaries only on hosts you own or are authorized to assess, on non-production or a snapshot,29using a benign marker that proves the high-integrity context was reached rather than taking real30administrative action. A confirmed crossing yields administrative rights, so keep every probe within scope. If31you can't name the authorization, stop.3233## The loop34351. **Establish whether crossing the boundary needs genuine consent or an existing high context first.** For36 each way a medium-integrity process might reach high integrity, determine whether it requires a real consent37 prompt or an already-elevated context, or whether an auto-elevating binary, a writable consumed input, or a38 permissive policy lets the crossing happen without consent. This is the false-positive killer: a boundary39 that always requires genuine consent or existing elevation is not crossed by a medium-integrity foothold.40 Name the consent-free crossing before crafting a proof.41422. **Enumerate auto-elevating binaries and elevated processes.** List the binaries the system elevates without43 prompting and the processes already running elevated, and for each note the inputs it consumes: files it44 loads, registry values it reads, paths it resolves, and objects it opens. These consumed inputs are where a45 medium-integrity process may exert influence.46473. **Check for medium-integrity influence over a consumed input.** Determine whether a non-administrator can48 write a file, registry value, or path that an auto-elevating or elevated process then consumes, so the49 elevated code acts on attacker-controlled input. A writable consumed input is the crossing.50514. **Check the elevation policy breadth.** Determine whether the policy elevates more than it should:52 auto-elevation that extends to a binary that loads external input, or a configuration that suppresses the53 prompt for operations that should require it. A broad policy turns an ordinary action into a consent-free54 elevation.55565. **Check that integrity levels actually gate.** Determine whether an operation relied on to be gated by57 integrity level is truly refused from medium integrity, or whether the object's permissions or the58 operation's implementation let a medium-integrity process perform it anyway. A level that is set but not59 enforced is no boundary.60616. **Confirm and record.** Confirm by influencing a consumed input or exercising the policy so a benign marker62 runs in the high-integrity context on an isolated host, without genuine consent. Kill the lead if every63 crossing requires a real prompt or existing elevation, if no consumed input is writable by a64 non-administrator, and if the integrity level actually refuses the operation. Record the crossing, the65 consumed input or policy, and the high-integrity marker, or set a `kill_reason`.6667## Where the integrity boundary leaks6869- **The consent-free crossing is the finding.** Elevation with a genuine prompt is the design; the bug is a70 medium-integrity foothold reaching high integrity without one. Name how consent is skipped.71- **Auto-elevating binaries that load input are levers.** A binary the system elevates without prompting72 becomes an escalation when a medium-integrity process steers what it loads.73- **Elevated processes consuming writable inputs.** An elevated process reading a file, registry value, or74 path a non-administrator can write acts on attacker input at high integrity.75- **Broad elevation policy skips the prompt.** A policy that elevates too much, or suppresses the prompt for76 operations that should require it, removes the consent the boundary depends on.77- **A set integrity level that does not gate.** An integrity level marked on an object but not enforced by its78 permissions or the operation lets a medium-integrity process act as though the boundary were absent.7980## Worked example (a confirm and a kill)8182> **Confirm.** An auto-elevating binary loads a configuration file from a path a standard user can write.83> Planting a benign marker configuration there causes the elevated binary to act on it in a high-integrity84> context at the next run, with no consent prompt, on an isolated host. **Confirmed** elevation without85> genuine consent through a writable input to an auto-elevating binary, `high`, remediation = load inputs to86> auto-elevating binaries only from administrator-writable locations, require a genuine consent prompt for the87> operation, and narrow the auto-elevation policy to binaries that consume no external input.88>89> **Kill.** The same binary loads its configuration only from an administrator-writable location, the90> elevation policy prompts for the operation, and the integrity level on the target object refuses a91> medium-integrity write. A standard user cannot influence what the elevated code consumes and cannot elevate92> without consenting. **Killed**, `kill_reason` = "the elevated binary consumes only admin-writable inputs, the93> operation requires a genuine consent prompt, and the integrity level refuses the medium-integrity write; no94> consent-free crossing exists."9596## Rationalizations to reject9798- *"The user has to approve elevation."* -> Only if the crossing actually prompts; an auto-elevating binary or99 a writable consumed input reaches high integrity without any prompt, which is the finding.100- *"That binary is signed and trusted."* -> Trust in the binary does not sanitize the input it loads; a101 writable configuration or resource it consumes carries the attacker's influence into the elevated context.102- *"Elevation is a convenience, not a security boundary."* -> Whether or not it is called a boundary, crossing103 it without consent reaches administrative rights, which is the impact this audit measures.104- *"The integrity level is set on that object."* -> Set is not enforced; confirm the operation is actually105 refused from medium integrity rather than only labeled.106- *"Only the installer writes there."* -> Confirm the live permissions; a path left writable by a107 non-administrator is a writable consumed input regardless of who was meant to write it.108109## Executing this in practice110111You need every auto-elevating binary and elevated process with the inputs it consumes, the write permissions112on each consumed file, registry value, and path, the elevation policy, and whether each integrity level113actually refuses the operation it gates. For each, decide whether a medium-integrity process can influence114what the elevated code consumes or cross the boundary without consent. Reading the consumed inputs and the115policy settles most leads; planting a benign marker input and observing it act in the high-integrity context116on an isolated host settles the rest.117118## Related119120- `hunting-windows-dll-hijacking-and-search-order` - a writable library that an auto-elevating binary loads is121 a consumed input in the sense this skill audits, so the two meet on the elevated load.122- `hunting-windows-service-privilege-escalation` - a service escalation reaches a privileged account by a123 related write-reaches-execution shape, a companion route across the same host.124- `auditing-windows-token-and-privilege-abuse` - reaching a high-integrity context grants a token whose125 privileges that skill then audits as the next lever.126- `detecting-race-conditions` - a writable input consumed by an elevated process is often exploitable through127 a check-to-use window that skill treats generally.128- [FINDING-SCHEMA.md](../../FINDING-SCHEMA.md) - source = the medium-integrity influence over what an elevated129 process consumes, sink = the auto-elevating or elevated operation, evidence = a benign marker running in the130 high-integrity context without genuine consent on an isolated host.