user1616244
user1616244

Reputation: 269

Understanding and cracking salted sha512 hashes

On Ubuntu 12.04 I created several users and passwords, then promptly proceeded to try to crack those passwords with John the ripper. One password is very strong, but the others are in my wordlists.

John is still running, but I've got two cracked so far in about 20 minutes.

Everything I read talks about whether the salt is known or not. Take this hash for example:

john:$6$YiP34XiXdXyh9fZn$JrbLMb.VGncFzEyBlz5YsKUim.UE5JLPvFhfcgAH4lz.usOrh.lic8IrQx0PRMIvIIIK4KnaTs9fiEXwNOLJ1/:1003:1003:John,,,:/

The salt is:

YiP34XiXdXyh9fZn   

, right? I mean, isn't it always known? So a salt really doesn't do anything but protect against using rainbow tables, right?

Also, there is this post:

How long to brute force a salted SHA-512 hash? (salt provided)

According to that, a sha512 essentially cannot be cracked at all unless the password is in a wordlist. That post is about a year old, anyone have any new insights? I'm finding it difficult to find good resources about cracking hashes; all the information out there is about generating hashes and protecting passwords.

Upvotes: 3

Views: 15248

Answers (2)

Ramon
Ramon

Reputation: 434

This post is really old but I want to correct this anyway.
Salting is not only protecting against rainbow table attacks but also slows down guessing attacks against a large collection of hashes, for example a database table containing password hashes.
As an attacker you wouldn't be so stupid as to attack every hash individually.
Instead you attack them all at once.
You can go through each entry in your wordlist (or brute-force or some other technique to generate guesses), generate the hash for it, and compare it with all hashes in the database in one go. This way you only have to calculate each hash once while being able to check thousands or even millions of passwords with each hash.
With a random salt for each hash, you have to calculate every hash for every password individually.
This means that attacking a salted password hash dump takes longer by almost a factor of the total number of hashes in the dump.
This doesn't help the company the data was stolen from of course, but it protects the users of the service somewhat. Especially those with somewhat stronger but still guessable passwords of which there are a LOT.

Upvotes: 2

Pavel Ognev
Pavel Ognev

Reputation: 982

  1. In your example the salt is YiP34XiXdXyh9fZn (base-64 encoded).

  2. Yes, in this case salt protects only against rainbow tables.

  3. SHA512 still secure now. Attacker need a password list.

Upvotes: 1

Related Questions