Splunk Enterprise Security

Unable to create the alert in ES App

deepak007
Explorer

I tried creating an ES App alert to detect if anyone is sending emails to the mentioned blacklisted domains, but its showing me an error

| datamodel "Email" "All_Email" search | stats values(All_Email.recipient) as "recept" | where 'recept'=(@gproxy10-pub.mail.unifiedlayer.com or @gmail.com) or *@moxydrink.com or @mail.hansonprice.co.nz or *@officelives365.com or jane.somerville@bhpbilliton.com or jane.macgregor@bhpbilliton.com or *@sant0s.com)

Error I am getting
Error in 'where' command: The expression is malformed. An unexpected character is reached at '@gproxy10-pub.mail.unifiedlayer.com or @gmail.com) or *@moxydrink.com or @mail.hansonprice.co.nz or *@officelives365.com or jane.somerville@bhpbilliton.com or jane.macgregor@bhpbilliton.com or *@sant0s.com)'.

0 Karma

p_gurav
Champion

Hi,

Try somthing like this:

| datamodel "Email" "All_Email" search | stats values(All_Email.recipient) as "recept" | where (like(recept, "%@gproxy10-pub.mail.unifiedlayer.com" OR like(recept, "%@gmail.com")) OR like(recept, "%@moxydrink.com%") OR like(recept, "%@mail.hansonprice.co.nz") OR like(recept,"%@officelives365.com") OR like(recept, "%jane.somerville@bhpbilliton.com") OR like(recept, "%jane.macgregor@bhpbilliton.com") OR like(recept, "%@sant0s.com")

deepak007
Explorer

Error in 'where' command: The expression is malformed. Expected ).

0 Karma

p_gurav
Champion
| datamodel "Email" "All_Email" search | stats values(All_Email.recipient) as "recept" | where (like(recept, "%@gproxy10-pub.mail.unifiedlayer.com") OR like(recept, "%@gmail.com")) OR like(recept, "%@moxydrink.com%") OR like(recept, "%@mail.hansonprice.co.nz") OR like(recept,"%@officelives365.com") OR like(recept, "%jane.somerville@bhpbilliton.com") OR like(recept, "%jane.macgregor@bhpbilliton.com") OR like(recept, "%@sant0s.com")
0 Karma

deepak007
Explorer

query did work, but not giving the correct data, it is giving all the sources, however I only need the mentioned ones

0 Karma

p_gurav
Champion

Can you share some sample recipient data ?

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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