I thought I might share with you a way to recover password on a *nix system. The commands and screen shots are from Ubuntu, but this basic process should work for any distro.
When you create an account on a Linux system, the password isn’t stored. Instead, the hash of the password is stored in /etc/shadow. Here is a portion of my shadow file. The password hash field begins with $1$.
Now, if I want to discover the passwords for those accounts, I need to enlist the help of John the Ripper.
You can install it on Ubuntu with this command:
sudo apt-get install john
When you’re ready to crack the password, just run
sudo john /etc/shadow
That screen shot is of the second time I ran this command. When I originally started this command, it recovered the password for test123 immediately. So fast, in fact, that I wasn’t ready to grab a screen shot. That’s ok though, because there’s an option you’ll need to know anyway. Once John cracks a password, it remembers it, and doesn’t try to crack it again. Should you ever need to see it again, the command option is -show.
So it recovered a password which was the same as the username; not very impressive huh? Well the reason it recovered that password so quickly is that it has three modes of recovery. First it tries variations of the username, then it tries it’s wordlists, then it tries a brute force attack.
If you have it running, and want to check the status, just hit enter in the terminal window.
Try it on your machine. See how long it takes to crack your passwords, and let me know in the comments.
Credit to: James House
Related Posts: On this day...
- Blackberry "London." Leaked pic of new BBX device - 2011
- Twinkie diet helps nutrition professor lose 27 pounds - 2010
- Google Offers Free Wi-Fi at Airports During the Holidays - 2009
- TSA doesn't understand what "random" means - 2009
- Spam gets 1 response per 12,500,000 emails - 2008
- Bypass any Firewall or Throttling ISP with SSH - 2007
- Why Commercials Before Movies Is Worse Than Piracy - 2007