Skip to content

garatc/MSIAudit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

MSI package Auditor

A PowerShell script to audit installed MSI packages listed in the Windows SecureRepairWhitelist registry key for privilege escalation (but can also audit all MSI packages and ignore the whitelist if needed).

Why

The HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer\SecureRepairWhitelist registry key allows standard users to trigger repair operations (msiexec /fa) on specific MSI packages without an UAC prompt (which was allowed by default for years before the recent patch by MS).

Features

  • Enumerates all installed MSI products on a system.

  • Cross-references them with the SecureRepairWhitelist.

  • For each whitelisted package, scans for potentially dangerous CustomActions (those running with NoImpersonate between InstallInitialize and InstallFinalize that run with elevated privileges).

  • Generates a comprehensive audit report in both TXT and HTML formats.

  • This script can also be useful if your target system is older and doesn't have the MS patch installed. Just use the -ScanAll switch.

Sample Report

The script generates an HTML report for easy analysis of potential vulnerabilities.

HTML Report Screenshot

Usage

Scan only whitelisted packages (useful for recent Windows versions - default)

.\auditMSIWhitelist.ps1 -ReportPath "C:\ReportPath"

Scan ALL installed packages (useful for older Windows versions where UAC never showed during repair process)

.\auditMSIWhitelist.ps1 -ReportPath "C:\ReportPath" -ScanAll

Disclaimer

This script is intended for security auditing and educational purposes. Always test scripts in a controlled environment. The author is not responsible for any misuse or damage.

About

Auditing tool for MSI packages whitelisted through the SecureRepairWhitelist reg key

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors