Weak Service Permissions
A Windows service's configuration, executable or registry key can be changed by unprivileged users, letting them run code with the service's privileges.
| Severity | High |
| CVSS 3.1 | 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Open in the calculator |
| CVSS 4.0 | 8.5 CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-732: Incorrect Permission Assignment for Critical Resource |
| OWASP Top 10 | A01:2025 Broken Access Control |
| MITRE ATT&CK | T1574.010 Services File Permissions Weakness, T1574.011 Services Registry Permissions Weakness, T1543.003 Windows Service |
| Category | Broken Access Control |
Description
A Windows service can be reconfigured or replaced by users who are not administrators. Three forms are common: the service's own access control list grants rights such as SERVICE_CHANGE_CONFIG, WRITE_DAC or SERVICE_ALL_ACCESS to broad groups such as Everyone, Authenticated Users or Users; the service executable, or a DLL or script it loads, sits in a directory those groups can write to; or the service's registry key under HKLM\SYSTEM\CurrentControlSet\Services can be modified by them. The cause is usually a third-party installer that sets permissive access control lists, or software installed outside the protected Program Files folders.
A local user can then make the service run a command or program of their choosing, for example by pointing its binary path at a command that adds them to the local Administrators group, and then starting the service or waiting for a reboot. Services commonly run as LocalSystem, so the user gains full control of the host, including stored credentials, security tooling and any data on it, and where administrators sign in to the host, the credentials obtained can extend the compromise to other systems.
The weakness is identified by reviewing service, file and registry permissions, for example with Sysinternals accesschk, sc sdshow, icacls and the PowerShell Get-Acl cmdlet, and local enumeration tools such as WinPEAS and PowerUp report it automatically. It is confirmed by showing that a standard user can change the service's binary path, replace its executable or alter its registry values.
Remediation
Close every route by which an unprivileged user can influence the service:
- Reset the service's security descriptor so that only SYSTEM and Administrators hold rights that change its configuration or permissions. Standard users should hold at most the rights to query the service and, where there is a business need, to start or stop it.
- Remove write, modify and full control permissions for Everyone, Authenticated Users, Users and similar groups from the service executable, the directory that contains it, and any DLLs, scripts or configuration files it loads.
- Remove write access for those groups from the service's registry key and its subkeys.
- Enforce the corrected permissions through Group Policy, in the System Services, File System and Registry nodes under
Computer Configuration\Policies\Windows Settings\Security Settings, so that reinstallation does not restore the weak settings, and report the defect to the vendor.
As an interim measure, disable the affected service where it is not needed. Confirm the fix by repeating the permission checks as a standard user and verifying that the service configuration, executable and registry key can no longer be changed.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.