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*"
)
)
)
Install detection rules in Elastic Security
Detect Account Configured with Never-Expiring Password in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).