Is it possible to identify a hash type?

前端 未结 4 1830
不思量自难忘°
不思量自难忘° 2021-01-03 04:49

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 ex

4条回答
  •  一生所求
    2021-01-03 05:26

    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 #
       #                                                   Root@Blackploit.com #
       #########################################################################
    
       -------------------------------------------------------------------------
     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.

提交回复
热议问题