
Article destiné à un but éducatif uniquement. Choisissez des mots de passe forts et complexes.
Prérequis :
sudo apt-get update sudo apt-get install -y libssl-dev zlib1g-dev libgmp-dev libpcap-dev libbz2-dev
Téléchargement d’un fichier test protégé par mot de passe :
wget https://xxxxxxxxxxxx/myfile.pdf -P ~/Downloads/
Téléchargement et compilation de John the Ripper :
mkdir workspace cd workspace/ git clone https://github.com/magnumripper/JohnTheRipper.git cd JohnTheRipper/src/ ./configure make -s clean && make -sj4 cd ../run/
Cracker le mot de passe du fichier de test au format PDF :
./pdf2john.pl ~/Downloads/myfile.pdf > ~/Downloads/myfile.hash ./john --format=pdf ~/Downloads/myfile.hash ./john --wordlist=password.lst ~/Downloads/myfile.hash ./john --show --format=pdf ~/Downloads/myfile.hash
Idem pour un fichier RAR :
./zip2john.pl ~/Downloads/myfile.rar > ~/Downloads/myfile.hash ./john --format=rar ~/Downloads/myfile.hash ./john --wordlist=password.lst ~/Downloads/myfile.hash ./john --show --format=rar ~/Downloads/myfile.hash
Idem pour un fichier ZIP :
./zip2john.pl ~/Downloads/myfile.zip > ~/Downloads/myfile.hash ./john --format=zip ~/Downloads/myfile.hash ./john --wordlist=password.lst ~/Downloads/myfile.hash ./john --show --format=zip ~/Downloads/myfile.hash