Monday, March 21, 2016

find weak password of linux system with john

john can detect weak password on linux system by provide the password file. It is good to get rid of all those weak password, because it can be the point for unauthorized entry.

1- installation
$ sudo apt-get install john

2- run john with shadow file as the supplement, it will crack the those weak password
$ sudo john  /etc/shadow
Loaded 5 password hashes with 5 different salts (crypt, generic crypt(3) [?/64])
Press 'q' or Ctrl-C to abort, almost any other key for status
123               (user1)
123               (user2)
123               (user9)
123               (user10)
123               (user8)

5g 0:00:00:50 100% 2/3 0.09926g/s 309.8p/s 386.1c/s 386.1C/s
Use the "--show" option to display all of the cracked passwords reliably
Session completed

3- show already cracked password
$ sudo john --show /etc/shadow

5 password hashes cracked, 0 left

with these information about those accounts with weak password, now you can eliminate them or change their passwords.

No comments:

Post a Comment