Course contentsShow
← Security
Lesson 2136 of 3,05242. Penetration Testing and Red TeamingFree lesson

Always Install Elevated and MSI Exploitation

Exploiting Windows Installer policies that allow standard users to install with SYSTEM privileges through malicious MSI packages.

Always Install Elevated and MSI Exploitation

You'll learn how attackers exploit a dangerous Windows Installer policy setting that lets unprivileged users install software with SYSTEM-level rights.

The Vulnerability

Windows Installer (MSI) packages normally run with the permissions of the current user. However, two Group Policy settings — AlwaysInstallElevated — can change this behavior. When enabled both in HKLM (machine-wide) and HKCU (user-level) registry keys, any user can install MSI packages with SYSTEM privileges.

Think of it like giving every employee in a building a master key instead of just their office key. If you can create or provide an MSI file, you effectively have a privilege escalation path.

How Attackers Exploit It

Attackers follow this pattern:

  1. Enumerate the registry to check if AlwaysInstallElevated is enabled:

    • HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer\AlwaysInstallElevated = 1
    • HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer\AlwaysInstallElevated = 1
  2. Create a malicious MSI package containing a payload (reverse shell, add user to Administrators group, credential dumper, etc.)

  3. Execute the MSI using msiexec /quiet /qn /i malicious.msi — the installer runs with SYSTEM context even though launched by a standard user

Why This Is Dangerous

This misconfiguration essentially removes the security boundary between standard users and SYSTEM. It's often left enabled in poorly managed environments where IT wants to avoid UAC prompts for legitimate software installs, not realizing the security implications.

Key Takeaway: AlwaysInstallElevated is a high-impact privilege escalation vector when both registry settings are enabled; always check these keys during enumeration and craft MSI payloads to gain SYSTEM access from unprivileged accounts.