Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-07-2010, 06:51 AM
|
#1
|
Member
Registered: Aug 2005
Posts: 158
Rep:
|
MD5 password exposed
Hi,
I noticed that our /etc/shadow file is readable on a patch I released for one of our in house linux boxes a while back ago.
If someone was cleaver enough and managed to see it, could they use it to gain access the root account etc? Our passwords are all MD5 encrypted.
Thanks!
|
|
|
06-07-2010, 07:46 AM
|
#2
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
Hi.
Yes, it is possible to de-hash the passwords in /etc/shadow . There are programs (John the Ripper being the most-used on Unix) which can use dictionary and brute-force attacks against the hashes, and will eventually hit the right password.
I would change the permissions if I were you.
Dave
|
|
1 members found this post helpful.
|
06-07-2010, 09:18 AM
|
#3
|
Member
Registered: Aug 2005
Posts: 158
Original Poster
Rep:
|
Hi there,
Sorry, should have been a bit clearer. With exceptions of brutal force, database lookups etc, is there a way the user could use the encrypted password and send it to a ssh server for example? The password the user types in is encrypted with MD5 before sent to the ssh server isn't it? So a user could modify a SSH client potentially to send me string to the ssh server to get in as root?
Best Regards
Fredrik
|
|
|
06-07-2010, 09:24 AM
|
#4
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
Hi.
SSH encrypts the whole stream and the password is passed down that encrypted channel, but it's not MD5 that's used (MD5 isn't an encryption algorithm, it's just a hash). The password (along with everything else) is decrypted by the SSH server before being used - most Linuxen use PAM to process authentication, so the password's passed to PAM in plaintext to be compared with the hash in /etc/shadow.
So no, having the MD5 hash on it's own won't let anyone in.
Dave
|
|
1 members found this post helpful.
|
06-07-2010, 09:56 AM
|
#5
|
Member
Registered: Aug 2005
Posts: 158
Original Poster
Rep:
|
Thanks for clarifiying that!
|
|
|
06-08-2010, 05:22 PM
|
#6
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Rep: 
|
Nevertheless, I'll second the recommendation that you 1) fix the permissions on /etc/shadow; 2) consider changing root's password very soon.
With today's computing power (even on affordable workstations), someone with the salt + MD5 hash can realistically discover your password.
|
|
|
All times are GMT -5. The time now is 03:47 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|