AlwaysInstallElevated Enabled
The Windows Installer policy AlwaysInstallElevated is enabled, so any user can install a package that runs with SYSTEM privileges.
| Severity | High |
| CVSS 3.1 | 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Open in the calculator |
| CVSS 4.0 | 8.5 CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-250: Execution with Unnecessary Privileges |
| MITRE ATT&CK | T1218.007 Msiexec, T1548 Abuse Elevation Control Mechanism |
| Category | Security Misconfiguration |
Description
The Windows Installer policy Always install with elevated privileges is enabled for both the computer and the user. When the AlwaysInstallElevated registry value is set to 1 under both HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer and HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer, Windows Installer runs every installation package with SYSTEM privileges, whoever starts it. The setting is sometimes enabled so that users can install software without help from IT, but it applies to any package, including one an attacker builds.
Any local user, or any malware running as one, can therefore obtain SYSTEM privileges by installing a crafted Windows Installer package with a single command, with no vulnerability or user interaction needed. This gives full control of the host: the attacker can create administrator accounts, extract stored credentials, disable security tools and persist. Microsoft's own documentation warns that the setting is equivalent to granting full administrative rights, and where the policy is applied to many computers through Group Policy, every one of them is affected in the same way.
The weakness is identified by querying the two registry values, for example with reg query, or by reviewing the resultant Group Policy, and local enumeration tools such as WinPEAS and PowerUp report it. It is confirmed by installing a harmless test package as a standard user and showing that its custom action runs as SYSTEM.
Remediation
- Set both Always install with elevated privileges policies to Disabled: the one under
Computer Configuration\Administrative Templates\Windows Components\Windows Installerand the one underUser Configuration\Administrative Templates\Windows Components\Windows Installer. Remove any Group Policy Preferences items or scripts that write the registry values directly. - Deliver software through a managed route that installs with administrative rights centrally, such as Microsoft Intune, Configuration Manager or Group Policy software installation assigned to computers, or through an endpoint privilege management product, rather than letting users elevate any package.
- After policy refresh (
gpupdate /force), confirm that both values are absent or set to 0:
The elevation applies only when both values are set, so disabling the computer policy is an effective interim measure while software deployment moves to a managed route. Confirm the fix by repeating the test package installation as a standard user and checking that it runs without elevated rights.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.