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!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...