Security

How to find Anomalies in my login data?

satyaallaparthi
Communicator

Looking for the exact query to find outliers or anomalies in my csv data using stddev in Splunk enterprise?

Fields from csv:  user, action, src, dest, host, _time 

 

Any help would be appreciated. 

 

Thanks in advance!

 

 

Labels (1)
Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It is not possible to give you an "exact query" because you haven't provided sufficient detail as to what you are measuring.

0 Karma

satyaallaparthi
Communicator

I'm trying to measure login count or unusual number of logins from particular source. 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Still insufficient detail for an "exact query", so I will make some assumptions

``` Load your data ```
| inputlookup your.csv
``` Use hourly timeslices ```
| bin _time span=1h
``` Only keep login actions ```
| where action="LOGIN"
``` Count events by hour and source ```
| stats count by _time src
``` Find mean and standard deviation ```
| eventstats avg(count) as avg stddev(count) as stddev by src
``` Find deviation from mean in terms of standard deviation ```
| eval deviation=(count-avg)/stddev
``` Keep hours with sources deviating from their mean by more than 2 standard deviations ```
| where abs(deviation) > 2

 

Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...