Skip to content

Windows Privilege Escalation: AlwaysInstallElevated

by Red Team Engineers

An incredibly focused guide exploring one of the most fatal Group Policy misconfigurations in Active Directory environments, allowing any unprivileged user to execute administrative payloads.

“When the ‘Always install with elevated privileges’ setting is enabled via Group Policy, it allows Windows Installer packages (.msi files) to deploy with administrative privileges by any user. This convenience feature can be effortlessly exploited to grant an attacker an NT Authority\SYSTEM shell.”

In enterprise environments, system administrators frequently struggle with deploying software updates to endpoints without granting end-users local administrator rights. To bypass this friction, administrators sometimes enable the AlwaysInstallElevated setting within the Group Policy Editor (gpedit.msc). Windows Privilege Escalation: AlwaysInstallElevated is a tactical guide that proves why this shortcut is a catastrophic security failure.

Hunting for the Misconfiguration

The text begins by equipping the penetration tester with the exact methodology required to hunt for this specific flaw. Because attackers rarely have graphical interface access to a compromised host, the manual avoids relying on the GUI.

Instead, it details how to explicitly query the Windows Registry from a basic command-line shell to determine if the vulnerability exists:

  • reg query HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Installer
  • reg query HKLM\Software\Policies\Microsoft\Windows\Installer

Additionally, it demonstrates how to integrate this check into broader automated enumeration suites like WinPEAS, guaranteeing the misconfiguration is never overlooked during large-scale assessments.

Weaponizing the Installer

Once the vulnerability is confirmed—meaning both the HKLM and HKCU registry keys return a value of 0x1—the guide shifts aggressively to exploitation.

Because Windows natively trusts the installer process (msiexec.exe) under this policy, an attacker simply needs to generate an MSI file containing malicious instructions. The guide provides exactly how to achieve this:

  • Payload Generation: Utilizing msfvenom to compile a malicious .msi file that executes a reverse shell back to the attacker infrastructure.
  • Quiet Execution: Demonstrating the precise Native Windows command (msiexec /quiet /qn /i payload.msi) required to execute the installer completely silently in the background, ensuring the active user receives zero graphical prompts or security warnings before the SYSTEM level shell is dispatched.

Who Is This Book REALLY For?

  • Red Team Operators: Recognizing that AlwaysInstallElevated provides one of the fastest, most reliable paths to SYSTEM level access on a restricted workstation.
  • Active Directory Architects: An essential lesson on why deploying software must be managed centrally via robust deployment engines (like SCCM) rather than globally weakening workstation installation policies.
  • Security Auditors: Providing the exact registry paths required to verify that AlwaysInstallElevated is strictly prohibited during corporate baseline configuration reviews.

The Bottom Line

Windows Privilege Escalation: AlwaysInstallElevated highlights a critical lesson in Active Directory administration: functionality shortcuts almost always result in critical security vulnerabilities. By exploiting a single Group Policy switch, an attacker instantly bypasses the entire local permissions architecture.


Share article

Subscribe to my newsletter

Receive my case study and the latest articles on my WhatsApp Channel.

New Cyber Alert