Good morning !
I am using Logstash to fetch data by Wazuh (HIDS) and Suricata (NIDS). So I use the Geoip plugin to geolocate the IPs that connect to my server.
My first problem is this:
When I do a test by connecting with the wrong password to my server, it creates an alert of "user authentication failed" by giving the source ip under the "data srcip" field that I give to geoip so that it analysis. On Elasticsearch, I see the resolution of the geolocation appear, but this one gives me the field "geoip.country_name" equal to "Russia" as well as a timezone in Moscow, whereas if look at my public ip on Maxmind this one corresponds well to my country which is France. Strange no?
Then, my basic idea was to compare the IPs received with whitelists of IPs, linked with the rule that runs when a bad password occurs.
So far I have tried:
if [rule][id] == "87201" {
if [geoip][ip] == "xx.xx.xx.xx" {
mutate {
add_field => [ "Possible false positive", "1" ]
}
}
}
I would therefore like that in this case there is a tag that it is a false positive. Mias, it doesn't work, no filter is done. Note that the geoip is called before this code, so the field does exist...