Service Accounts With Domain Administrative Rights
Accounts that run services, tasks or applications are members of Domain Admins or similar groups, so compromising any system that uses them compromises the domain.
| Severity | High |
| CVSS 3.1 | 7.2 CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H Open in the calculator |
| CVSS 4.0 | 8.6 CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-250: Execution with Unnecessary Privileges |
| MITRE ATT&CK | T1003.004 LSA Secrets, T1558.003 Kerberoasting, T1078.002 Domain Accounts |
| Category | Broken Access Control |
Description
Service accounts are domain accounts used by applications, services, scheduled tasks and scripts rather than by people. The finding arises when such an account is a member of Domain Admins, Enterprise Admins, Administrators or another group with domain-wide control, directly or through nested groups, usually because installation was easier that way or a vendor asked for it, and the rights were never reduced. Compromising the account then gives the attacker domain administrator rights.
Service account credentials are unusually exposed. Windows stores the password of each service configured to run as a domain account in the LSA secrets of every host that runs it, and scheduled tasks set to run without the user signed in also keep their password on the host; a local administrator can recover these in clear text, so administrative access to any one of those hosts, which may be ordinary application servers, is enough. Accounts with service principal names can be Kerberoasted by any domain user, who may then obtain the password where it is crackable. Service account passwords are often old, set never to expire, shared between teams and systems, and copied into scripts, configuration files and application databases. The risk grows with the number of hosts that use the account and the weakness of its password, and because service accounts are seldom monitored as closely as named administrators, their misuse may go unnoticed.
The issue is identified by listing the members of privileged groups, including nested members, for example with Get-ADGroupMember -Recursive, BloodHound or PingCastle, and recognising service accounts among them from their names, descriptions, service principal names, password age and sign-in patterns.
Remediation
- For each service account in a privileged group, establish the rights the application actually needs, grant those specifically (for example administrative rights on the application's own servers, or delegated permissions on particular organisational units), and remove the account from the privileged group.
- Where a vendor states that domain administrator rights are needed, ask for the specific permissions the product uses.
- Replace ordinary user accounts with group managed service accounts where the application supports them: the domain generates long random passwords for them and changes them automatically, every 30 days by default, and no administrator needs to know them.
- Where an ordinary account must remain, give it a long random password, deny it interactive and Remote Desktop sign-in, and limit the hosts where it is used.
- Treat any service account that truly needs Tier 0 rights, such as one used by a directory synchronisation or domain controller backup product, as part of Tier 0: use it only on Tier 0 systems and protect and monitor it like a domain administrator.
- After reducing the rights, change the account's password, as it may already have been exposed.
Confirm the fix by listing the privileged groups' membership again and checking that no service account remains, and by confirming with the application owners that their services still work.
References
- learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-service-accounts
- learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/group-managed-service-accounts/group-managed-service-accounts/group-managed-service-accounts-overview
- learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/implementing-least-privilege-administrative-models
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.