3.11 Ensure 'encryption providers' are locked down

Information

By default, whenever a property is encrypted, IIS uses the defaultProvider for encryption defined in machine.config. The IIS local system process (WAS) runs under the context of LOCALSYSTEM and needs access to the application pool passwords. However, by default the IIS_IUSRS security group is granted read access. It is recommended that the IIS_IUSRS group have access to the iisWasKey revoked.

The iisWasKey is intended for access only by Administrators and SYSTEM. Since the IIS_IUSRS group is granted read access, an attacker compromising an application set to use a principal in the IIS_IUSRS group could potentially gain access to the encryption key(s). Revoking this unnecessary privilege will reduce attack surface and help maintain confidentiality and system/application integrity.

Solution

Removing access to the iisWasKey can be done by using an aspnet_regiis.exe command. The syntax is as follows, and is dependent on the version of .NET being used:
%systemroot%\Microsoft.NET\Framework\aspnet_regiis.exe -pr iisWasKey IIS_IUSRS
To remove read access to the IIS_IUSRS security group on a system using .NET Framework v2.0:
1. Open an elevated command prompt
2. Run the following aspnet_regiis.exe command:
%systemroot%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -pr iisWasKey IIS_IUSRS

If running a 64-bit system, also run the following:
%systemroot%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -pr iisWasKey IIS_IUSRS

Note: A unique version of aspnet_regiis.exe is included with each version of the .NET Framework. Since each version of the tool applies only to its associated version of the .NET Framework, be sure to use the appropriate version of the tool.

See Also

https://workbench.cisecurity.org/files/165

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-6

Plugin: Windows

Control ID: 5c6194e7a6479efda2412d90591401d59ca8a09cbe8f5865fe2f69a7e2c773bf