User Account Control (UAC)
User Account Control (UAC) is a security infrastructure feature that helps prevent unauthorized changes to the operating system. It works by ensuring that applications and tasks run with the minimum necessary permissions required to perform their intended functions. When an application or a task requires administrator-level privileges to make changes that could potentially affect the security of the system, UAC prompts the user for consent or credentials before proceeding.
How UAC Works
UAC operates on the principle of the least privilege. Even when a user is logged in as an administrator, UAC splits their administrative privileges into two separate access tokens:
- Administrator Token: Contains all the privileges of an administrator account.
- Filtered Token: A standard user token that excludes all administrative privileges.
When a user logs in, they are granted the filtered token by default. This means that most applications will run with standard user permissions, which significantly reduces the risk of malware or unintended changes affecting the system. If an application or task requires administrative privileges, UAC will present a prompt:
UAC Levels
The behavior of UAC can be adjusted through its settings, which are accessible via the User Accounts control panel or by searching for "UAC settings". The default level is recommended for most users. The configurable levels include:
- Always notify: This is the most secure setting. You will be notified whenever an application tries to install software or make changes to your computer, even if you are logged in as an administrator.
- Notify me only when apps try to make changes to my computer (default): The system prompts you when programs try to make changes that require administrator permissions.
- Notify me only when apps try to make changes to my computer (do not dim my desktop): Similar to the default setting, but the desktop is not dimmed. This may be less secure as it's easier to miss the prompt.
- Never notify: This setting turns UAC off completely. It is not recommended as it significantly reduces system security.
Benefits of UAC
- Enhanced Security: Prevents malware and rogue applications from making system-wide changes without user knowledge or consent.
- Reduced Risk of Accidental Changes: Protects against unintended modifications to critical system settings or files.
- Principle of Least Privilege Enforcement: Ensures that applications run with only the permissions they absolutely need.
- Deters Drive-by Downloads: Makes it harder for malicious websites to silently install software or make changes to your system.
UAC and Application Compatibility
In earlier versions of Windows, some older applications were not designed to run under UAC and might have encountered compatibility issues. Windows has mechanisms to help these legacy applications function correctly, but it's always best to use applications that are designed to be UAC-aware.
Virtualization and Shimming
Windows employs technologies like UAC virtualization and shimming to allow older applications that expect to write to protected system locations (like Program Files or the registry's HKLM hive) to function without explicitly granting them administrative privileges. These mechanisms redirect writes to a user-specific location, effectively providing a virtualized environment for the application.
For more details on specific UAC prompts and their meanings, please refer to the UAC Prompts Guide.