Skip to content
Misconfiguration Write-up Beginner

Understanding Registry Escalation: Exploiting the AlwaysInstallElevated Setting for Windows Privilege Escalation

The article explains that when the AlwaysInstallElevated policy is enabled in both the machine and user registry hives, a non-administrator user can install an MSI package that runs with elevated privileges. An attacker with a low-privileged account could therefore run a crafted MSI to obtain a high-privileged shell.

Sanaullah Aman Korai Follow

Published on systemweakness.com

Registry escalation via the “AlwaysInstallElevated” policy is a type of privilege escalation attack that can be used by attackers to gain elevated privileges on a compromised Windows system. This attack takes advantage of a Windows feature that allows non-administrator users to install MSI packages with elevated…

Sanaullah Aman Korai, on systemweakness.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the AlwaysInstallElevated policy was enabled in both the HKLM and HKCU registry hives, causing the Windows Installer service to run any user-supplied MSI with SYSTEM-level privileges.

Impact

An attacker with a non-administrator account could run arbitrary code with elevated privileges, allowing them to install malware, change system settings, disable security software and keep access to the machine.

What the attacker needed

Non-administrator account on the host; AlwaysInstallElevated enabled in HKLM and HKCU

The fix

The policy should be disabled in both the machine and user registry hives so that non-administrator users cannot install MSI packages with elevated rights.

How it was found

  1. Query the machine-wide Installer policy key and observe AlwaysInstallElevated is set to 1
  2. Query the per-user Installer policy key and observe AlwaysInstallElevated is set to 1
  3. Start a Metasploit handler listening for a reverse TCP Meterpreter connection
  4. Generate an MSI package containing the reverse TCP payload
  5. Copy the MSI to the target and install it quietly with msiexec

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Windows can be configured so that any user is allowed to install software packages (MSI files) as if they were an administrator. If that setting is switched on, someone who already has a normal, limited account can build a package that runs their own commands with full administrator rights. This turns a small foothold into full control of the machine.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by Sanaullah Aman Korai

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.