Forum Discussion
Watchlist and query
- Oct 30, 2020
roadruner This is the starting query for something like that.
let ClearedIPAddresses=_GetWatchlist('test1');
CommonSecurityLog
| join ClearedIPAddresses on $left.SourceIP== $right.IPAddress
GaryBushey Hi, i tried that query with alias of test1 which is alias of watchlist and received an error,
roadruner You CSV file would need to have the column headers in the first row. One of mine was "IPAddresses", you would need to substitute whatever you called your columns for that.
I used the term "cleared" only because my watchlist contained those IP Addresses that I want to allow. You can call you watchlist whatever makes sense to you.
- roadrunerOct 30, 2020Copper Contributor
GaryBushey Thanks I tracked the error I had, which was the columns. It runs with no errors now. I did run a quick test and hit one of the ip's in watchlist and then ran the query and no results found. Does the query search out all of sentinel? I tried just putting CommonSecurityLog to see if it would just search through those logs, since that's where the hit should be.
Here is what i tried, didn't work.
CommonSecurityLog
let ClearedIPAddresses=_GetWatchlist('test1');
Heartbeat
| join ClearedIPAddresses on $left.ComputerIP == $right.IPAddresses- GaryBusheyOct 30, 2020Bronze Contributor
roadruner It will only search the one table.
There really is no way to search all tables for multiple values. There is the "search" command, https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/searchoperator, that allows you to search for a single term although I do not know if this can be used in a Analytic rule or not.
- roadrunerOct 30, 2020Copper Contributor
GaryBushey Hmm ok, thanks. How can i search one table? say CommonSecurityLog
I tried this but no dice.
CommonSecurityLog
let ClearedIPAddresses=_GetWatchlist('test1');
Heartbeat
| join ClearedIPAddresses on $left.ComputerIP == $right.IPAddress