Splunk Search

How can I show results for a field that is disabled and not re-enabled in a certain amount of time?

JRougeau
Engager

How can I show results for a field that is disabled and not re-enabled in a certain amount of time?

I want to be alerted when AV protection on an endpoint is disabled for a period of time without being re-enabled. Ex: IF signature="Protection Disabled" AND (more than 5 minutes passes without Signature="Protection Enabled") THEN generate alert.

Tags (3)
0 Karma
1 Solution

DalJeanis
Legend

Make a list of all the other fields that are used to identify the target item in question. Let's assume for this example that it is host and service.

This gets you all the items that have been disabled for more than 5 minutes.

index=foo host=* service=* signature=* | stats latest(_time) as _time, latest(signature) as signature by host, service | where _time < relative_time(now(),"-5min") AND signature="Protection Disabled"

Now, if you want to find all the items where the signature stayed as "Protection Disabled" for more than 5 minutes, then you'll probably have to define a transaction starting with the signature="Protection Disabled" and ending with signature= anything else, and use the duration of the transaction to flag the results.

View solution in original post

0 Karma

DalJeanis
Legend

Make a list of all the other fields that are used to identify the target item in question. Let's assume for this example that it is host and service.

This gets you all the items that have been disabled for more than 5 minutes.

index=foo host=* service=* signature=* | stats latest(_time) as _time, latest(signature) as signature by host, service | where _time < relative_time(now(),"-5min") AND signature="Protection Disabled"

Now, if you want to find all the items where the signature stayed as "Protection Disabled" for more than 5 minutes, then you'll probably have to define a transaction starting with the signature="Protection Disabled" and ending with signature= anything else, and use the duration of the transaction to flag the results.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...