When a hacker or penetration tester compromises a system and wants to access a plaintext password from a database dump, they must first crack the stored password hash. Many attackers plunge headlong into this concept: they try any arbitrary password attack they want, for almost no reason. This discussion will demonstrate some effective password cracking methods and how to combine statistical analysis of passwords with tools to create a time-bound method for efficient and successful cracking.
Password cracking is a dying business. Users need to create more complex passwords, and some backend developers have begun using mechanisms such as Bcrypt to replace standard hash functions. The Bcrypt hash value takes longer to generate, making the password more difficult to crack. Crackers need to generate hashes very quickly to effectively crack passwords, making Bcrypt a very powerful tool against such attacks. To illustrate this example, a password cracker launched in 2012, made from 25 GPU clusters, was capable of generating 350 billion NTLM hashes per second, while Bcrypt generated 71,000 hashes. Using this as a comparison model, for each Bcrypt hash generated, 5 million NTLM hashes can be generated. When faced with the Bcrpyted algorithm, hackers must make more computational guesses about the password and cannot rely on using brute force on every possibility.
Note: If an attacker knows that the length of the password is so short that it does not take long to brute-force the key space, then an incremental attack step is not required.
Time efficiency becomes a key factor in successfully cracking the password. While it would be nice to cover the entire critical space of a user's password, the time required to do so is usually not feasible. Therefore, when cracking, it is important to try the most time-saving attack first, and if unsuccessful, continue with a slower cryptographic attack that covers more key space. The fastest method is a simple dictionary attack based on frequently used user passwords and previous password dumps. From there, you should try manipulating the dictionary to add numbers or symbols or change letters at the end. This is called a hybrid attack or a rule-based attack. Next, you can try to generate possible passwords using machine learning functions. Markov chains are a good example. By combining common elements found in English to form words (e.g., "ing", "er", "qu"), a good guess of a password can be generated, such as the password below. Although this particular password is easy to crack using any method, we will use it to simplify all attack vectors. Password1234Password1234
Finally, a targeted brute-force attack (called a mask attack) covers the entire key space of a given password based on the cryptographic structure. By the "structure" of a password, I mean the type and order of characters used to create the password. For example, a "structure" with uppercase letters, followed by 7 lowercase letters, followed by 4 digits (written as ). Password1234ullllllldddd
Lowercase letters, uppercase letters, symbols, numbers (l)(u)(s)(d)
Therefore, if an attacker decides to use this structure to create all possible combinations of characters, he or she will eventually find the password. Then the attacker's question becomes: what structure should be targeted first when attacking a set of hash values? Password1234
To help answer this question, I did some statistical analysis of popular password dumps to see if there are more common password structures than others, and to what extent this structure is correct. The sample size of over 34 million publicly exposed passwords includes well-known password dumps such as RockYou, LinkedIn, and phpBB.
The following figure shows the frequency of the mask structure for each unique mask. The red line represents the 50% line, which appears after the 13th most frequently occurring mask.
This means that the first 13 unique mask structures account for 50% of the sample cipher. The structure of more than 20 million passwords in the sample is located in the first 13 masks. These results are quite shocking in terms of the universality of structured cryptography. The other 50% exists within the long right tail, which has been reduced in this figure. In fact, out of 260,500 unique masks, only 400 are shown in this diagram. The concept of this universal structure cryptography is incredible; However, this is not surprising when you consider how users create and remember their passwords. Based on the analyzed data, there are some logical factors that help explain how this is possible. When users are asked to provide a password containing uppercase letters, they will use it as the first character more than 90% of the time. When asked to use numbers, most users will add two digits to the end of the password (possibly the year of graduation). The next most popular option is to end the password with four digits (maybe last year or this year). In this case, the next most popular number has a digit at the end and three digits at the end. Such structural commonalities allow an attacker to predict what the structure of a user's password is most likely to be.
With this structural knowledge, it is safe to assume that users will likely set their passwords to than (random letters), even if they all begin with and have 9 letters. Therefore, we assume that given a cryptographic structure, if we see consecutive letters, it is likely to be a Word. This is a very useful assumption for crackers because it eliminates a large amount of key space. This then becomes a hybrid attack that takes advantage of the statistical significance of the universal cryptographic structure. potatoespwivwdhpp
Typically, as penetration testers, even if we break a set of hashes, we may not have time to break all of them. However, destroying them can help upgrade access to the system and bring more useful findings to customers. Therefore, when cracking a password, it can be useful to determine how much time you will allocate to crack a set of hashes. Using the structures found in the previous analysis, an attacker can determine the top 10 popular structures he or she wants to overwrite based on password complexity requirements ranked by fastest completion time. Finally, an attacker can time limit his or her method by spending no more than an hour to execute the crack. This was discovered in a recent penetration test to obtain hashes. Below is a snapshot of the results of the CPU-based cracker.
In this case, the fastest structure to complete is , which we define as an uppercase letter followed by three lowercase letters ("W" stands for "Word"), and then a four-digit number. There are 69 passwords in the hash set that match the structure, and my standard CPU can traverse all the possibilities of the structure in one minute. We stopped the hack at 62 minutes, and the hack generated 221 unique hashes that matched 491 accounts, resulting in a total of 11% of the breach. The reason for the large difference in the number of password cracks and account compromises is that Office settings often lead people to use frequently used passwords. If an attacker determines that a generic password is being used in the environment, all users with the same password will also be threatened. U(W3)dddd
Although hybrid attacks or rule-based attacks, for example, can crack several of the passwords more quickly, the structure of the attack password allows us to cover a larger key space. This method is a valid next step if the Faster attack proves unsuccessful in compromising the target hash. Furthermore, it is important to remember that this example was done on a fairly mediocre CPU, and performing the same attack on a powerful GPU can reduce this time to a few seconds. Therefore, the exact timing is less important than the effective implementation of the theory. best64
helps us generally attack common password structures; However, there are some tools that can help locate specific applications. Tools like CeWL can scrape words from web pages and be used to generate company-specific Word lists or dictionaries. It works because companies tend to use passwords related to their industry, company, or job. Furthermore, since we determine that common passwords are popular in the work environment, we can also use passwords that have already been cracked as the basis for other passwords, which may be similar. For example, if we find that "" is a user's password, we might put "" in a new Word list, put it in the rule set, and then find that someone else has the password "". This concept of using cracked base words (such as '') and modifying them with surrounding characters is very effective when cracking hash values dumped from the enterprise environment, which can be traced back to the concept of password reuse. According to our penetration tests, this is best used to crack the last 20% of uncracked hashes. AcmeCorp1234AcmeCorpAcmeCorp@2015AcmeCorp
It is also important to trim the dictionary so that all passwords guessed meet the requirements specified by the application, so that time is not wasted guessing passwords that cannot be guessed due to length or character composition.
Starting with the fastest attack, covering the least key space (standard dictionary attack) to the slowest and largest key space (pure brute force) is the most ideal progression considering the time allocated to the attack. Therefore, an attacker should implement a standard approach that takes this into account. If the attacker wants to compromise the account in the first phase, then there may be no reason to continue using other attacks; However, in many cases, if a target account exists, a simple dictionary attack may not be sufficient, or the attacker simply wants to compromise as many accounts as possible, so a mix of statistically structured attacks and targeted brute force attacks may be required. Therefore, establishing a method is crucial for successful cracking, which may include the aforementioned methods as well as some automated processes. Recent tools, such as PRINCE, can help facilitate password cracking. It's important to develop a toolbar, such as PRINCE, and try it out in the method, but understanding the functionality behind the tools, rather than relying entirely on them, will make cracking more effective.
By analyzing using these passwords, you can determine the most popular structures given the required level of complexity. Therefore, developers should probably implement some controls to prevent users from using some of these very popular structures to flatten the curves of the previous drawing. However, the problem with this idea is that without a simple structure, users may find it difficult to remember their passwords. I recommend a password manager that requires two-factor authentication. These apps will generate and store all your passwords for you, so memory is not an issue. The passwords they generate are structurally random and can be used indefinitely as long as the application allows it. As I mentioned earlier, encrypted passwords are another very effective way to slow down an attacker's prospects. Finally, implementing policies in the Office to help users understand the dangers of sharing or reusing passwords is a successful step in the right direction, even if users don't always follow them. Although they probably won't always comply, it's an effective control.
Password cracking can be a vague concept. As cracking difficulty increases, efficiency-based targeted attacks are needed, and individual cracking methods should be established. It is not worth investing money in order to ultimately improve the hash generation speed. Therefore, implementing a method and simplified process using statistics and tools as a means of attack can facilitate password cracking. Developers can develop controls to address this situation, and users can use secure password managers to minimize the effectiveness of these attacks; However, such implementations are not yet very popular. Currently, statistical attacks against passwords are effective in both the number of cracks and the efficiency of temporal connections. Think about your own passwords and ask yourself how quickly they can be cracked, depending on their structure and what controls in your Office could lead to an attacker breaking into a user's account.