SSHDODGE ou comment outrepasser la protection “fail2ban” lors de l’attaque d’un port ssh.

Source : https://github.com/Neetx/sshdodge

Suite à un repérage des ports d’un serveur (au moyen de son nom de domaine ou de son adresse ip et de l’application nmap), on peut envisager d’attaquer un port, par exemple un port ssh (généralement le port 22) avec des programmes comme hashcat ou hydra. Il existe plusieurs types d’attaques : attaque par dictionnaire avec une liste de mots (générée par l’application crunch par exemple), voire même attaque en force brute. Il faut alors prévoir de disposer d’une forte puissance de calcul, notamment au niveau du GPU. Et ne pas avoir peur des factures d’électricité.

Je précise que tout ceci est illégal. Je décline toute responsabilité quant à vos agissements. En revanche, ce qui est légal est de tester la sécurité d’un mot de passe ou d’un serveur pour le compte d’un client avec de sécuriser les architectures réseaux de ce même client.

Technique ancestrale mise en exergue, notamment dans la série Mr Robot, il existe désormais une parade très efficace à cette méthode : j’ai nommé le programme “fail2ban” qui va repérer automatiquement des tentatives de connexion multiples, échouées et répétitives et se protéger en bannissant l’IP qui lance les attaques.

Mais, alors comment outrepasser la protection fail2ban ? Voici la réponse ci-dessous !!! Il n’a pas été simple de trouver ceci. Il s’agit d’un script python.

Tool used to test weakness of some ssh passwords, thanks to a dictionary attack (bypassing fail2ban protection).

Sshdodge is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Sshdodge is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/


Tool developed to demonstrate the weakness of some ssh passwords. It bypasses fail to ban protection changing ip with tor reload function, after some attempts defined in input by user. Use these tool with consciousness.

Usage:

sshdodge.py [-h] [-u USER] [-i IP] [-p PORT] [-a ATTEMPTS] [-t] wordlist

positional arguments:
  wordlist              Wordlist for dictionary attack

optional arguments:
  -h, --help            show this help message and exit
  -u USER, --user USER  User used to connection
  -i IP, --ip IP        Destination ip address
  -p PORT, --port PORT  Destination port
  -a ATTEMPTS, --attempts ATTEMPTS
                        Number of attempts before identity change
  -t, --test            Use the to test dependences


Leave a Reply