Security

What SPL to use to detect when two conditions happen with a time difference?

adespino
Explorer

Hi, 

I have some antivirus events that shows anti-malware action failed. 

With this I am trying to create an spl to identify when anti-malware action failed on a host but also wait for the next 12 hours to see if that action has changed. If it has not change it should generate results, otherwise it should not. 

I know the last part could be done with an if but I am not sure how to do de time part.

 

Thanks for the help

Labels (1)
0 Karma

adespino
Explorer

Thank you @richgalloway 
I appreciate the help.

richgalloway
SplunkTrust
SplunkTrust

Search over the previous 12 hours and count the number of times the condition occurs for each host.  If the count is two or more then generate results.

<<your search for failed actions>> earliest=-12h
| stats count by host
| where count>=2
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In the last month, the Splunk Threat Research Team (STRT) has had 2 releases of new security content via the ...

Announcing the 1st Round Champion’s Tribute Winners of the Great Resilience Quest

We are happy to announce the 20 lucky questers who are selected to be the first round of Champion's Tribute ...

We’ve Got Education Validation!

Are you feeling it? All the career-boosting benefits of up-skilling with Splunk? It’s not just a feeling, it's ...