0

I have a relatively old Linux system, where password are not shadowed, therefore stored in /etc/passwd/.

My question is, since I know the cleartext password, and its hash (looking at the passwd file), Can I quickly figure out the hashing system/crack it? So I would be able to get the cleartext password from another user just from its hash, or at least make bruteforcing faster?

Thanks.

EDIT: The hash is 13 characters long

1

Hashes are one-way algorithms which will help you confirm if a hash of plaintext matches the hash in your possession (the rainbow tables approach that @TTT suggests). It will, however, not help you reverse-crack it.

If the hash function itself turns out to be weak (like MD5/SHA1), you can possibly find strings which collide with the hashes in your possession, creating an alternative password.

3

The hashing algorithm used is not part of the secret. The hashing algorithm should always be assumed to be known. You can read up to this here.

In fact, the string you find in /etc/passwd or /etc/shadow tells you which hash has been used right in the first number:

$1 → md5
$2 → blowfish
$2 → eksblowfish
$5 → sha256
$6 → sha512
0

It may help you determine which hashing algorithm is used, but it will not help you brute force other passwords faster. When you brute force you will be calculating many hashes. Starting with knowing 0 versus 1 hash doesn't make a difference. Even starting with a rainbow table of trillions of known hashes won't help if the salts are all different.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.