Hi @alex4 , at first, using the search command after the main search you have a slower search, the best prectices say to put the search terms as left as possible. Then, don't use the search for ter...
See more...
Hi @alex4 , at first, using the search command after the main search you have a slower search, the best prectices say to put the search terms as left as possible. Then, don't use the search for terms (e.g. 4794 or 4657) when tese values are extracted in the EventCode field then whar are the unwanted results with the search you're using? did you tried to add the last condition you shared to your starting search? Last information: can the properties field have two values in the same event: Properties="msLAPS-Password" AND Properties=*EncryptedDSRMPasswordHistory. I try to re-write your starting search with the hinted updates: index=winsec_prod EventCode=4794 OR (EventCode=4657 DSRMAdminLogonBehavior) OR (EventCode IN (4104,4103) DsrmAdminLogonBehavior) ((EventCode=4794) OR (EventCode=4657 ObjectName="*HKLM\System\CurrentControlSet\Control\Lsa\DSRMAdminLogonBehavior*") OR (EventCode IN (4104,4103) ScriptBlockText="*DsrmAdminLogonBehavior*"))
| eval username=coalesce(src_user,user,user_id), Computer=coalesce(Computer,ComputerName)
| stats values(dest) values(Object_Name) values(ScriptBlockText) by _time, index, sourcetype, EventCode, Computer, username
| rename values(*) as * Ciao. Giuseppe