
Testes de penetração em servidores SSH usando ataques de força bruta ou de dicionário. Escrito em C.
Testes de penetração em servidores SSH usando ataques de dicionário. Escrito em C.
brute krag significa "força bruta" em africâner
Esta ferramenta é apenas para fins de teste ético. cbrutekrag e seus proprietários não podem ser responsabilizados pelo uso indevido por usuários. Os usuários devem agir de acordo com as regras da lei local.
$ 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
| Espaço reservado | Propósito | Como senha | Como nome de usuário |
|---|---|---|---|
| $BLANKPASS | Senha em branco | ✔️ | - |
| $TARGET | Usar hostname ou IP como senha | ✔️ | ✔️ |
O formato de saída pode ser facilmente personalizado usando a opção de linha de comando -f
Exemplo: ./cbrutekrag -f "%HOSTNAME%:%PORT%|%USERNAME%|%PASSWORD%\n", que
produz uma saída como:
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
O formato de saída pode ser facilmente personalizado usando a opção de linha de comando -F
Exemplo: ./cbrutekrag -F "%HOSTNAME%\t%PORT%\t%BANNER%\n", que
produz uma saída como:
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 usa libssh - The SSH Library (http://www.libssh.org/)
Requisitos:
makegcclibssh-devgit clone --depth=1 https://github.com/matricali/cbrutekrag.git
cd cbrutekrag
make
make install
Requisitos:
cmakegccmakelibssl-devlibz-devgit clone --depth=1 https://github.com/matricali/cbrutekrag.git
cd cbrutekrag
bash static-build.sh
make install
| Espaço reservado | Descrição | Exemplo |
|---|
| %DATETIME% | Substituído pela data Y/m/d HH:ii:ss | 2024/04/01 12:46:27 |
| %HOSTNAME% | Substituído por hostname ou IPv4 | 192.168.0.100 |
| %PORT% | Substituído pela porta de conexão | 22 |
| %USERNAME% | Substituído pelo nome de usuário usado | root |
| %PASSWORD% | Substituído pela senha usada | admin |
| \n | Substituído por LF | |
| \t | Substituído por TAB |
| Espaço reservado | Descrição | Exemplo |
|---|
| %DATETIME% | Substituído pela data Y/m/d HH:ii:ss | 2024/04/01 12:46:27 |
| %HOSTNAME% | Substituído por hostname ou IPv4 | 192.168.0.100 |
| %PORT% | Substituído pela porta de conexão | 22 |
| %BANNER% | Substituído pelo banner do servidor | SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u2 |
| \n | Substituído por LF | |
| \t | Substituído por TAB |