2.2.14 Ensure 'Deny log on as a service' to include 'Guests'

Information

This security setting determines which service accounts are prevented from registering a process as a service. This user right supersedes the Log on as a service user right if an account is subject to both policies.

The recommended state for this setting is to include: Guests.

Note: This security setting does not apply to the System, Local Service, or Network Service accounts.

Rationale:

Accounts that can log on as a service could be used to configure and start new unauthorized services, such as a keylogger or other malicious software. The benefit of the specified countermeasure is somewhat reduced by the fact that only users with administrative privileges can install and configure services, and an attacker who has already attained that level of access could configure the service to run with the System account.

Impact:

If you assign the Deny log on as a service user right to specific accounts, services may not be able to start and a DoS condition could result.

Solution

To establish the recommended configuration, set the following Device Configuration Policy to Guests:

To access the Device Configuration Policy from the Intune Home page:

Click Devices

Click Configuration profiles

Click Create profile

Select the platform (Windows 10 and later)

Select the profile (Endpoint protection)

Click Create

Enter a Name

Click Next

Configure the following Setting

Path: Endpoint protection/User Rights
Setting Name: Deny log on as a service
Configuration: Allow and sub-option: Guests

Select OK

Continue through the Wizard to complete the creation of the profile (profile assignments, applicability etc.)

Note: More than one configuration setting from each of the Configuration profiles (ex: Administrative Templates, Custom etc.) can be added to each Device Configuration Policy.


Note #2: This setting can also be created via a Custom Configuration Profile using the following OMA-URI:

Name: <Enter name>
Description: <Enter Description>
OMA-URI: ./Device/Vendor/MSFT/Policy/Config/UserRights/DenyLogOnAsService
Data type: String
Value: Guests

Important: When there is more than one value that needs to be entered (ex: Guests, Administrator), the XML value of &#61440; will need to be converted to its Unicode character representation to separate the values in the Value field of the Custom Device Configuration Policy. This value should convert to a square with a question mark in it (). Please note that when copied from the converter to Intune a square will appear, but the value will still work. Also note that this value cannot be copied from sources like Microsoft Word. We recommend that the value be copied and used directly from the converter. A sample converter can be found at Online XML entity decoder | Coder's Toolbox.




Select OK

Continue through the Wizard to complete the creation of the profile (profile assignments, applicability etc.)

Note #3: The following link is an alternative way to set the 'User Rights Assignment' section. Policy CSP - UserRights - Windows Client Management | Microsoft Docs

Default Value:

No one.

See Also

https://workbench.cisecurity.org/benchmarks/14664