πΌ Management Samenvatting
De AlwaysInstallElevated beleid moet ALTIJD uitgeschakeld blijven omdat deze een triviale privilege escalation kwetsbaarheid introduceert waarmee standaard gebruikers volledige SYSTEM-level toegang kunnen verkrijgen.
β Windows 11
β Windows Server
KRITIEKE PRIVILEGE ESCALATION: AlwaysInstallElevated is een van de MEEST GEVAARLIJKE Windows configuraties. Wanneer Schakel ind op zowel HKLM als HKCU: Alle MSI installers worden uitgevoerd met SYSTEM privileges (hoogste niveau), Standaard gebruikers kunnen arbitrary code uitvoeren als SYSTEM, Geen UAC prompt (bypassed). ATTACK SCENARIO: Attacker heeft standaard user access (geen admin) β Maakt malicious MSI file (bevat malware/ransomware) β Executes MSI β Installer runs as NT AUTHORITY\SYSTEM β volledige admin privileges verkregen β Domain compromise mogelijk. TRIVIAL EXPLOITATION: MSI files zijn makkelijk te maken (via WiX Toolset, InstallShield), Public exploits beschikbaar (Metasploit module), Penetration testers checken dit ALTIJD (low-hanging fruit), detectie: Simple registry check. REAL-WORLD USAGE: Ransomware gebruikt dit voor privilege escalation, APT groeps voor persistence, Red team assessments vinden dit frequent misConfigureerd. waarom Schakel inD IS CATASTROPHIC: Standaard users kunnen: Installeren van malware met SYSTEM privileges, Bypassen van application control (AppLocker/WDAC), Schakel uitn van antivirus, CreΓ«ren van beheerdersaccounts, Installeren van backdoors met volledige privileges. LEGITIMATE gebruiken CASE: NONE in moderne Windows. Enterprise software Implementeereerment moet via: Intune app Implementeereerment (controlled), SCCM/ConfigMgr (managed), Signed MSI packages via beheerde Implementeereerment. DEZE beleid MAG NOOIT Schakel inD ZIJN.
Connection:
RegistryRequired Modules:
Implementatie
Verificatie dat AlwaysInstallElevated Schakelt uit de is op beide locaties: HKLM:\SOFTWARE\beleidsregels\Microsoft\Windows\Installer\AlwaysInstallElevated moet NIET bestaan OF is 0, HKCU:\SOFTWARE\beleidsregels\Microsoft\Windows\Installer\AlwaysInstallElevated moet NIET bestaan OF is 0. KRITIEK: Beide registry keys moeten 0 zijn (of niet bestaan). Als één van beide is 1, is system KWETSBAAR. VERIFICATION: Controleer beide HKLM en HKCU keys, If ofwel is 1 (Schakel ind) is KRITIEKE beveiliging VULNERABILITY, If beide zijn 0 of niet-existent is veilige (compliant). REMEDIATION: Set beide keys to 0 (of delete keys), Investigate HOE deze Schakel ind werden (malware? misconfiguration?), Security scan voor exploitation evidence.
- Intune admin center β Endpoint security β Aanvalsoppervlak reduction
- Maak aan beleid β Platform: Windows 10 en later
- Setting: Windows Installer β AlwaysInstallElevated is Schakelt uit de (0)
- Scope: HKLM en HKCU (beide moeten Schakel uitd)
- Assign to: alle devices (geen uitzonderingen)
- monitor compliance: moet be 100%
- GPO: Computer Configuration β Administrative Templates β Windows Components β Windows Installer
- beleid: 'Always install met elevated privileges' is Schakel uitd
- Ook: User Configuration β Administrative Templates β Windows Components β Windows Installer
- beleid: 'Always install met elevated privileges' is Schakel uitd
- BEIDE beleidsregels moeten Schakelt uit de (Computer en User)
- Run PowerShell als Administrator
- Controleer HKLM: Get-ItemProperty 'HKLM:\SOFTWARE\beleidsregels\Microsoft\Windows\Installer' -Name AlwaysInstallElevated -ErrorAction SilentlyContinue
- Controleer HKCU: Get-ItemProperty 'HKCU:\SOFTWARE\beleidsregels\Microsoft\Windows\Installer' -Name AlwaysInstallElevated -ErrorAction SilentlyContinue
- Expected: beide return NOTHING (key niet bestaat) of value is 0
- If ofwel returns 1: CRITICAL VULNERABILITY - remediate immediately
Vereisten
Voor verificatie en remediation:
- Windows 10, Windows 11, of Windows Server (alle versies)
- Administrator rechten voor registry verificatie
- Intune of groep beleid voor preventieve enforcement
- Security monitoring voor early detectie indien Schakel ind wordt
Implementeeratie
CRITICAL - Preventieve enforcement via Intune:
- Intune admin center β Endpoint security β Aanvalsoppervlak reduction
- Maak aan beleid β Platform: Windows 10 en later
- Setting: Windows Installer β AlwaysInstallElevated is Schakelt uit de (0)
- Scope: HKLM en HKCU (beide moeten Schakel uitd)
- Assign to: alle devices (geen uitzonderingen)
- monitor compliance: moet be 100%
Gebruik PowerShell-script always-install-elevated-Schakel uitd.ps1 (functie Invoke-Remediation) β Verificatie en remediation van AlwaysInstallElevated op HKLM en HKCU.
via groep beleid (on-premises):
- GPO: Computer Configuration β Administrative Templates β Windows Components β Windows Installer
- beleid: 'Always install met elevated privileges' is Schakel uitd
- Ook: User Configuration β Administrative Templates β Windows Components β Windows Installer
- beleid: 'Always install met elevated privileges' is Schakel uitd
- BEIDE beleidsregels moeten Schakelt uit de (Computer en User)
handmatige verificatie (voor immediate check):
- Run PowerShell als Administrator
- Controleer HKLM: Get-ItemProperty 'HKLM:\SOFTWARE\beleidsregels\Microsoft\Windows\Installer' -Name AlwaysInstallElevated -ErrorAction SilentlyContinue
- Controleer HKCU: Get-ItemProperty 'HKCU:\SOFTWARE\beleidsregels\Microsoft\Windows\Installer' -Name AlwaysInstallElevated -ErrorAction SilentlyContinue
- Expected: beide return NOTHING (key niet bestaat) of value is 0
- If ofwel returns 1: CRITICAL VULNERABILITY - remediate immediately
monitoring
Gebruik PowerShell-script always-install-elevated-disabled.ps1 (functie Invoke-Monitoring) β Controleren.
Kritieke monitoring (dagelijks):
- Automated registry scans: Controleer alle devices voor AlwaysInstallElevated is 1
- ALERT onmiddellijk indien gevonden (Deze is CRITICAL beveiligingsincident)
- Compliance dashboard: moet show 100% compliant (zero tolerance)
- Penetration testing: omvatten AlwaysInstallElevated Controleer in regular pentests
- Vulnerability scans: Nessus, Qualys, OpenVAS checken dit automatic
Incident indicators:
- Registry key plotseling appears met value 1 is possible malware activity
- MSI installations door standaard users zonder UAC prompt is exploitation in progress
- Unexpected SYSTEM-level processes is post-exploitation activity
- Event ID 1042 (Windows Installer elevated installation) van standard user is investigation VEREIST
Remediatie
Gebruik PowerShell-script always-install-elevated-disabled.ps1 (functie Invoke-Remediation) β Herstellen.
Als AlwaysInstallElevated Schakel inD is gevonden (KRITIEKE BEVEILIGINGSINCIDENT):
- ONMIDDELLIJKE ACTIE: Schakel uit beleid via registry (beide HKLM en HKCU keys is 0)
- ISOLATIE: Disconnect affected device van netwerk (Voorkom lateral movement)
- ONDERZOEK: HOE werd deze beleid Schakel ind? handmatige misconfiguration? Malware? Attacker?
- FORENSICS: Controleer Event Logs: Event ID 1042 (elevated MSI installations), Process creation logt (what MSI's were run?), netwerkverbindings (was er C2 communication?)
- MALWARE SCAN: volledige system scan met Defender/EDR (AlwaysInstallElevated vaak Schakel ind door malware)
- credential RESET: Assume compromise - reset machine account, user passwords
- REIMAGING CONSIDERATION: If exploitation suspected, clean reimage safer dan remediation
- ROOT CAUSE: Fix wat Schakel ind deze beleid (malware removal, GPO correction, Toegangscontrole en authenticaties)
- PREVENTIE: Zorg ervoor dat Intune/GPO beleid enforcement voorkomt re-Schakel inment
Compliance en Auditing
Deze control is VERPLICHT voor alle compliance frameworks:
- CIS Microsoft Windows Benchmark - control 18.9.85.1 & 18.9.85.2 (Computer & User) - Level 1 VERPLICHT
- BIO 12.06 - control van technische kwetsbaarheden: AlwaysInstallElevated is known critical vulnerability
- ISO 27001 A.12.6.1 - Management of technical vulnerabilities
- NIS2 Artikel 21 - Cybersecurity risicobeheer: Privilege escalation prevention
- NIST CSF PR.IP-1 - Baseline configuration maintained
- Essential Eight (Australia): Application hardening - Privilege escalation prevention
Compliance & Frameworks
- CIS M365: Control 18.9.85.1 & 18.9.85.2 (L1) - Always install met elevated privileges moet be Schakelt uit de (Computer en User)
- BIO: 12.06.01 - Beheer van technische kwetsbaarheden - Privilege escalation prevention
- ISO 27001:2022: A.12.6.1 - Management of technical vulnerabilities
- NIS2: Artikel - Cybersecurity risicobeheer - Least privilege
Automation
Gebruik het onderstaande PowerShell script om deze security control te monitoren en te implementeren. Het script bevat functies voor zowel monitoring (-Monitoring) als remediation (-Remediation).
Risico zonder implementatie
Management Samenvatting
Zorg dat AlwaysInstallElevated ALTIJD Schakelt uit de is (beide HKLM en HKCU registry keys is 0 of niet-existent). Dit voorkomt triviale privilege escalation van standaard user naar SYSTEM. Verplicht voor CIS Level 1, BIO 12.06, ISO 27001 A.12.6.1, NIS2. Implementeeratie: 1-2 uur voor beleid Implementeereerment + monitoring. KRITIEKE VULNERABILITY PREVENTION - nul TOLERANCE.
- Implementatietijd: 2 uur
- FTE required: 0.02 FTE