any where host.os.type == "windows" and
(
(event.code == "4738" and winlog.event_data.NewUACList == "USER_DONT_EXPIRE_PASSWORD") or
(
event.code == "5136" and winlog.event_data.AttributeLDAPDisplayName == "userAccountControl" and
winlog.event_data.AttributeValue in ("66048", "66080")
)
)
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).