LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-15-2006, 09:25 PM   #1
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Rep: Reputation: 30
help me understand salted hashes


If unix crypt hashes contain a salt, for example an MD5 crypt, can anyone explain to me basicly how John The Ripper or other password auditing programs find out what the salt is before encrypting a cleartext word using the same algorithm and matching it against the encrypted hash to see if it cracked the password.

(For a non-real example) if the salt was 'foobar' and the password was 'password' how would it know what the salt was to crack foobarpasswordfoobar? Apparently adding the salt makes cracking this type of hash take more work compared to Windows LM type hashes which can be cracked fairly quickly.

Last edited by GUIPenguin; 05-15-2006 at 09:27 PM.
 
Old 05-15-2006, 09:35 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
http://reviews.cnet.com/4520-3513_7-5056214-1.html
http://en.wikipedia.org/wiki/Password_cracker
 
Old 05-15-2006, 09:40 PM   #3
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Original Poster
Rep: Reputation: 30
"Because Unix, Linux, and Mac OS X all use a 12-bit random variable called "salt" in their password schemes. It takes longer to crack a hash value with salt added, because that 12-bit variable generates 4,096 more variations to guess. Windows passwords, however, don't have such a random variable. Why Microsoft didn't include one in the password scheme for the latest versions of Windows is a mystery."

That makes sense..Thanks a lot.
 
Old 05-15-2006, 09:41 PM   #4
ataraxia
Member
 
Registered: Apr 2006
Location: Pittsburgh
Distribution: Debian Sid AMD64
Posts: 296

Rep: Reputation: 30
The salt is stored as the first few characters in the hash output. It sounds stupid, but it's actually still useful - sure, anybody can read the salt and start cracking, but the point is, that they can't start working before they steal your password file. Without the salt, anybody could take the hash of every common password, store it in a database, and crack any number of passwords with it.
 
Old 05-15-2006, 09:48 PM   #5
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by ataraxia
The salt is stored as the first few characters in the hash output. It sounds stupid, but it's actually still useful - sure, anybody can read the salt and start cracking, but the point is, that they can't start working before they steal your password file. Without the salt, anybody could take the hash of every common password, store it in a database, and crack any number of passwords with it.
Makes sense..preventing a person from running a rainbow table set of pre-generated hashes, (time-memory-trade off) of every avalible password for your encryption. Thanks a ton.

Last edited by GUIPenguin; 05-15-2006 at 09:55 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
weird behaviour with hashes in perl weird_guy Programming 0 06-22-2004 09:51 PM
Bittorrent Download... 2 Hashes failed Moebius01 Mandriva 3 11-21-2003 09:10 PM
md5 hashes banderson Linux - General 1 10-17-2003 12:06 PM
computing ext2 hashes StonedZealot Programming 2 05-28-2003 02:26 PM
MD5 hashes ruffneck Linux - General 1 07-08-2002 05:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration