Splunk Search

Watchlist Insertion

julirodr
New Member

Hi,

I want put an alert witch detect non authorized connection. In order to do that I have integrate some workstation logs. I want to know what users has been login on these workstations. So, I have 2 recomendations:
- I want target worksation impacted (for example, I want check connection only on HOSTNAME1, HOSTNAME2, HOSTNAME3. Not in HOSTNAME4)
- I want exclude normal user (for example, USER1 is authorized to log in HOSTNAME1)

Do you have any idea on how do to that?


I want to do that:

Event 4624 (Security) AND HOSTNAME IN $WATCHLIST(HOSTNAME) AND USERNAME NOT IN $WATCHLIST(USERNAME)

Thanks for your help.

Regards.

Tags (2)
0 Karma

lguinn2
Legend

I suggest that you build a lookup table to do this. If you haven't used lookup tables, you might want to follow the tutorial to set it up. In the lookup definition, be sure to set the default value to "No Match".

Sample watchlist.csv:

hostname,authorizedUser
host01,userA
host01,userB
host02,userB
host03,userC

Search:

EventCode=4624
| lookup watchlistLookup hostname as host OUTPUT authorizedUsers
| where hostname != ""No Match"
| makemv delim="," authorizedUsers
| where NOT mvfind(authorizedUsers,username) 

Set your alert for "number of events > 0". I am not sure that you actually need the | makemv delim="," authorizedUsers. I also suggest that you try this solution one step at a time, so you can check it for errors and understand better how it works.

0 Karma

lguinn2
Legend

It sounds like a typographical error to me. If you would copy your search string into another comment, then someone might be able to see the problem.

0 Karma

julirodr
New Member

Hello,

Thanks for your help.

This search doesn't work and I don't know why. I have put the search and I have the following error:

Error in 'where' command: Typechecking failed. 'XOR' only takes boolean arguments.

The search job has failed due to an error. You may be able view the job in the Job Inspector.

Do you have any idea about this error?

Thanks,
Regards.

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, ...