John the Ripper

De wikilivois
Aller à la navigationAller à la recherche

https://www.openwall.com/john/doc/

Installer et lancer

Installer John

$sudo apt-get install john

Préparer le fichier

$sudo unshadow /etc/passwd /etc/shadow > mypasswd

Lancer la recherche de mots de passe

$sudo john mypasswd

Afficher les résultats

$sudo john –show mypasswd


Optimiser la recherche pour Ubuntu

Remplacer sha512 par md5 dans common-password: <licode file=/etc/pam.d/common-password>

  1. here are the per-package modules (the "Primary" block)

password [success=1 default=ignore] pam_unix.so obscure sha512 </licode>

<licode file=/etc/pam.d/common-password>

  1. here are the per-package modules (the "Primary" block)

password [success=1 default=ignore] pam_unix.so obscure md5 </licode>

Il faut recréer le fichier de mot de passe avec les commandes du paragraphe précédent.

Ajouter des dictionnaires

Lancer john en choississant un dictionnaire:

$sudo john -w:dictionnaire.txt mypasswd

Afficher l'avancement

$sudo john --status

While John the Ripper is running, press any key (like enter) to see a status output. Or to check from another terminal you can run john --status. The output looks like this:

DES cracking speed: 94g 0:01:08:34 74% 2/3 0.02284g/s 2784p/s 97648c/s 269491C/s day?..Hal?
1                   2   3          4   5   6          7       8        9         10

Here is what each section means:

  1. Type of encryption it is trying to crack with
  2. Number of successful password guesses
  3. Time elapsed since started
  4. Percent completed for that pass
  5. Current pass / number of passes total
  6. g/s = successful guesses per second
  7. p/s = passwords tested per second
  8. c/s = crypts (password hashes) computed per second
  9. C/s = crypts tested per second (in versions below 1.8.0 this was “c/s”)
  10. The current word it’s trying.