A computer account's attributes were modified.
msDS-AllowedToActOnBehalfOfOtherIdentity attribute modification = RBCD attack setup. SamAccountName change = noPac exploitation. Delegation flag changes for lateral movement.
Alert: modification of msDS-AllowedToActOnBehalfOfOtherIdentity (monitor via 5136). Alert: SamAccountName changes on computer accounts.
SubjectUserNameTargetUserNameLogonTypeIpAddressWorkstationName | Tactic | Technique |
|---|---|
| Persistence | Account Manipulation (T1098) |
Starting points — adapt the log source, projected fields and thresholds for your environment.
SecurityEvent
| where EventID == 4742 // A computer account was changed
| project TimeGenerated, Computer, SubjectUserName, TargetUserName, LogonType, IpAddress, WorkstationName
| sort by TimeGenerated desc
index=* sourcetype="WinEventLog:Security" EventCode=4742
| stats count earliest(_time) as first_seen latest(_time) as last_seen by ComputerName
| sort - count `# A computer account was changed — add EventData fields: SubjectUserName, TargetUserName, LogonType, IpAddress`
A computer account was changed. A computer account's attributes were modified.
Event 4742 is written to the Security channel by Microsoft-Windows-Security-Auditing. Advanced Audit Policy — enable the 'Account Management' subcategory (Success and/or Failure).
Event 4742 is associated with: Account Manipulation (T1098).
Alert: modification of msDS-AllowedToActOnBehalfOfOtherIdentity (monitor via 5136). Alert: SamAccountName changes on computer accounts.