BanFromLog

GNU General Public License
(C) 2005 - Jose Sanchez
<jose at serhost dot com>


SSH brute force attack prevention. Like an adaptative firewall
Prevención de ataques por fuerza bruta vía SSH. Como un firewall adaptativo

[EN] English version
[ES] Spanish version

Freshmeat Web of the project at freshmeat
Arbornet free shell accounts Mirror of BanFromLog

TODO LIST

English version


What is banfromlog?

BanFromLog is a simple script to log any illegal user attempt of your SSHD daemon from the auth.log file.

It logs those nasty ips to a database (defined by you) and you can call to do this automatically by typing a line at the crond.

Why?

Well is truth that if you have only an user, you don't need this but, when you have hundreds or even thousands, users, many of them could have an insecure password (even if you have warned them or have some special modification in the passwd command to prevent this).

You can receive other kinds of attacks via SSH port from those IPS which first attempted only a couple of illegal users. (illegal user: user that doesn't exists).

Your CPU can be slower with this kind of brute force attacks, even if you have put a maximum attempts or whatever, because this kind of attacks are done with many "zoombies".

You can prevent attacks in many servers if you use a centralized MySQL server, all servers insert ips of attackers and one attacker, probably will only attempt to one server.

License

BanFromLog is under GPL license

Doubts

Banfromlog is easy but not for newbies, you need to have a minimal knoweldge about iptables and SSH, in case of doubts you can read the documentation on the tar.gz and netfilter for iptables information.

Requirements

Bash, sqlite or MySQL and iptables
It have been tested on debian sarge, maybe you need to configure some parameters on another distro.

Download

Download the latest banfromlog version here.

banfromlog-0.75.tar.gz 5.1K
SHA1: ec3d951e731e6fb580d898c896dab33772821e83
MD5: 695894b881556f932fa4de6278385a60

People who tried to attack me

This is a complete list of iptables rules, I don't recommend to use it as there is many people who will never attack again due the fact that they have been desinfected but if you know what are you doing and that you will put useless rules into your iptables go ahead...


BanFromLog is under GPL license.
(C) 2005 - Jose Sanchez
<jose at serhost dot com>




Spanish version


¿Qué es?

BanFromLog es un simple script para logear cualquier intento de conexion con un usuario inexistente al SSHD.

Logea esas ips a una base de datos (definida por ti) y puede actuar como firewall adaptativo con un par de lineas (explicadas mas abajo) en el crond.

¿Por qué?

Es cierto que si solo tienes un usuario, no necesitas este script, pero cuando tienes cientos o incluso miles de usuarios, muchos de ellos pueden tener contraseñas inseguras (por mucho que les adviertas o que hagas modificaciones al programa passwd para intentar evitarlo).

Tambien puedes recibir otro tipo de ataques via SSH despues de esos intentos.

Tu velocidad de CPU puede verse disminuida por culpa de estos ataques que incluso se producen a la vez por medio de zoombies.

Puede prevenir ataques en varios servidores siempre y cuando use un servidor MySQL centralizado, de este modo al insertar cualquier servidor la ip de un atacante, se prohibira en todos a la vez. Solo tendrá que ver el log una vez, el atacante no le ensuciará el resto de logs.

Licencia

BanFromLog está bajo licencia GPL.

Dudas

Banfromlog es para gente con unos mínimos conocimientos sobre iptables, SSH y linux, de todos modos si tienes alguna duda sobre iptables, puedes consultar la página de netfilter.

Dentro del archivo tar.gz encontrarás más instrucciones y como instalarlo.

Requerimientos

Bash, sqlite o MySQL e iptables
Banfromlog ha sido probado en debian sarge, quizá debas configurar algunos parámetros en otra distro.

Descarga

Descargar última versión de banfromlog
banfromlog-0.75.tar.gz 5.1K
SHA1: ec3d951e731e6fb580d898c896dab33772821e83
MD5: 695894b881556f932fa4de6278385a60

IPs que han intentado atacarme

Lista de atacantes (excesivamente larga, no aconsejo que la uses a menos que sepas lo que estás haciendo).


BanFromLog está bajo licencia GPL.
(C) 2005 - Jose Sanchez
<jose at serhost dot com>

Linux registered user 401823