On 2/10/25 1:34 AM, 'Michael Leaver' via innosetup wrote:
> I mention this because it will affect all software that runs elevated.
> Basically, if you run anything that requires elevation, then it will
> instead run it as a shadow/virtual administrator and not under your actual
> admin account.
Yay. This should finally put an end to fake "UAC bypass" vulnerability
claims.
> So if you run an installer elevated, for example, it is not> going to
run under your account. This means, for example, if the installer
> reads or writes anything based on the current user, then it's going to use
> the wrong user (and so access the wrong files and wrong part of the
> registry).
I tried it out and it appears the "runasoriginaluser" [Run] section flag
still works as it does now, i.e. the process runs under the original
user account, not under ADMIN_username.
So if you need an emergency quick fix, [Run] can still be used to
perform user-specific actions in an administrative installation. It's
still, however, not correct practice, as the actions will only affect
one user, but there may be multiple users on the system who need to use
the app.
Somewhat surprisingly, although elevated installers run inside an
ADMIN_username account now, the EXEs are still started from their
original location, e.g. your Downloads folder, instead of copying the
EXEs into the secure profile and starting them from there. This leads me
to suspect an unelevated process could modify/replace an EXE file in the
Downloads folder after the elevation dialog is shown but before the user
clicks Yes to confirm. DLL preloading attacks may also be possible (and
they would be genuine privilege escalation exploits now that this new
elevation is intended to define a security boundary).
One thing we may need to look at changing in Setup is the location of
the /LOG log file. It's currently created in the Temp directory, but
with Administrator protection enabled, it ends up in ADMIN_username's
Temp directory, which is inaccessible to non-elevated apps. You can get
to it by running Notepad "as Administrator" but that's kind of messy.
I'm also not sure if these ADMIN_username profiles get deleted
automatically after a period of inactivity (?).
-JR