Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not automatically update on systems where UAC is disabled #567

Closed
valinet opened this issue Dec 15, 2021 · 1 comment
Closed

Do not automatically update on systems where UAC is disabled #567

valinet opened this issue Dec 15, 2021 · 1 comment
Labels
bug Something isn't working enhancement New feature or request fixed investigating

Comments

@valinet
Copy link
Owner

valinet commented Dec 15, 2021

EP update files are ShellExecuteExWed with the runas verb (i.e. elevated), because they need to update files in system folders etc.

As the registry entry for automatic updates is located in HKCU, any application can potentially hijack it and have the updater in EP download and execute an arbitrary file from the Internet as an administrator, and even at logon when the update policy is set to "Prompt to install available updates".

On UAC enabled systems, this is not a security problem, because UAC will prompt the user for confirmation before elevating the application. The message displayed by UAC is specially created by EP to contain the URL from which the file was downloaded, allowing the user to quickly and reliably verify the source and authenticity of the update.

The problem is on systems where UAC is disabled, as that executes the downloaded file automatically and elevates it immediately, since there is no UAC prompt to potentially prevent that. This scenario is a security issue.

The fix proposed is to use the undocumented CheckElevationEnabled API call to verify whether UAC is enabled. If it is not, before executing the update file, display a message similar to what the UAC prompt would show, allowing the user to cancel the update if something hijacked the download location.

@valinet valinet added bug Something isn't working enhancement New feature or request investigating labels Dec 15, 2021
@valinet valinet changed the title Do not automatically install on systems without UAC Do not automatically update on systems without UAC Dec 15, 2021
@valinet valinet changed the title Do not automatically update on systems without UAC Do not automatically update on systems where UAC is disabled Dec 15, 2021
@valinet
Copy link
Owner Author

valinet commented Dec 15, 2021

Implemented.

In addition to CheckElevationEnabled, the registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ConsentPromptBehaviorAdmin also indicates that a UAC prompt won't be displayed when an application would be elevated.

@valinet valinet added the fixed label Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request fixed investigating
Projects
None yet
Development

No branches or pull requests

1 participant