CRK Outil · Cracking

John the Ripper

Cracker des hashes hors ligne : formats, wordlists, règles, masques et extraction avec les outils *2john.

Intermédiaire / 1 min de lecture / maj 11 nov 2026 / 5 tags
raw domaine signaler
Index des sheets

#Identifier le hash

bash
hashid '5f4dcc3b5aa765d61d8327deb882cf99'
john --list=formats | tr ',' '\n' | grep -iE "md5|nt|bcrypt|sha512|krb|ssh|zip"

# Forcer un format précis
john --format=raw-md5 hashes.txt
john --format=nt hashes.txt
Type Format John
MD5 / SHA-1 / SHA-256 raw-md5, raw-sha1, raw-sha256
NTLM / LM nt, lm
NetNTLMv2 netntlmv2
Kerberoast / AS-REP krb5tgs, krb5asrep
sha512crypt / bcrypt sha512crypt, bcrypt
Clé SSH chiffrée ssh
ZIP / RAR / PDF / Office zip, rar, pdf, office

#Wordlists et règles

bash
# Dictionnaire simple
john --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt

# Règles de mutation (majuscules, suffixes, leetspeak)
john --wordlist=rockyou.txt --rules hashes.txt
john --wordlist=rockyou.txt --rules=Jumbo hashes.txt

# Single mode : dérive les candidats du login et des champs GECOS
john --single hashes.txt

# Pipe de candidats générés à la volée
printf 'Spring2026!\nSummer2026!\n' | john --stdin hashes.txt
bash
# Règles personnalisées dans ~/.john/john.conf ou /etc/john/john.conf
# [List.Rules:Corp]
# Az"[0-9][0-9][0-9][0-9]"
john --wordlist=words.txt --rules=Corp hashes.txt

#Masques et incrémental

bash
# MotDePasse + 4 chiffres, minuscules
john --mask='?l?l?l?l?d?d?d?d' hashes.txt

# Incrémental intégré
john --incremental=Digits hashes.txt
john --incremental hashes.txt

# Combiner dictionnaire puis masque
john --wordlist=words.txt hashes.txt
john --mask='?u?l?l?l?l?d?d' hashes.txt
Symbole Classe
?l minuscules
?u majuscules
?d chiffres
?s caractères spéciaux
?a tout l'espace imprimable

#Sessions et performance

bash
# Session nommée, reprise possible
john --session=mission --wordlist=rockyou.txt hashes.txt
john --status=mission
john --restore=mission

# Paralléliser sur plusieurs cœurs
john --fork=8 --wordlist=rockyou.txt hashes.txt

# Distribution manuelle : nœud 1 sur 4
john --node=1/4 --fork=4 --wordlist=rockyou.txt hashes.txt

# Pot file dédié
john --pot=mission.pot --wordlist=rockyou.txt hashes.txt

# Benchmark et résultats
john --test=10
john --show hashes.txt
john --show=left hashes.txt

#Extraire les hashes

bash
# Linux : fusionner passwd + shadow
unshadow /etc/passwd /etc/shadow > shadow.txt
john --wordlist=rockyou.txt shadow.txt

# Windows : hashs NTLM issus de secretsdump / hashdump
john --format=nt ntlm.txt

# NetNTLMv2 capturés par Responder
john --format=netntlmv2 capture.txt

# Kerberos
john --format=krb5tgs kerberoast.txt
john --format=krb5asrep asrep.txt
bash
# Fichiers protégés par mot de passe
zip2john archive.zip > zip.hash
rar2john archive.rar > rar.hash
7z2john.pl archive.7z > 7z.hash
pdf2john.py document.pdf > pdf.hash
office2john.py document.docx > office.hash
ssh2john id_rsa > ssh.hash
keepass2john base.kdbx > keepass.hash

john --wordlist=rockyou.txt zip.hash
john --wordlist=rockyou.txt ssh.hash

#Après le crack

bash
# Afficher les mots de passe trouvés
john --show hashes.txt
john --show --format=nt ntlm.txt

# Ne garder que les comptes encore non cassés
john --show=left --format=krb5tgs kerberoast.txt
bash
# Tester la réutilisation sur d'autres services
nxc smb 10.10.10.0/24 -u users.txt -p cracked.txt --continue-on-success

John casse des hashes ; il ne teste pas l'authentification en ligne. Pour les formulaires, SSH, RDP et le spraying, utilise Hydra et suis la méthode Password attacks.

INDEX // 42 FICHES // 12 DOMAINES LOCAL SEARCH
↑↓ naviguer ↵ ouvrir esc fermer sheet.sec / find
Raccourcis clavier
Recherche globale /ou⌘K
Naviguer dans les résultats ↑↓
Ouvrir le résultat actif ↵
Fermer une fenêtre esc
Accueil gh
Tous les sheets gs
Fiche aléatoire gr
Cette fenêtre ?