elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

Whitelist - Wildcards?

Open seclyn opened this issue 9 years ago • 4 comments

Hello,

I'm new to elastalert so forgive me if this is already solved or I'm just doing it wrong. I've created a search that looks for potential phishing e-mails that pass the spam filter. The issue I'm having is I've created a whitelist file but it appears to only accept absolutes?

Example if in my whitelist.txt I put "[email protected]" elastalert does NOT alert which is great! But in larger scopes if I want to just whitelist "@mycompany.com" it still alerts :\ .

I've also tried "mycompany.com" , "*mycompany.com" , and "mycompany" but each of those still triggers alerts. Again, I go back to full e-mail and it works fine. The spam filter logging sends over the whole e-mail it does not just pull a domain otherwise I'd have tried that route.

seclyn avatar Nov 11 '17 15:11 seclyn

Hello, seclyn,

I have the same problem now, do you already resolve it ?

gpoire avatar Dec 12 '17 09:12 gpoire

I do not, I've tried a bunch of different combinations and have had no success.  On Tuesday, December 12, 2017, 4:28:02 AM EST, gpoire [email protected] wrote:

Hello, seclyn,

I have the same problem now, do you already resolve it ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

seclyn avatar Dec 12 '17 11:12 seclyn

filter:
 - query:
      query_string:
        query: "NOT email: /.*@mycompany.com/"

Qmando avatar Dec 12 '17 19:12 Qmando

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_regular_expressions

Qmando avatar Dec 12 '17 19:12 Qmando