有人告诉我,他见过这样的软件系统:

从其他系统检索MD5加密密码; 解密加密的密码和 使用系统自己的算法将密码存储在系统的数据库中。

这可能吗?我认为解密MD5哈希是不可能/可行的。

我知道有MD5字典,但是有真正的解密算法吗?


当前回答

在这里可以看到所有其他的答案,关于它如何以及为什么不可逆,以及为什么你不想这样做。

为了完整起见,这里有彩虹表,你可以在上面查找可能的匹配。不能保证彩虹表中的答案是用户选择的原始密码,这样会使用户非常困惑。

同样,这也不适用于咸散列。许多安全专家都建议用盐腌制。

其他回答

唯一可以工作的是(如果我们提到密码只是散列,没有添加任何类型的盐来防止重放攻击,如果是这样,你必须知道盐)顺便说一句,得到一个字典攻击工具,许多单词,数字等文件,然后创建两行,一行是单词,数字(在字典中),另一个是单词的散列,并比较散列,如果匹配你得到它…

这是唯一的方法,不用进行密码分析。

不,他一定是被MD5字典搞糊涂了。

加密哈希(MD5等)是一种方法,您不能仅使用摘要返回原始消息,除非您有关于原始消息的其他不应该的信息等。

理论上,对哈希值进行解密是不可能的,但您可以使用一些肮脏的技术来获取原始的纯文本。

Bruteforcing: All computer security algorithm suffer bruteforcing. Based on this idea today's GPU employ the idea of parallel programming using which it can get back the plain text by massively bruteforcing it using any graphics processor. This tool hashcat does this job. Last time I checked the cuda version of it, I was able to bruteforce a 7 letter long character within six minutes. Internet search: Just copy and paste the hash on Google and see If you can find the corresponding plaintext there. This is not a solution when you are pentesting something but it is definitely worth a try. Some websites maintain the hash for almost all the words in the dictionary.

MD5被认为是坏的,不是因为您可以从散列中获得原始内容,而是因为通过工作,您可以生成两个散列到相同散列的消息。

不能取消MD5哈希。

不。MD5不是加密(尽管它可能被用作一些加密算法的一部分),它是一个单向哈希函数。作为转换的一部分,大部分原始数据实际上“丢失”了。

Think about this: An MD5 is always 128 bits long. That means that there are 2128 possible MD5 hashes. That is a reasonably large number, and yet it is most definitely finite. And yet, there are an infinite number of possible inputs to a given hash function (and most of them contain more than 128 bits, or a measly 16 bytes). So there are actually an infinite number of possibilities for data that would hash to the same value. The thing that makes hashes interesting is that it is incredibly difficult to find two pieces of data that hash to the same value, and the chances of it happening by accident are almost 0.

A simple example for a (very insecure) hash function (and this illustrates the general idea of it being one-way) would be to take all of the bits of a piece of data, and treat it as a large number. Next, perform integer division using some large (probably prime) number n and take the remainder (see: Modulus). You will be left with some number between 0 and n. If you were to perform the same calculation again (any time, on any computer, anywhere), using the exact same string, it will come up with the same value. And yet, there is no way to find out what the original value was, since there are an infinite number of numbers that have that exact remainder, when divided by n.

That said, MD5 has been found to have some weaknesses, such that with some complex mathematics, it may be possible to find a collision without trying out 2128 possible input strings. And the fact that most passwords are short, and people often use common values (like "password" or "secret") means that in some cases, you can make a reasonably good guess at someone's password by Googling for the hash or using a Rainbow table. That is one reason why you should always "salt" hashed passwords, so that two identical values, when hashed, will not hash to the same value.

一旦一段数据通过哈希函数运行,就没有回头路了。