Splunk Enterprise Security

In Splunk Enterprise Security, can you help me fix my search that uses the tstats command with a NOT operator?

jvanbibber
New Member

I'm trying to use the NOT operator in a search to exclude internal destination traffic. Any help would be great!

| tstats summariesonly=t count from datamodel=Network_Traffic where * by All_Traffic.dest All_Traffic.src | sort - count
0 Karma
1 Solution

pkeenan87
Communicator

You could try and exclude RFC 1918 ranges from the dest field

| tstats summariesonly=t count from datamodel=Network_Traffic where All_Traffic.dest!=10.0.0.0/8 AND All_Traffic.dest!=172.16.0.0/12 AND All_Traffic.dest!=192.168.0.0/16 by All_Traffic.dest All_Traffic.src | sort - count

View solution in original post

0 Karma

pkeenan87
Communicator

You could try and exclude RFC 1918 ranges from the dest field

| tstats summariesonly=t count from datamodel=Network_Traffic where All_Traffic.dest!=10.0.0.0/8 AND All_Traffic.dest!=172.16.0.0/12 AND All_Traffic.dest!=192.168.0.0/16 by All_Traffic.dest All_Traffic.src | sort - count
0 Karma

jvanbibber
New Member

Will give it a try, thank you!

0 Karma

FrankVl
Ultra Champion

And how would you recognize internal destination traffic in your case? Do you have asset enrichments in place, so you can do All_Traffic.dest_category!=internal or so?

Hard to help with this little information. We'll need better info on what your data looks like, how you think you want to recognize internal destinations and what you have tried so far.

0 Karma

jvanbibber
New Member

Well, based on IP private IP ranges is a good place to start, don't you think? 10.0.0.0/8
I don't know how I would incorporate that into the search string

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...