
Test di penetrazione su server SSH utilizzando attacchi di forza bruta o dizionario. Scritto in C.
Test di penetrazione su server SSH utilizzando attacchi a dizionario. Scritto in C.
brute krag significa "forza bruta" in afrikáans
Questo strumento è solo per scopi di test etici. cbrutekrag e i suoi proprietari non possono essere ritenuti responsabili per un uso improprio da parte degli utenti. Gli utenti devono agire come consentito dalle leggi locali.
$ 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
| Segnaposto | Scopo | Come password | Come nome utente |
|---|---|---|---|
| $BLANKPASS | Password vuota | ✔️ | - |
| $TARGET | Usa hostname o IP come password | ✔️ | ✔️ |
Il formato di output può essere facilmente personalizzato utilizzando l'opzione della riga di comando -f
Esempio: ./cbrutekrag -f "%HOSTNAME%:%PORT%|%USERNAME%|%PASSWORD%\n", che
produce un output come:
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
Il formato di output può essere facilmente personalizzato utilizzando l'opzione della riga di comando -F
Esempio: ./cbrutekrag -F "%HOSTNAME%\t%PORT%\t%BANNER%\n", che
produce un output come:
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 utilizza libssh - The SSH Library (http://www.libssh.org/)
Requisiti:
makegcclibssh-devgit clone --depth=1 https://github.com/matricali/cbrutekrag.git
cd cbrutekrag
make
make install
Requisiti:
cmakegccmakelibssl-devlibz-devgit clone --depth=1 https://github.com/matricali/cbrutekrag.git
cd cbrutekrag
bash static-build.sh
make install
| Segnaposto | Descrizione | Esempio |
|---|
| %DATETIME% | Sostituito dalla data Y/m/d HH:ii:ss | 2024/04/01 12:46:27 |
| %HOSTNAME% | Sostituito dal nome host o IPv4 | 192.168.0.100 |
| %PORT% | Sostituito dalla porta di connessione | 22 |
| %USERNAME% | Sostituito dal nome utente utilizzato | root |
| %PASSWORD% | Sostituito dalla password utilizzata | admin |
| \n | Sostituito da LF (a capo) | |
| \t | Sostituito da TAB (tabulazione) |
| Segnaposto | Descrizione | Esempio |
|---|
| %DATETIME% | Sostituito dalla data Y/m/d HH:ii:ss | 2024/04/01 12:46:27 |
| %HOSTNAME% | Sostituito dal nome host o IPv4 | 192.168.0.100 |
| %PORT% | Sostituito dalla porta di connessione | 22 |
| %BANNER% | Sostituito dal banner del server | SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u2 |
| \n | Sostituito da LF (a capo) | |
| \t | Sostituito da TAB (tabulazione) |