Elastic medium stable eql
Account Configured with Never-Expiring Password
Detects the creation and modification of an account with the "Don't Expire Password" option Enabled. Attackers can abuse this misconfiguration to persist in the domain and maintain long-term access using compromised accounts with this property.
Detection Logic
any where host.os.type == "windows" and
(
(
event.code == "4738" and winlog.event_data.NewUACList == "USER_DONT_EXPIRE_PASSWORD" and not user.id == "S-1-5-18"
) or
(
event.code == "5136" and winlog.event_data.AttributeLDAPDisplayName == "userAccountControl" and
winlog.event_data.AttributeValue in ("66048", "66080") and winlog.event_data.OperationType == "%%14674" and
not (
winlog.event_data.SubjectUserName : "*svc*" or
winlog.event_data.ObjectDN : "*Service*"
)
)
) False Positives
- ⚠ User accounts can be used as service accounts and have their password set never to expire. This is a bad security practice that exposes the account to Credential Access attacks. For cases in which user accounts cannot be avoided, Microsoft provides the Group Managed Service Accounts (gMSA) feature, which ensures that the account password is robust and changed regularly and automatically.
Field Validations
Loading…
Comments (0)
Loading comments...