Windows services are managed via the Service Control Manager (SCM) system, accessible via the services.msc MMC add-in.

This add-in provides a GUI interface for interacting with and managing services and displays information about each installed service.

It is also possible to query and manage services via the command line using sc.exe using PowerShell cmdlets such as Get-Service.

Service Control

PS C:\htb> Get-Service | ? {$_.Status -eq "Running"} | select -First 2 |fl

Windows has three categories of services: Local Services, Network Services, and System Services. Service statuses can appear as Running, Stopped, or Paused, and they can be set to start manually, automatically, or on a delay at system boot. Services can also be shown in the state of Starting or Stopping if some action has triggered them to either start or stop. Windows has three categories of services: Local Services, Network Services, and System Services. Services can usually only be created, modified, and deleted by users with administrative privileges. Misconfigurations around service permissions are a common privilege escalation vector on Windows systems.

In Windows, we have some critical system services that cannot be stopped and restarted without a system restart. If we update any file or resource in use by one of these services, we must restart the system.

ServiceDescription
smss.exeSession Manager SubSystem. Responsible for handling sessions on the system.
csrss.exeClient Server Runtime Process. The user-mode portion of the Windows subsystem.
wininit.exeStarts the Wininit file .ini file that lists all of the changes to be made to Windows when the computer is restarted after installing a program.
logonui.exeUsed for facilitating user login into a PC
lsass.exeThe Local Security Authentication Server verifies the validity of user logons to a PC or server. It generates the process responsible for authenticating users for the Winlogon service.
services.exeManages the operation of starting and stopping services.
winlogon.exeResponsible for handling the secure attention sequence, loading a user profile on logon, and locking the computer when a screensaver is running.
SystemA background system process that runs the Windows kernel.
svchost.exe with RPCSSManages system services that run from dynamic-link libraries (files with the extension .dll) such as “Automatic Updates,” “Windows Firewall,” and “Plug and Play.” Uses the Remote Procedure Call (RPC) Service (RPCSS).
svchost.exe with Dcom/PnPManages system services that run from dynamic-link libraries (files with the extension .dll) such as “Automatic Updates,” “Windows Firewall,” and “Plug and Play.” Uses the Distributed Component Object Model (DCOM) and Plug and Play (PnP) services.

This link has a list of Windows components, including key services.

Most services run with LocalSystem privileges by default which is the highest level of access allowed on an individual Windows OS. Not all applications need Local System account-level permissions, so it is beneficial to perform research on a case-by-case basis when considering installing new applications in a Windows environment. It is a good practice to identify applications that can run with the least privileges possible to align with the principle of least privilege.

Notable built-in service accounts in Windows:

  • LocalService

  • NetworkService

  • LocalSystem