When Did That Service Account Last Rotate? (Part 5 of 6)
Enabling businesses to self-secure providing enterprise-grade security practices, regardless of size. Businesses shouldnโt REQUIRE massive IT security teams to keep their business safe.
Part 5 of 6 ยท Moving Past LDAP Simple Bind
Starting here is honestly fine – this is the part people quietly need most. Quick orientation if you skipped the earlier ones: the series treats securing LDAP as three separate jobs – the connection, the login, and the account – and this part is the account. It’s the one the other fixes leave untouched.
This series splits “securing LDAP” into three jobs – transit (A), authentication (B), and the account itself (C). Part 3 handled the tunnel; Part 4 handled the login. This article is Concern C, the one the other controls leave on the table – and it is where simple bind does its quietest damage.
๐ง๐ต๐ฒ ๐ฎ๐ฐ๐ฐ๐ผ๐๐ป๐ ๐ฒ๐๐ฒ๐ฟ๐๐ผ๐ป๐ฒ ๐ต๐ฎ๐ ๐ฎ๐ป๐ฑ ๐ป๐ผ๐ฏ๐ผ๐ฑ๐ ๐๐ฎ๐น๐ธ๐ ๐ฎ๐ฏ๐ผ๐๐
A shared, static, over-privileged service account whose password has not changed in years. Sound familiar? Most environments have at least one. It is unique or shared – usually shared. Least-privilege or over-powered – usually over-powered. Its password rotates – almost never. And you can tell who used it – almost never that either.
A perfectly encrypted tunnel and a flawless Kerberos bind do nothing about this. A gMSA bound over cleartext still leaks; an over-privileged account is dangerous no matter how it authenticates. Account hygiene is not a substitute for transit or authentication controls – it sits alongside them. The fix is to stop hand-managing these accounts.

a shared, static account whose password never changed
๐ด๐ ๐ฆ๐ – ๐๐ต๐ฒ ๐ฏ๐๐ถ๐น๐ฑ๐ถ๐ป๐ด ๐บ๐ฎ๐ป๐ฎ๐ด๐ฒ๐ ๐ถ๐๐ ๐ผ๐๐ป ๐ธ๐ฒ๐๐
A group Managed Service Account (gMSA) is a domain account whose password Active Directory creates and rotates automatically (every 30 days by default – set at creation and fixed for the life of the account), handing it only to the specific computers you authorize through a security group. No stored password, automatic SPN management, and a clear record of use.
If a service account is a set of building keys, many teams today cut one master key, hand copies to everyone, and never re-cut them. A gMSA is the building managing its own keys: re-cut automatically on a schedule, handed only to the staff who need them, with a log of every use. You never hold the master key, so you cannot lose it.

AD rotates the key for you, automatically
๐ฑ๐ ๐ฆ๐ – ๐ฏ๐๐ถ๐น๐ ๐๐ผ ๐ฟ๐ฒ๐ฝ๐น๐ฎ๐ฐ๐ฒ ๐๐ต๐ฒ ๐ผ๐น๐ฑ ๐ฎ๐ฐ๐ฐ๐ผ๐๐ป๐ ๐ผ๐๐๐ฟ๐ถ๐ด๐ต๐
On Windows Server 2025, a delegated Managed Service Account (dMSA) goes further. A dMSA is designed to replace an existing standard service account, migrating it into a managed account whose authentication is bound to approved machine identities – so credentials harvested from the old account stop working. It aims squarely at the credential-harvesting attacks that plague traditional service accounts.
Powerful, but read the caution before you roll it out broadly.
๐๐ผ๐ ๐๐ผ ๐ถ๐บ๐ฝ๐น๐ฒ๐บ๐ฒ๐ป๐, ๐ฏ๐ฟ๐ถ๐ฒ๐ณ๐น๐:
-
Ensure the KDS root key exists in the domain (Add-KdsRootKey), then create the account with New-ADServiceAccount.
-
Authorize only the specific hosts that may retrieve the password, via a security group on the account.
-
Install it on each host (Install-ADServiceAccount) and point the service at it – no password to store.
-
Scope its directory rights to least privilege: grant only what the service truly needs, and review it.
-
On 2025, evaluate dMSA for new services. Note the current Credential Guard machine-account rotation caveat before broad rollout, and confirm Kerberos encryption types, DNS, and SPNs are in order.
๐ง๐๐ผ ๐ฐ๐ฎ๐๐๐ถ๐ผ๐ป๐ ๐๐ผ๐ฟ๐๐ต ๐๐ผ๐๐ฟ ๐ฎ๐๐๐ฒ๐ป๐๐ถ๐ผ๐ป. First, the Credential Guard rotation caveat above – test it before you depend on it. Second, “BadSuccessor” – a dMSA privilege-escalation technique (Microsoft-rated moderate, no patch as of this writing) that the mere presence of a 2025 DC exposes, whether or not you use dMSA. The exposure comes from who can create dMSA objects, so audit and restrict create/write permissions on your OUs accordingly.

reinforces the “BadSuccessor” dMSA escalation caution
๐ง๐ต๐ฒ ๐๐ฒ๐ป๐๐ฒ๐ป๐ฐ๐ฒ ๐๐ต๐ฎ๐ ๐๐ถ๐ฒ๐ ๐ฎ๐น๐น ๐๐ต๐ฟ๐ฒ๐ฒ ๐ฐ๐ผ๐ป๐ฐ๐ฒ๐ฟ๐ป๐ ๐๐ผ๐ด๐ฒ๐๐ต๐ฒ๐ฟ
Here is the detail that proves the whole framing of this series in a single fact: Windows will not return a gMSA’s password (the msDS-ManagedPassword attribute) over LDAP unless the connection provides confidentiality – LDAPS, or a Kerberos sign-and-sealed connection.
That is the three concerns in one sentence. The account control (C) depends on a protected channel (A), and neither replaces the authentication mechanism (B). You cannot cleanly do C without having done A. They are genuinely interlocking, which is exactly why “we turned on LDAPS” was never a finish line.

the account control depends on a protected channel
๐ค๐๐ถ๐ฐ๐ธ ๐ฎ๐ป๐๐๐ฒ๐ฟ๐ ๐ฝ๐ฒ๐ผ๐ฝ๐น๐ฒ ๐ฎ๐น๐๐ฎ๐๐ ๐ฎ๐๐ธ
-
๐๐ผ๐ฒ๐ ๐ฎ ๐ด๐ ๐ฆ๐ ๐ผ๐ฟ ๐ฑ๐ ๐ฆ๐ ๐ฒ๐ป๐ฐ๐ฟ๐๐ฝ๐ ๐ฎ๐ป๐๐๐ต๐ถ๐ป๐ด ๐ผ๐ป ๐๐ต๐ฒ ๐๐ถ๐ฟ๐ฒ? No. Managed accounts address the account itself – rotation, no stored password, scoping. They do nothing for transit or the bind on their own.
-
๐๐ผ๐ฒ๐ ๐ฎ ๐บ๐ฎ๐ป๐ฎ๐ด๐ฒ๐ฑ ๐ฎ๐ฐ๐ฐ๐ผ๐๐ป๐ ๐ฟ๐ฒ๐บ๐ผ๐๐ฒ ๐๐ต๐ฒ ๐ป๐ฒ๐ฒ๐ฑ ๐ณ๐ผ๐ฟ ๐๐๐๐ฃ๐ฆ? No – the opposite. Windows won’t return a gMSA password over LDAP unless the connection provides confidentiality. The account control depends on a protected channel.
-
๐๐ผ๐ฒ๐ ๐ถ๐ ๐ฟ๐ฒ๐ฝ๐น๐ฎ๐ฐ๐ฒ ๐๐ฒ๐ฟ๐ฏ๐ฒ๐ฟ๐ผ๐? No. A gMSA/dMSA is what the service authenticates as; Kerberos is how it authenticates. Use them together.
๐ง๐ต๐ถ๐ ๐ถ๐ ๐ฃ๐ฎ๐ฟ๐ ๐ฑ ๐ผ๐ณ ๐ฎ ๐ฒ-๐ฝ๐ฎ๐ฟ๐ ๐๐ฒ๐ฟ๐ถ๐ฒ๐.
Previously – Part 4: Why Send a Password You Can’t Take Back?
Next – Part 6: Are You Hoping Your LDAP Is Secure – or Do You Know? Three concerns, one migration. We sequence the whole effort end to end, cover publishing secure LDAP behind an F5, and document the controlled, time-boxed exception for that one legacy system that just won’t move yet.
Full series:
-
Part 1 – Did You Really Secure LDAP – or Just One-Third of It?
-
Part 5 – When Did That Service Account Last Rotate? (this article)
-
Part 6 – Are You Hoping Your LDAP Is Secure – or Do You Know?
What’s the oldest service account in your directory, and when did its password last change? No judgment – we’ve all inherited one.
We’ve all inherited the account whose password hasn’t changed in years. If this article named yours, repost it – and go find out who can create dMSA objects in your domain before someone else does. Follow for Part 6, where the whole series comes together.
No judgment, but: how old is the oldest service account in your directory? Drop it below. And repost this for the teammate who owns the one you’re both quietly avoiding.

๐ฅ๐ฒ๐ณ๐ฒ๐ฟ๐ฒ๐ป๐ฐ๐ฒ๐:
๐๐น๐ผ๐๐๐ฎ๐ฟ๐
-
Service account: a non-human account an application or service logs in as; often shared, static, and over-privileged, which makes it the weak point this part fixes.
-
gMSA: Group Managed Service Account; a domain account whose strong password Active Directory generates and rotates automatically, scoped to authorized hosts.
-
dMSA: Delegated Managed Service Account; a Windows Server 2025 account type that replaces a standard service account, binding authentication to approved machine identities.
-
Least privilege: granting an account only the access it actually needs, and nothing more.
-
KDS root key: the domain-wide key material that makes gMSA/dMSA password generation possible (created with Add-KdsRootKey).
-
SPN: Service Principal Name; the unique name Kerberos uses to identify a service; managed automatically for a gMSA.
-
Credential Guard: a Windows security feature that isolates and protects stored credentials; note its machine-account rotation caveat before broad dMSA rollout.
-
BadSuccessor: a dMSA privilege-escalation technique exposed by the presence of a 2025 DC; mitigated by restricting who can create dMSA objects.
-
OU: Organizational Unit; a container in Active Directory used to group objects so permissions and policy can be targeted at them.
-
msDS-ManagedPassword: the directory attribute holding a gMSA’s password, which AD only returns over a confidential connection (LDAPS or Kerberos sign-and-seal).
-
LDAPS: LDAP over TLS (port 636); the protected channel a gMSA password retrieval depends on.
-
Kerberos: the ticket-based authentication a managed account uses; what the service authenticates with, while the gMSA/dMSA is what it authenticates as.
#ActiveDirectory #gMSA #ServiceAccounts #WindowsServer2025 #IdentitySecurity
