Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to identify a hash type?

Tags:

security

hash

I know you can compare the length but many hash types have the same lengths.

Is there a way to identify a hash's type and whether it has been salted?

For example:

hash=2bf231b0e98be99a969bd6724f42a691
hash=4ac5a4ff764807d6ef464e27e4d1bee3
hash=4d177cec31d658ed22cc229e45d7265e
like image 625
evolvd Avatar asked Jan 18 '10 21:01

evolvd


People also ask

Can hashcat detect hash type?

Even if hash-identifier isn't sure what kind of hash you're dealing with, comparing the response of example hashes from the Hashcat website can help you verify that you've found the right hash.

Can you decipher a hash?

This is not possible except by trying all possible combinations. The hash functions apply millions of non-reversible operations so that the input data can not be retrieved. Hash functions are created to not be decrypted, their algorithms are public. The only way to decrypt a hash is to know the input data.

What is a hash identifier?

A transaction hash/id is a unique string of characters that is given to every transaction that is verified and added to the blockchain. In many cases, a transaction hash is needed in order to locate funds.


2 Answers

That particular example is a 32 character alphanumeric representation, which is almost certainly MD5.

SHA-1 usually comes as a 40 character alphanumeric string (as does SHA-0)

MD5 and SHA-1 account for the vast majority of hashes you'll find in the wild.

like image 74
skaffman Avatar answered Sep 20 '22 03:09

skaffman


Yes, it is possible to a degree of some certainty to identify the type of hash algorithm that was used.

One tool that I use a lot to do this is hash-identifier.

For example, I create a hash of the Hash_ID.py file:

$ openssl sha -sha256 Hash_ID.py 
SHA256(Hash_ID.py)= 5382a8826c972f8fa8687efe1f68e475c02af4bf542b0d7e68b9deffd388db96

When running Hash_ID.py it will ask for the Hash to be entered:

$ python Hash_ID.py 
   #########################################################################
   #     __  __                     __           ______    _____           #
   #    /\ \/\ \                   /\ \         /\__  _\  /\  _ `\         #
   #    \ \ \_\ \     __      ____ \ \ \___     \/_/\ \/  \ \ \/\ \        #
   #     \ \  _  \  /'__`\   / ,__\ \ \  _ `\      \ \ \   \ \ \ \ \       #
   #      \ \ \ \ \/\ \_\ \_/\__, `\ \ \ \ \ \      \_\ \__ \ \ \_\ \      #
   #       \ \_\ \_\ \___ \_\/\____/  \ \_\ \_\     /\_____\ \ \____/      #
   #        \/_/\/_/\/__/\/_/\/___/    \/_/\/_/     \/_____/  \/___/  v1.1 #
   #                                                             By Zion3R #
   #                                                    www.Blackploit.com #
   #                                                   [email protected] #
   #########################################################################

   -------------------------------------------------------------------------
 HASH: 5382a8826c972f8fa8687efe1f68e475c02af4bf542b0d7e68b9deffd388db96

Possible Hashs:
[+]  SHA-256
[+]  Haval-256

Least Possible Hashs:
[+]  GOST R 34.11-94
[+]  RipeMD-256
[+]  SNEFRU-256
[+]  SHA-256(HMAC)
[+]  Haval-256(HMAC)
[+]  RipeMD-256(HMAC)
[+]  SNEFRU-256(HMAC)
[+]  SHA-256(md5($pass))
[+]  SHA-256(sha1($pass))

The way Hash ID works is by checking the hash given against criteria for all the hash types it supports and will give a list of possible hash types.

like image 21
Casey Avatar answered Sep 20 '22 03:09

Casey