On Wed, Apr 06, 2011 at 09:02:10PM -0500, Ron Johnson wrote: > The OS must store the salt somewhere, in order to correctly > authenticate the user when he logs in. But I've never heard of > /etc/hashsalt so what am I misunderstanding?
Yes, the salt and the password are both stored in the /etc/shadow file. If you can read that file, then you have access to both. However, if you don't have the salt but you do have the hash (maybe it's a different application besides login you're attacking that stores the salt elsewhere), you don't know the size of the salt, nor what was used in the salt to create the hash. So, your search space has just expanded by 64^(number of characters in salt). For example, say you have the hash 633427ee13ba83a92778c91a795d444564b9214c (which actually isn't the encoded format as shown in /etc/shadow, but it will illustrate the point). You don't know what salt was used to create that hash. It's 160 bits, so it could be SHA1. Assuming such, you send it through a 7TB rainbow table, and turn up empty handed. So, either the password is exceptionally strong, or it's using a salt, and could still be strong, or could be weak. You don't know. And the only way to work it out is start incrementing through salts for every string you try, up to some reasonable point. I hope you have time on your hands, because you'll need it. In this case, the password was 'foo' and the salt was 'salt': $ echo foosalt | sha1sum 633427ee13ba83a92778c91a795d444564b9214c - -- . o . o . o . . o o . . . o . . . o . o o o . o . o o . . o o o o . o . . o o o o . o o o
signature.asc
Description: Digital signature