Интеллектуальная атака на SMTP, уклоняющаяся от fail2ban

Я продолжаю атаковать мой SMTP-сервер методом грубой силы, избегая типичных настроек fail2ban:

  • атаки происходят с нескольких IP-адресов в одной подсети
  • одиночная IP-атака с интервалами более часа, очевидно, чтобы избежать блокировки с помощью fail2ban, который обычно использует findtime и bantime короче часа

Это журнал:

2017-09-05 01:11:19 LOGIN authenticator failed for (User) [91.200.12.165]:57519 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=soft)
2017-09-05 01:11:36 LOGIN authenticator failed for (User) [91.200.12.164]:51973 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=sandy)
2017-09-05 01:15:22 LOGIN authenticator failed for (User) [91.200.12.121]:51545 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=brown)
2017-09-05 01:28:57 LOGIN authenticator failed for (User) [91.200.12.105]:64938 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=family)
2017-09-05 01:48:32 LOGIN authenticator failed for (User) [91.200.12.165]:64730 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=soi)
2017-09-05 01:48:47 LOGIN authenticator failed for (User) [91.200.12.164]:59184 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=sanjeev)
2017-09-05 01:50:13 LOGIN authenticator failed for (User) [91.200.12.166]:64999 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=until)
2017-09-05 01:54:05 LOGIN authenticator failed for (User) [91.200.12.121]:58756 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=bryan)
2017-09-05 02:04:34 LOGIN authenticator failed for (User) [91.200.12.105]:55772 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=famous)
2017-09-05 02:25:36 LOGIN authenticator failed for (User) [91.200.12.165]:55563 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=soldiers)
2017-09-05 02:25:48 LOGIN authenticator failed for (User) [91.200.12.164]:50017 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=sanmiguel)
2017-09-05 02:30:33 LOGIN authenticator failed for (User) [91.200.12.166]:55835 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=update)
2017-09-05 02:32:56 LOGIN authenticator failed for (User) [91.200.12.121]:49589 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=bsd)
2017-09-05 02:40:11 LOGIN authenticator failed for (User) [91.200.12.105]:62983 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=far)
2017-09-05 03:02:29 LOGIN authenticator failed for (User) [91.200.12.165]:62775 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=solution)
2017-09-05 03:02:40 LOGIN authenticator failed for (User) [91.200.12.164]:57228 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=santamaria)
2017-09-05 03:10:50 LOGIN authenticator failed for (User) [91.200.12.166]:63046 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=upgrade)
2017-09-05 03:11:37 LOGIN authenticator failed for (User) [91.200.12.121]:56803 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=bubba)
2017-09-05 03:15:41 LOGIN authenticator failed for (User) [91.200.12.105]:53820 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=farias)
2017-09-05 03:39:36 LOGIN authenticator failed for (User) [91.200.12.165]:53612 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=solve)
2017-09-05 03:39:48 LOGIN authenticator failed for (User) [91.200.12.164]:64441 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=santos)
2017-09-05 03:50:50 LOGIN authenticator failed for (User) [91.200.12.121]:64015 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=buchhaltung)
2017-09-05 03:51:30 LOGIN authenticator failed for (User) [91.200.12.166]:53880 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=upload)
2017-09-05 03:51:34 LOGIN authenticator failed for (User) [91.200.12.105]:61032 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=farm)
2017-09-05 04:17:31 LOGIN authenticator failed for (User) [91.200.12.165]:60825 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=somebody)
2017-09-05 04:17:34 LOGIN authenticator failed for (User) [91.200.12.164]:55274 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=sara)
2017-09-05 04:27:43 LOGIN authenticator failed for (User) [91.200.12.105]:51865 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=farmer)
2017-09-05 04:30:06 LOGIN authenticator failed for (User) [91.200.12.121]:54848 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=buddy)
2017-09-05 04:32:02 LOGIN authenticator failed for (User) [91.200.12.166]:61091 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=upon)
2017-09-05 04:55:24 LOGIN authenticator failed for (User) [91.200.12.164]:62485 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=sarah)
2017-09-05 04:55:24 LOGIN authenticator failed for (User) [91.200.12.165]:51657 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=someone)
2017-09-05 05:03:42 LOGIN authenticator failed for (User) [91.200.12.105]:59078 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=farmers)
2017-09-05 05:09:10 LOGIN authenticator failed for (User) [91.200.12.121]:62060 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=build)
2017-09-05 05:12:27 LOGIN authenticator failed for (User) [91.200.12.166]:51923 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=ups)
2017-09-05 05:33:26 LOGIN authenticator failed for (User) [91.200.12.164]:53321 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=sat)
2017-09-05 05:33:26 LOGIN authenticator failed for (User) [91.200.12.165]:58869 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=somethin)
2017-09-05 05:40:00 LOGIN authenticator failed for (User) [91.200.12.105]:49912 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=fast)
2017-09-05 05:48:34 LOGIN authenticator failed for (User) [91.200.12.121]:52896 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=building)
2017-09-05 05:53:00 LOGIN authenticator failed for (User) [91.200.12.166]:59136 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=uranus)
2017-09-05 06:11:20 LOGIN authenticator failed for (User) [91.200.12.165]:49705 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=son)
2017-09-05 06:11:21 LOGIN authenticator failed for (User) [91.200.12.164]:60535 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=saturn)
2017-09-05 06:16:06 LOGIN authenticator failed for (User) [91.200.12.105]:57124 I=[192.168.1.224]:25: 535 Incorrect authentication data (set_id=father

Есть ли способ сделать какую-то выборочную настройку fail2ban, которая отлавливала бы такие атаки другим способом, кроме увеличения findtime и bantime до нескольких часов?

0
задан 5 September 2017 в 22:48
2 ответа

Будьте осторожны, чтобы не создать правило, которое может сработать при обычных ошибках входа в систему. Это зависит от того, сколько пользователей у вас может быть, использующих одного и того же провайдера и, следовательно, подключающихся из одной и той же подсети, иногда предоставляя неправильные учетные данные.

Fail2Ban хорош для автоматизации предотвращения типичных атак методом грубой силы. Подобные злонамеренные действия из более широкой подсети не так обычны и вполне нормальны, возможно, даже лучше, чтобы их можно было обработать вручную:

  1. Если вам не нужен аутентифицированный SMTP из 91.200.12.0/22 ​​ , заблокируйте его на своем брандмауэре.

    Это могло бы быть проще, если бы у вас была отдельная отправка для аутентифицированного SMTP на порт 587 и никогда не разрешалась аутентификация на порте 25 ; это предотвратит предоставление какой-либо информации о логинах SMTP на 25 и по-прежнему разрешает возможную легальную входящую почту от 91.200.12.0/22 ​​.

  2. Если вы считаете, что эта сеть взломана, то whois В базе есть контактная информация. Связавшись с владельцем этого IP-блока, вы можете помочь им решить актуальную проблему!

     inetnum: 91.200.12.0 - 91.200.15.255
    
    примечания: ********************************* Внимание *************  **
    примечания: Бассейн используется другим отделом!
    примечания: В случае вопросов по СПАМУ, ХАКУ, БЕЗОПАСНОСТЬЮ
    примечания: обращайтесь напрямую (скрыто)
    примечания: тел: +38 (044) 379-28-50;  +7 (499) 404-16-45
    примечания: **********************************************  **********
     
0
ответ дан 24 November 2019 в 03:54

Есть ли способ сделать какую-то выборочную настройку fail2ban, которая бы ловила такие атаки другим способом, кроме увеличения времени поиска и блокировки до нескольких часов?

Вы можете создать дополнительное правило. с регулярным выражением, подходящим только для этих клиентов, с более высоким временем поиска. Использование дополнительного правила не влияет на другие ваши правила, которые работают нормально.

0
ответ дан 24 November 2019 в 03:54

Теги

Похожие вопросы