Discuss the security of MD5 encryption from a practical perspective (figure)

Source: Internet
Author: User

Comments: For a long time, MD5 encryption and verification are very secure. Many forums and software Save the password of the user name after MD5 encryption. Compared with the previous plaintext storage, the stored information after MD5 encryption is more secure. After all, the information after MD5 encryption is more secure. The MD5 encryption method is also one-way and there is no reverse cracking. However, do you know that MD5 is not truly secure? MD5 encryption and verification has always been very secure. Many forums and software store the password of the user name after MD5 encryption, compared with plain text storage, the stored information after MD5 encryption is more secure. After all, the information after MD5 encryption is more secure, and the MD5 encryption method is one-way and there is no reverse cracking. However, do you know that MD5 is not really secure? intruders can still use multiple methods to crack the plaintext password after obtaining the MD5 encrypted string. Next, we would like to invite readers of IT168 to discuss the MD5 encryption security from the actual situation.
I. Introduction to MD5 encryption:
MD5 is an irreversible encryption algorithm. The full name of md5 is message-digest algorithm 5. In early 1990s, it was developed by mit laboratory for computer science and ronald l. rivest of rsa data security inc and developed by md2, md3, and md4. The function of this function is to compress large-capacity information into a confidential format before signing a private key using digital signature software (that is, to convert a byte string of any length into a long size ). integer ).
In 1991, rivest developed a more sophisticated md5 algorithm. It adds the concept of "safety-strap" (safety-belts) to md4. Although md5 is a little slower than md4, it is more secure. This algorithm is obviously composed of four and md4 designs with a few different steps. A typical application of md5 is to generate a message digest (message-digest) for a piece of information to prevent tampering. For example, many software in unix have the same file name when downloading, and the file extension is. an md5 file usually contains only one line of text. Its structure is roughly as follows: md5 (tanajiya.tar.gz) = 0ca175b9c0f1_a831d895e269332461
The digital signature of the tanajiya.tar.gz file. Md5 treats the entire file as a large text, and generates this unique md5 information digest through its irreversible String Conversion Algorithm. If the content of the file is changed in any form (including transmission errors caused by manual modification or instability of the line during the file loading process) in the process of further propagation ), when you re-calculate the md5 value for this file, you will find that the information digest is different. It can be determined that all you get is an incorrect file. If there is another third-party authentication organization, md5 can also prevent the file author's "credit". This is called a digital signature application. Md5 is also widely used in encryption and decryption technologies. For example, in unix systems, users' passwords are encrypted and stored in the file system using md5 (or other similar algorithms. When a user logs on, the system calculates the password entered by the user into an md5 value, and then compares it with the md5 value saved in the file system to determine whether the entered password is correct. In this step, the system can determine the validity of the user's logon system without knowing the user's password. This not only avoids users' passwords from being known by users with system administrator permissions, but also increases the difficulty of password cracking to some extent.
Ii. Discuss the MD5 encryption security in practice:
So does MD5 really have no security issues? Even if hackers or intruders get the MD5 encrypted code, can they really not crack the actual plaintext password information? The answer is no. In many cases, MD5 can be easily cracked through brute force cracking. The following describes the encryption security of MD5.
(1) obtain the MD5 password:
The author's target website is an article publishing platform using the XP test version of qingchuang Article management system. After scanning, he found his background logon address http: // xxx/admin_index.asp. (1)
  
500) this. width = 500 "title =" Click here to browse images in a new window "/>
Figure 1
Step 1: Use a tool to scan the target website and find its password and administrator user name. (2)
  
500) this. width = 500 "title =" Click here to browse images in a new window "/>
Figure 2
Step 2: After scanning, find the target website with the table name article_admin, and successfully guess the account field name-username. The account length is five characters, and the password field name is password, it is estimated that the password length is 16 characters. (3)

  
500) this. width = 500 "title =" Click here to browse images in a new window "/>
Figure 3
Step 3: continue to scan and crack. The five-digit account name is admin, and the 16-digit password is 6f9466a1dae2a6a6. Based on experience, the 16-digit password should have been encrypted by MD5, you cannot log on to the background using this password. (4)
  
500) this. width = 500 "title =" Click here to browse images in a new window "/>
Figure 4
TIPS:
The MD5 encrypted code fields are all 16 bits. Therefore, based on experience, we can easily determine whether the scanned information is plaintext or has been encrypted by MD5.
(2) website-based MD5 password cracking:
As mentioned above, MD5 is an irreversible algorithm. We can only crack it in brute force mode. Of course, there are some websites on the Internet that provide us with the MD5 lookup function, this site stores a large amount of MD5 ciphertext and plaintext data, after entering the MD5-encrypted 16-bit code on these website query pages, the system automatically queries the database and displays the plaintext found to the user.
Among the many MD5 query websites, I think that www.20.5.com has the largest storage capacity. The 4 TB hard drive of this site has been launched. Currently, there are 457354352282 MD5 records, which include 12-bit and 12-bit numbers, 8-character letters, all 7-character letters and numbers. Enter the 16-bit MD5 encryption code to be queried in the code box and click "MD5 encryption or decryption, in the query result, we will see the plaintext information corresponding to the MD5 code. The MD5 password is successfully cracked. (5)
  
500) this. width = 500 "title =" Click here to browse images in a new window "/>
Figure 5
(3) brute-force cracking of the MD5 password using custom tools:
Of course, if the MD5 password cannot be queried through the above website, or we already know the rules and clues of plain text, then, we can use tools to customize rules to brute force crack the MD5 encrypted ciphertext obtained. Here I will introduce you to an enhanced version of MD5 professional encryptor.
Step 1: Open the software and enter your MD5 ciphertext information in the MD5 ciphertext settings. The software can crack a single ciphertext or multiple ciphertext at the same time. (6)

  
500) this. width = 500 "title =" Click here to browse images in a new window "/>
Figure 6
Step 2: In the Password character settings, we can select the character set to use, such as only numbers, letters, and so on. Of course, we can also set our own dictionary files so that the tool can load the dictionary for brute force cracking. In addition, the tool also provides some templates such as birthday dictionary. It is better to use this template to crack the MD5 value parsed by the birthday password.
Step 3: on the right of the main interface, we can set the length of the password and the number of threads simultaneously cracked. Of course, this tool provides the resumable break function, so that we can save the progress and read the progress at any time.
Step 4: it takes some time for this tool to crack the MD5 ciphertext. The specific time varies with the complexity of the password, after the software calculates the password, it will prompt "a password is found for XX hours and XX minutes. Then, we can log on to the management background of the target site using the parsed password and the user name we tested before, so as to successfully intrude into the article Management System of the target site. (7)
  
500) this. width = 500 "title =" Click here to browse images in a new window "/>
Figure 7
Iii. Summary:
From the perspective of this article, MD5 is not completely secure. In the past, we thought that it was impossible to calculate the plaintext password even if it was obtained by illegal intruders after encrypting the password with MD5, however, we can see from the actual examples in this article that this idea is incorrect. Intruders can obtain the plaintext of the MD5 ciphertext through multiple methods such as website queries and dictionary brute-force cracking, so as to easily intrude into the system. Therefore, when we maintain servers and protect websites, we must make up for each vulnerability on the server site and do not give hackers any chance to download MD5 encrypted ciphertext, only in this way can enterprise servers and websites be created more securely.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.