Windows Installer arbitrary content manipulation Elevation of Privilege (CVE-2020-0911)
The Windows Installer accesses MSI files in C:\Windows\Installer while impersonating the user, and later performs privileged operations based on data from those files. An unprivileged user could redirect the MSI file access to a malicious file and cause the installer to create arbitrary registry keys with SYSTEM privileges.
A few months ago, an interesting vulnerability in Windows Installer (from Adrian Denkiewicz) reminded Jonas Lykkegård of a vulnerability he discovered in 2020, for the exploitation of which I lent a hand. While a bit old (patched in September 2020), this vulnerability is still interesting, in part because instead of a…
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
The Windows Installer reads the MSI file while impersonating the user (using the user's device map), but later performs privileged operations based on that data without re-validating the file's integrity.
Impact
An unprivileged user could obtain SYSTEM privileges, but the exploit requires at least one installed MSI package and careful manipulation of the device map to avoid breaking the session.
What the attacker needed
At least one installed MSI package; ability to create object symlinks and modify device map; local access to the machine
The fix
Microsoft released a patch in September 2020 security updates; users should apply updates through usual channels.
How it was found
- Find and copy an existing MSI file from C:\Windows\Installer.
- Create a registry key symlink to the target registry key and value.
- Patch the binary MSI file to replace the registry key/entry path, name and value.
- Change the user device map to redirect C:, C:\Windows and C:\Windows\Installer through object directories and object symlinks, and change the device map of existing processes so they continue running undisturbed.
- Run msiexec on the MSI file from C:\Windows\Installer (but the modified file will be accessed instead because of the redirection).
- The elevated msiexec will use the fake MSI file and create the desired registry key, then trigger a crash to execute WerFault.exe and its debugger as SYSTEM.
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 Installer is a system program that installs software. It normally reads installation files from a protected folder, but when a normal user triggers a repair, it reads the file while acting as that user. The bug lets the user trick the installer into reading a different file, which the installer then uses to make changes as the all-powerful SYSTEM account.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.