Registry value created or modified. ObjectName (full path), OldValue, NewValue are key. Requires registry SACL.
Persistence via Run/RunOnce keys. Defense evasion via security tool registry modifications. Credential access via LSASS configuration changes. Key paths: HKLM\Software\Microsoft\Windows\CurrentVersion\Run, HKLM\SYSTEM\CurrentControlSet\Services, Winlogon.
Requires SACL on monitored paths. Alert: Run/RunOnce modifications. Alert: Winlogon Userinit or Shell value changes. Configure SACLs on high-value paths rather than broadly.
ObjectNameObjectValueNameNewValueProcessNameSubjectUserName | Tactic | Technique |
|---|---|
| Persistence | Registry Run Keys (T1547.001) |
| Defense Evasion | Modify Registry (T1112) |
Starting points — adapt the log source, projected fields and thresholds for your environment.
SecurityEvent
| where EventID == 4657 // A registry value was modified
| project TimeGenerated, Computer, ObjectName, ObjectValueName, NewValue, ProcessName, SubjectUserName
| sort by TimeGenerated desc
index=* sourcetype="WinEventLog:Security" EventCode=4657
| stats count earliest(_time) as first_seen latest(_time) as last_seen by ComputerName
| sort - count `# A registry value was modified — add EventData fields: ObjectName, ObjectValueName, NewValue, ProcessName`
A registry value was modified. Registry value created or modified. ObjectName (full path), OldValue, NewValue are key. Requires registry SACL.
Event 4657 is written to the Security channel by Microsoft-Windows-Security-Auditing. Advanced Audit Policy — enable the 'Object Access' subcategory (Success and/or Failure).
Event 4657 is associated with: Registry Run Keys (T1547.001), Modify Registry (T1112).
Requires SACL on monitored paths. Alert: Run/RunOnce modifications. Alert: Winlogon Userinit or Shell value changes. Configure SACLs on high-value paths rather than broadly.