
Tests de pénétration sur des serveurs SSH utilisant des attaques par force brute ou par dictionnaire. Écrit en C.
Tests de pénétration sur des serveurs SSH utilisant des attaques par dictionnaire. Écrit en C.
brute krag signifie « force brute » en afrikaans
Cet outil est uniquement destiné à des tests éthiques. cbrutekrag et ses propriétaires ne peuvent être tenus responsables d'une mauvaise utilisation par les utilisateurs. Les utilisateurs doivent agir conformément aux lois locales.
$ cbrutekrag -h
_ _ _
| | | | | |
___ | |__ _ __ _ _| |_ ___| | ___ __ __ _ __ _
/ __|| '_ \| '__| | | | __/ _ \ |/ / '__/ _` |/ _` |
| (__ | |_) | | | |_| | || __/ <| | | (_| | (_| |
\___||_.__/|_| \__,_|\__\___|_|\_\_| \__,_|\__, |
OpenSSH Brute force tool 0.6.0 __/ |
(c) Copyright 2014-2024 Jorge Matricali |___/
https://github.com/matricali/cbrutekrag
usage: ./cbrutekrag [-h] [-v] [-aA] [-D] [-P] [-T TARGETS.lst] [-C credentials.lst]
[-t THREADS] [-f OUTPUT FORMAT] [-o OUTPUT.txt] [-F SCAN OUTPUT FORMAT] [-O SCAN_OUTPUT.txt] [TARGETS...]
-h, --help This help
-v, --verbose Verbose mode
-V, --verbose-sshlib Verbose mode (sshlib)
-s, --scan Scan mode
-D, --dry-run Dry run
-P, --progress Progress bar
-T, --targets <file> Targets file
-C, --credentials <file> Username and password file
-t, --threads <threads> Max threads
-o, --output <file> Output log file
-F, --format <pattern> Output log format
Available placeholders:
%DATETIME%, %HOSTNAME%
%PORT%, %USERNAME%, %PASSWORD%
-O, --scan-output <file> Output log file for scanner
-F, --scan-format <pattern> Output log format for scanner
Available placeholders:
%DATETIME%, %HOSTNAME%
%PORT%, %BANNER%.
Default:
"%HOSTNAME%:%PORT%\t%BANNER%\n"
-a, --allow-non-openssh Accepts non OpenSSH servers
-A, --allow-honeypots Allow servers detected as honeypots
--timeout <seconds> Sets connection timeout (Default: 3)
--check-http <host> Tries to open a TCP Tunnel after successful login
cbrutekrag -T targets.txt -C combinations.txt -o result.log
cbrutekrag -s -t 8 -C combinations.txt -o result.log 192.168.1.0/24
root root
root password
root $BLANKPASS
$TARGET root
root $TARGET
| Espace réservé | Objectif | Comme mot de passe | Comme nom d'utilisateur |
|---|---|---|---|
| $BLANKPASS | Mot de passe vide | ✔️ | - |
| $TARGET | Utiliser le nom d'hôte ou l'IP comme mot de passe | ✔️ | ✔️ |
Le format de sortie peut être facilement personnalisé en utilisant l'option de ligne de commande -f
Exemple : ./cbrutekrag -f "%HOSTNAME%:%PORT%|%USERNAME%|%PASSWORD%\n", ce qui produit une sortie comme :
192.168.0.100:22|root|toor
192.168.0.105:22|ubnt|ubnt
%DATETIME%\t%HOSTNAME%:%PORT%\t%USERNAME%\t%PASSWORD%\n
2024/04/01 13:05:13 192.168.0.100:22 root admin
Le format de sortie peut être facilement personnalisé en utilisant l'option de ligne de commande -F
Exemple : ./cbrutekrag -F "%HOSTNAME%\t%PORT%\t%BANNER%\n", ce qui produit une sortie comme :
192.168.0.100 22 SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2
192.168.0.105 22 SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u2
%HOSTNAME%:%PORT%\t%BANNER%\n
192.168.0.100:22 SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u2
cbrutekrag utilise libssh - The SSH Library (http://www.libssh.org/)
Prérequis :
makegcc compilerlibssh-devgit clone --depth=1 https://github.com/matricali/cbrutekrag.git
cd cbrutekrag
make
make install
Prérequis :
cmakegcc compilermakelibssl-devlibz-devgit clone --depth=1 https://github.com/matricali/cbrutekrag.git
cd cbrutekrag
bash static-build.sh
make install
| Espace réservé | Description | Exemple |
|---|
| %DATETIME% | Remplacé par la date Y/m/d HH:ii:ss | 2024/04/01 12:46:27 |
| %HOSTNAME% | Remplacé par le nom d'hôte ou l'IPv4 | 192.168.0.100 |
| %PORT% | Remplacé par le port de connexion | 22 |
| %USERNAME% | Remplacé par le nom d'utilisateur utilisé | root |
| %PASSWORD% | Remplacé par le mot de passe utilisé | admin |
| \n | Remplacé par un saut de ligne | |
| \t | Remplacé par une tabulation |
| Espace réservé | Description | Exemple |
|---|
| %DATETIME% | Remplacé par la date Y/m/d HH:ii:ss | 2024/04/01 12:46:27 |
| %HOSTNAME% | Remplacé par le nom d'hôte ou l'IPv4 | 192.168.0.100 |
| %PORT% | Remplacé par le port de connexion | 22 |
| %BANNER% | Remplacé par la bannière du serveur | SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u2 |
| \n | Remplacé par un saut de ligne | |
| \t | Remplacé par une tabulation |