Lesson 11

Date: 4/14/2010
Basics of Linux Security
Linux for Engineering and IT Applications


Passwords cracking exercise


Install John the Ripper
apt-get install john 
Create two accounts, jackl and saml:
useradd -s /bin/bash jackl
useradd -s /bin/bash saml
Assigne them very simple passwords, for example, jack1 and a1b2c3 by running command passwd jackl and passwd saml or chpasswd as follows:
echo jackl:jack1 | chpasswd
echo saml:a1b2c3 | chpasswd 

Extract the accounts from /etc/shadow and save them in a separate file, local.shadow in the current directory:
egrep '(jackl|saml)' /etc/shadow > local.shadow
userdel  jackl
userdel  saml
Run John the Ripper on local.shadow file:
john local.shadow 
After it cracks the two accounts, terminate it with Ctrl-C the make it show the results:
john -show local.shadow 
It stores the results (password hash vs. text) in file john_run/john.pot
8l0mokn/r.mqI:jack1
eTSKYHnJlAG52:a1b2c3



Take me to the Course Website