有人告诉我,他见过这样的软件系统:
从其他系统检索MD5加密密码; 解密加密的密码和 使用系统自己的算法将密码存储在系统的数据库中。
这可能吗?我认为解密MD5哈希是不可能/可行的。
我知道有MD5字典,但是有真正的解密算法吗?
有人告诉我,他见过这样的软件系统:
从其他系统检索MD5加密密码; 解密加密的密码和 使用系统自己的算法将密码存储在系统的数据库中。
这可能吗?我认为解密MD5哈希是不可能/可行的。
我知道有MD5字典,但是有真正的解密算法吗?
当前回答
MD5哈希算法是不可逆的,所以MD5解码在不可能,但一些网站有批量设置密码匹配,所以你可以尝试在线解码MD5哈希。
在网上试试:
MD5解密
md5online
md5decrypter
其他回答
不,不可能反转诸如MD5这样的哈希函数:给定输出哈希值,除非已知关于输入消息的足够信息,否则不可能找到输入消息。
解密不是为哈希函数定义的函数;加密和解密是CBC模式下AES等密码的功能;哈希函数不加密也不解密。哈希函数用于摘要输入消息。顾名思义,没有反向算法可以设计。
MD5 has been designed as a cryptographically secure, one-way hash function. It is now easy to generate collisions for MD5 - even if a large part of the input message is pre-determined. So MD5 is officially broken and MD5 should not be considered a cryptographically secure hash anymore. It is however still impossible to find an input message that leads to a hash value: find X when only H(X) is known (and X doesn't have a pre-computed structure with at least one 128 byte block of precomputed data). There are no known pre-image attacks against MD5.
It is generally also possible to guess passwords using brute force or (augmented) dictionary attacks, to compare databases or to try and find password hashes in so called rainbow tables. If a match is found then it is computationally certain that the input has been found. Hash functions are also secure against collision attacks: finding X' so that H(X') = H(X) given H(X). So if an X is found it is computationally certain that it was indeed the input message. Otherwise you would have performed a collision attack after all. Rainbow tables can be used to speed up the attacks and there are specialized internet resources out there that will help you find a password given a specific hash.
It is of course possible to re-use the hash value H(X) to verify passwords that were generated on other systems. The only thing that the receiving system has to do is to store the result of a deterministic function F that takes H(X) as input. When X is given to the system then H(X) and therefore F can be recalculated and the results can be compared. In other words, it is not required to decrypt the hash value to just verify that a password is correct, and you can still store the hash as a different value.
重要的是使用密码哈希或PBKDF(基于密码的密钥派生函数)来代替MD5。这样的函数指定如何将盐和散列一起使用。这样就不会为相同的密码(来自其他用户或其他数据库)生成相同的散列。由于这个原因,密码哈希也不允许使用彩虹表,只要盐足够大并且正确随机。
Password hashes also contain a work factor (sometimes configured using an iteration count) that can significantly slow down attacks that try to find the password given the salt and hash value. This is important as the database with salts and hash values could be stolen. Finally, the password hash may also be memory-hard so that a significant amount of memory is required to calculate the hash. This makes it impossible to use special hardware (GPU's, ASIC's, FPGA's etc.) to allow an attacker to speed up the search. Other inputs or configuration options such as a pepper or the amount of parallelization may also be available to a password hash.
然而,它仍然允许任何人验证给定H(X)的密码,即使H(X)是密码哈希。密码哈希仍然是确定的,所以如果有人知道所有的输入和哈希算法本身,那么X可以用来计算H(X),并且-再说一次-结果可以进行比较。
常用的密码散列有bcrypt、scrypt和PBKDF2。还有各种形式的Argon2,它是最近密码哈希竞赛的赢家。在CrackStation上有一篇很好的关于密码安全的博文。
可以使对手无法执行哈希计算来验证密码是否正确。为此,可以使用胡椒作为密码散列的输入。或者,哈希值当然可以使用AES等密码和CBC或GCM等操作模式进行加密。然而,这需要独立存储秘密/密钥,并且比密码哈希有更高的访问要求。
您可以找到使用字典检索原始消息的在线工具。
在某些情况下,dictionary方法可能是无用的:
如果使用SALT消息散列消息 如果消息是哈希不止一次
例如,这里有一个MD5解密在线工具。
要做到这一点并不容易。这就是首先对密码进行哈希的意义。:)
你应该做的一件事是手动为他们设置一个临时密码,并将其发送给他们。
我不愿提及这一点,因为这是一个坏主意(而且也不能保证一定有效),但您可以尝试在彩虹表(如milw0rm)中查找散列,看看是否可以通过这种方式恢复旧密码。
MD5是一个加密(单向)哈希函数,因此没有直接的方法来解码它。加密哈希函数的全部目的就是你不能撤销它。
您可以做的一件事是使用蛮力策略,即猜测哈希了什么,然后使用相同的函数哈希它,看看它是否匹配。除非散列数据非常容易猜测,否则可能需要很长时间。
理论上,你不能。哈希的意义在于它是单向的。这意味着如果有人设法获得哈希列表,他们仍然无法获得您的密码。此外,这意味着即使有人在多个网站上使用相同的密码(是的,我们都知道我们不应该这样做,但是……)任何访问站点A的数据库的人都不能在站点B上使用该用户的密码。
The fact that MD5 is a hash also means it loses information. For any given MD5 hash, if you allow passwords of arbitrary length there could be multiple passwords which produce the same hash. For a good hash it would be computationally infeasible to find them beyond a pretty trivial maximum length, but it means there's no guarantee that if you find a password which has the target hash, it's definitely the original password. It's astronomically unlikely that you'd see two ASCII-only, reasonable-length passwords that have the same MD5 hash, but it's not impossible.
MD5是一个不好的哈希密码:
它的速度很快,这意味着如果你有一个“目标”散列,尝试很多密码,看看你是否能找到一个散列到目标的密码是很便宜的。盐析对这种情况没有帮助,但它有助于增加寻找与使用不同盐析的多个哈希中的任何一个匹配的密码的代价。 我相信它有已知的缺陷,这使得它更容易发现冲突,尽管在可打印文本(而不是任意二进制数据)中发现冲突至少会更困难。
我不是安全专家,所以除了“不要使用自己的身份验证系统”之外,我不会给出具体的建议。从信誉良好的供应商那里找一个,然后使用它。安全系统的设计和实现都是一项棘手的工作。