Potential Shadow Credentials added to AD Objectedit

Identify the modification of the msDS-KeyCredentialLink attribute in an Active Directory Computer or User Object. Attackers can abuse control over the object and create a key pair, append to raw public key in the attribute, and obtain persistent and stealthy access to the target user or computer object.

Rule type: query

Rule indices:

  • winlogbeat-*
  • logs-system.*

Severity: high

Risk score: 73

Runs every: 5 minutes

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100



  • Elastic
  • Host
  • Windows
  • Threat Detection
  • Credential Access
  • Active Directory

Version: 4 (version history)

Added (Elastic Stack release): 8.1.0

Last modified (Elastic Stack release): 8.4.0

Rule authors: Elastic

Rule license: Elastic License v2

Potential false positivesedit

Modifications in the msDS-KeyCredentialLink attribute can be done legitimately by the Azure AD Connect synchronization account or the ADFS service account. These accounts can be added as Exceptions.

Investigation guideedit

Rule queryedit

event.action:"Directory Service Changes" and event.code:"5136" and

Threat mappingedit


Rule version historyedit

Version 4 (8.4.0 release)
  • Formatting only
Version 2 (8.2.0 release)
  • Formatting only