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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...