Crack Linux password:
Using unshadow and john commands
Install John the Ripper Password Cracking Tool
John the ripper is not installed by default. If you are using Debian / Ubuntu Linux, enter:rahul@rahul-desktop:~$ sudo apt-get install john
Note: RHEL, CentOS, Fedora, Redhat Linux user can grab john the ripper here. Once downloaded use rpm command:
rahul@rahul-desktop:~
# rpm -ivh john*
How do I use John the ripper to crack passwords?
First use the unshadow command to combines the /etc/passwdand /etc/shadowfiles so John can use them. You might need this since if you only used your shadow file, On a normal system you’ll need to run unshadow as root to be able to read the shadow file. So login as root or use sudo / su command underIn Debian / Ubuntu Linux
$ sudo /usr/sbin/unshadow /etc/passwd /etc/shadow > /tmp/crackpasswd.db
In RHEL / CentOS / Fedora
# /usr/bin/unshadow /etc/passwd /etc/shadow > /tmp/crackpasswd.db
WARNING! Do at your own risk
To use John, you just need to supply it a password file created using unshadow command along with desired options.
To Crack Passwd
rahul@rahul-desktop:~$sudo
john /tmp/crackpasswd.db
Output:
Created directory: /root/.johnThis procedure will take its own time. To see the cracked passwords, enter:
Loaded 5 password hashes with 5 different salts (generic crypt(3) [?/32])
redhat (rahul)
654321 (test)
rahul@rahul-desktop:~$
john -show /tmp/crackpasswd.db
test:654321:1002:1002:test,,,:/home/test:/bin/bashAbove output clearly indicates - user test has 654321 and rahul has redhat password.
rahul:redhat:1003:1003::/home/rahul:/bin/bash
2 passwords cracked, 4 left
Enjoy................
No comments:
Post a Comment