Sensitive Attributes Discovery via LDAP
Description
Attackers often query LDAP for sensitive attributes that may contain credentials, password-like values, or LAPS-managed local admin passwords.
Query · eql
api where process.Ext.api.name == "ldap_search" and user.id != "S-1-5-18" and
not process.executable :
("?:\\Program Files\\Azure Advanced Threat Protection Sensor\\*\\Microsoft.Tri.Sensor.exe",
"?:\\Windows\\ADFS\\Microsoft.IdentityServer.ServiceHost.exe") and
process.Ext.api.parameters.search_filter : (
// LAPS attributes
"*(name=ms-Mcs-AdmPwd)*",
"(&(objectCategory=Computer)(ms-MCS-AdmPwd=?))",
"*(name=ms-Mcs-AdmPwdExpirationTime)*",
"*(name=msLAPS-Password)*",
// Password related attributes
"*(name=dBCSPwd)",
"*(name=lmPwdHistory)*",
"*(name=ntPwdHistory)*",
"*(name=supplementalCredentials)*",
// Defender token and secret attributes
"*defender-tokenData=*",
"(name=*secret*)",
"(name=*trust*)",
// passwords in description or comments
"(&(&(objectCategory=person)(objectClass=user))(|(description=?pass?)(comment=?pass?)))"
)