1 00:00:03,800 --> 00:00:06,840 Let's see, how do we do the screen share on this? 2 00:00:42,300 --> 00:00:43,340 Ah, here we go. 3 00:00:51,160 --> 00:00:52,700 Okay, there we go. 4 00:00:52,800 --> 00:00:54,180 That's looking a lot better. 5 00:00:54,500 --> 00:00:57,020 All right, so welcome to Advanced HashCat Training. 6 00:00:57,660 --> 00:00:59,140 A quick note about who I am. 7 00:00:59,140 --> 00:01:01,540 I am staff here at the DEF CON Password Village. 8 00:01:01,560 --> 00:01:04,160 I am a member of the HashCat Dev Team and Team HashCat. 9 00:01:04,300 --> 00:01:06,640 I am the founder and CEO of Terrahash. 10 00:01:06,640 --> 00:01:09,780 And I'm also a password hashing competition judge. 11 00:01:09,780 --> 00:01:11,040 My name is Jeremy Gosney. 12 00:01:11,040 --> 00:01:12,380 I go by the Nick episode. 13 00:01:14,900 --> 00:01:19,260 All right, so number one, let's talk about entropy. 14 00:01:20,020 --> 00:01:22,980 In the password-cracking world, we don't really talk about entropy. 15 00:01:22,980 --> 00:01:25,560 We don't express password strength in terms of entropy. 16 00:01:26,240 --> 00:01:39,860 You know, in academic settings or when we're talking about, like, symmetric key encryption and such, you know, you'll hear, you know, this key has X bits of entropy or, you know, that password has 32 bits of entropy. 17 00:01:39,860 --> 00:01:41,860 We don't give a fuck about that as password crackers. 18 00:01:41,860 --> 00:01:46,040 As password crackers, what we care about is keyspace. 19 00:01:46,400 --> 00:01:49,240 Keyspace is the total number of combinations for an attack. 20 00:01:49,240 --> 00:01:52,340 It is essentially a measure of the level of effort for our attack. 21 00:01:53,780 --> 00:01:59,080 To calculate the keyspace for a dictionary attack, it's simply the number of words in a word list. 22 00:01:59,620 --> 00:02:06,760 For a dictionary and rule-based attack, it is the number of words in the word list multiplied by the number of rules in the word file. 23 00:02:07,680 --> 00:02:16,780 For a combinator attack, you multiply the keyspace of each dictionary, so the number of words in the first dictionary multiplied by the number of words in the second dictionary. 24 00:02:17,720 --> 00:02:23,680 And for a mask attack, you multiply the number of possible characters in each mask position together. 25 00:02:23,680 --> 00:02:27,780 And we'll get into exactly what that looks like and what that means. 26 00:02:31,320 --> 00:02:38,940 Oh, and for hybrid, of course, it's the keyspace of the word list, the number of words in the word list multiplied by the keyspace of the mask. 27 00:02:40,340 --> 00:02:42,220 So, keyspace examples. 28 00:02:42,760 --> 00:02:46,480 rocku.txt has 14.3 million words. 29 00:02:46,940 --> 00:02:51,960 best64.rule has 102 rules in the rule file, which is kind of a misnomer. 30 00:02:51,960 --> 00:02:53,020 It's not really best64. 31 00:02:53,020 --> 00:02:54,760 It's more like best102. 32 00:02:55,040 --> 00:03:01,260 So we multiply 14.3 million by 102 rules, gives us a keyspace of 463 billion. 33 00:03:01,340 --> 00:03:10,730 That is the total number of combinations that you need to hash when you combine rocku.txt with best64.rule. 34 00:03:11,840 --> 00:03:17,300 Let's say we were to do a combinator attack of rocku.txt plus rocku.txt. 35 00:03:17,480 --> 00:03:28,630 That would be 14.34 million words times 14.34 million words equals 205 quadrillion possible combinations for that keyspace. 36 00:03:29,710 --> 00:03:36,410 So our second attack, the combinator attack, requires 140,000 times more effort than the first attack. 37 00:03:37,570 --> 00:03:39,750 Now let's look at how we calculate keyspace for masks. 38 00:03:39,750 --> 00:03:46,050 I said that mask was the total of each character in each position, right? 39 00:03:46,050 --> 00:03:48,630 So we have 26 lower letters in all six positions. 40 00:03:48,630 --> 00:03:52,090 Our keyspace is 26 to the power of 6. 41 00:03:52,370 --> 00:03:56,930 That gives us a keyspace of 8 billion. 42 00:03:57,710 --> 00:03:59,850 Now let's look at this mask. 43 00:03:59,850 --> 00:04:02,830 We have special digit lower uppercase digit. 44 00:04:03,510 --> 00:04:21,770 So there's 33 possible special characters multiplied by 10 digits multiplied by 10 possible lowercase characters multiplied by 26 possible uppercase characters multiplied by 10 digits gives us a keyspace of 2.2 billion. 45 00:04:24,600 --> 00:04:27,710 All right, so let's look at using custom character sets. 46 00:04:29,490 --> 00:04:34,870 So in our custom character set, we have the lowercase and a digit. 47 00:04:34,870 --> 00:04:37,810 So 26 plus 10 is 36 custom characters. 48 00:04:37,810 --> 00:04:43,490 And then we have 5 lowercase letters. 49 00:04:43,490 --> 00:04:45,290 So 26 to the 5th. 50 00:04:45,290 --> 00:04:47,630 And then 2 digits is 10 to the 2. 51 00:04:47,630 --> 00:04:52,510 Gives us a total keyspace of 11.8 trillion. 52 00:04:52,890 --> 00:04:53,870 Sorry, billion. 53 00:04:53,870 --> 00:04:54,930 11.8 billion. 54 00:04:56,310 --> 00:04:58,330 Same thing if you have two custom character sets. 55 00:04:58,330 --> 00:05:01,510 Our first custom character set, we have a lower and a digit. 56 00:05:01,850 --> 00:05:04,630 Our second custom character, we have a digit and a special. 57 00:05:05,190 --> 00:05:07,190 So the math, of course, is very similar. 58 00:05:07,650 --> 00:05:27,910 So we have 36 in our custom character set 1 multiplied by 26 to the 5th for our lower digits in our mask multiplied by 10 possible digits and then 43 in our second custom character set for a total of 183 billion possible combinations. 59 00:05:29,790 --> 00:05:33,510 So let's kind of shelve that real quick and let's kind of pivot and talk about hash rate. 60 00:05:33,510 --> 00:05:39,170 Hash rate is a measure of distance over time and is expressed as a number of hash calculations per second. 61 00:05:40,250 --> 00:05:43,270 The hash rate depends on several variables, of course, like the hardware. 62 00:05:43,270 --> 00:05:44,470 Are we using CPU? 63 00:05:44,470 --> 00:05:45,370 Are we using GPU? 64 00:05:45,370 --> 00:05:47,270 Are we using an older GPU? 65 00:05:47,270 --> 00:05:48,530 Are we using a newer GPU? 66 00:05:48,990 --> 00:05:53,770 The hash algorithm itself plays a big part in the hash rate. 67 00:05:54,050 --> 00:05:56,870 Some hashes are stupid fast like MD4 and MD5. 68 00:05:56,870 --> 00:06:00,070 Others are brutally slow like Bcrypt and Scrypt. 69 00:06:00,750 --> 00:06:04,250 The attack mode also plays a big part in our hash rate. 70 00:06:05,190 --> 00:06:09,050 Brute force is going to be faster than a wordless attack, for example. 71 00:06:09,970 --> 00:06:21,550 The way the attack is structured, we will get into GPU acceleration a little bit later in the slide deck, but basically the way you structure your attack can negatively or positively impact performance. 72 00:06:22,830 --> 00:06:25,990 And, of course, the key space for the attack also plays a part in hash rate. 73 00:06:25,990 --> 00:06:31,110 If the key space is too small for GPU acceleration, you will not have a very high hash rate. 74 00:06:31,970 --> 00:06:33,550 And also the number of hashes. 75 00:06:33,550 --> 00:06:37,930 This has more to do with the amount of RAM or video RAM that you have. 76 00:06:37,930 --> 00:06:46,050 If you have an inordinately large number of hashes, it will affect the hash rate. 77 00:06:47,170 --> 00:06:51,550 So the best case scenario for HashCat is single hash brute force. 78 00:06:52,350 --> 00:06:57,450 With single hash brute force, you will get the absolute highest speed for each algorithm. 79 00:06:58,790 --> 00:07:03,350 Once you get into multi-hash brute force, the speed is going to drop by about 25%. 80 00:07:05,250 --> 00:07:11,650 Once you start doing single hash dictionary and rules, it's going to be about 50% slower than single hash brute force. 81 00:07:13,270 --> 00:07:18,730 Multi-hash dictionary and rules is going to be about 75% of the speed of a single hash brute force attack. 82 00:07:18,830 --> 00:07:23,630 So you can see how the attack itself actually plays a large part in the hash rate. 83 00:07:24,590 --> 00:07:29,090 Now I mentioned that some hash algorithms are faster than others. 84 00:07:30,290 --> 00:07:41,810 Fast hash algorithms like MD4, MD5, SHA1, SHA2, and even DEScrypt now with BitSlice DES on GPU, I would definitely consider to be a fast hash these days. 85 00:07:42,470 --> 00:07:48,590 Medium fast hashes would be things like MD5Crypt, Kerberos, and macOS hashes. 86 00:07:49,490 --> 00:07:51,750 And then, of course, we have the very slow hash algorithms. 87 00:07:51,750 --> 00:07:57,930 A lot of these have custom iteration counts, cost variables. 88 00:07:57,930 --> 00:08:04,390 So these can actually be made to be somewhat fast, but most of the time these are going to use settings that are going to be very painfully slow. 89 00:08:06,750 --> 00:08:08,350 And here's an example of that. 90 00:08:08,350 --> 00:08:13,630 This is a chart that just very quickly will visualize which algorithms we consider to be fast. 91 00:08:14,470 --> 00:08:16,610 And then kind of a medium fast here. 92 00:08:17,330 --> 00:08:20,450 And then, of course, the really painfully slow ones down here at the bottom. 93 00:08:24,380 --> 00:08:32,280 All right, so let's look at how hash rate and keyspace interact with each other because this is really important for when you start structuring advanced attacks. 94 00:08:33,360 --> 00:08:38,460 Mainly because we want to know, if we go to run an attack, is this a worthwhile attack to run or is it not? 95 00:08:38,460 --> 00:08:42,020 And, of course, Hashcat will tell you, like, yeah, you know, this is going to take a decade to run. 96 00:08:42,240 --> 00:08:49,240 But as a password cracker, you should kind of have a sense for what that's going to look like in advance of actually starting your attack. 97 00:08:50,420 --> 00:08:51,960 So let's look at the following example. 98 00:08:51,960 --> 00:08:56,180 We have a single hash NTLM brute force here. 99 00:08:56,980 --> 00:09:02,140 Sorry, the command here doesn't actually say single hash, but let's pretend that there is a single hash there. 100 00:09:02,780 --> 00:09:11,580 So four RTX 2080 TIs can pull about 380 billion hashes per second on single hash NTLM brute force. 101 00:09:11,680 --> 00:09:16,280 And, of course, our mask here has a keyspace of 95 to the 8th. 102 00:09:20,210 --> 00:09:35,410 So the math, 95 to the power of 8 divided by our 380 giga hash a second means that this attack will take us about 17,458 seconds or about 4.77 hours. 103 00:09:35,410 --> 00:09:39,090 So this attack will complete in under five hours, which is likely acceptable to you. 104 00:09:39,190 --> 00:09:41,870 Now let's add a character to our mask. 105 00:09:42,490 --> 00:09:48,950 Keyspace increases to 95 to the 9th at the same speed of 380 giga hash a second. 106 00:09:48,950 --> 00:09:58,170 This attack will now take us 1.6 million seconds to complete, which is a little over 19 days. 107 00:10:00,930 --> 00:10:01,890 Sorry. 108 00:10:02,970 --> 00:10:11,130 So at this point, you understand how to calculate keyspace, you understand fast versus slow hash algorithms, and you understand the relationship between the keyspace and the hash rate. 109 00:10:11,170 --> 00:10:13,730 But how do we actually leverage this to our advantage? 110 00:10:15,970 --> 00:10:19,110 To do that, let's talk about base and mod. 111 00:10:24,790 --> 00:10:25,670 GPU acceleration... 112 00:10:26,830 --> 00:10:27,930 Excellent, I skipped a slide there. 113 00:10:28,790 --> 00:10:35,310 So to achieve GPU acceleration, we have two concepts in HashScout called the base loop and the mod loop. 114 00:10:35,390 --> 00:10:40,950 The base loop gets executed on the host CPU and the mod loop gets executed on the GPU devices. 115 00:10:44,370 --> 00:10:50,190 If the mod loop is too small or if it's completely non-existent, you will not gain GPU acceleration on fast hash algorithms. 116 00:10:50,190 --> 00:11:02,910 This means that while your GPUs may be capable of doing the 380 billion hashes per second like you saw in the previous examples, they will not do so if the mod loop is too small. 117 00:11:02,910 --> 00:11:08,050 You will get no GPU acceleration, your hash rate will be abysmal down in the single digit kilohash a second. 118 00:11:09,370 --> 00:11:11,790 And we absolutely want GPU acceleration. 119 00:11:11,790 --> 00:11:14,850 That's kind of the entire point of GPU password cracking. 120 00:11:16,790 --> 00:11:26,570 So if you do a straight dictionary attack on GPU with no rules, then you have a base loop which is the dictionary, but you have no modifier whatsoever. 121 00:11:26,570 --> 00:11:28,910 You will not get GPU acceleration with this attack. 122 00:11:28,910 --> 00:11:29,970 It will be abysmally slow. 123 00:11:29,970 --> 00:11:33,010 It will actually be faster on CPU than on GPU. 124 00:11:33,770 --> 00:11:39,630 The second example here, where we're using the same dictionary, but now we're adding a modifier, rules. 125 00:11:41,210 --> 00:11:53,330 The words will be looped over from Rocky.txt on the CPU, but then the rules will be applied in the onGPU rule engine on each of the GPU devices, and that's where our GPU acceleration comes from. 126 00:11:54,010 --> 00:12:00,630 So the more rules you have, the more GPU acceleration you're going to gain to a point. 127 00:12:01,490 --> 00:12:08,570 I believe the tipping point there is somewhere around... well, last I looked, it was probably 50,000 rules. 128 00:12:08,570 --> 00:12:11,710 It may be a little bit higher now with larger VRAM values. 129 00:12:14,010 --> 00:12:21,570 But 30,000 to 50,000 rules is kind of the sweet spot for achieving maximum GPU acceleration with a rule-based attack. 130 00:12:23,530 --> 00:12:29,590 For a combinator attack, the base loop is going to be the inner dictionary, while the mod loop is going to be the outer dictionary. 131 00:12:29,590 --> 00:12:37,650 And then for mask attacks, it's kind of interesting, because the mask itself doesn't have any kind of obvious split like a combinator or rule-based attack does. 132 00:12:37,910 --> 00:12:43,670 So what Hashcat actually does internally is it's going to split the mask into two parts. 133 00:12:43,670 --> 00:12:47,770 So the first half is going to be the base loop, while the second half of the mask is going to be the mod loop. 134 00:12:51,300 --> 00:12:57,080 And then for hybrid attacks, again, it's pretty straightforward because it's actually logically separated in the command itself. 135 00:12:57,080 --> 00:13:00,820 The base loop is the dictionary, and the mask is the mod for A6. 136 00:13:00,820 --> 00:13:02,040 Then for A7, it's the reverse. 137 00:13:02,040 --> 00:13:04,540 The mask is the mod, and the dictionary is the base. 138 00:13:05,960 --> 00:13:08,280 So let's look at this in an applied example. 139 00:13:08,420 --> 00:13:15,360 So we have the same single hash NTLM brute force command that we had from the previous slides. 140 00:13:16,980 --> 00:13:20,420 Hash rate is still, let's say, 380 gigahash a second. 141 00:13:20,420 --> 00:13:23,400 Our keyspace is still 95 to the 9th. 142 00:13:24,480 --> 00:13:33,000 So per our previous math, this will take 1.6 million seconds to complete, which again is a little bit over 19 days. 143 00:13:33,000 --> 00:13:35,320 But let's say we don't want that to take 19 days. 144 00:13:35,320 --> 00:13:38,280 Let's say we want this attack to complete in 8 hours. 145 00:13:40,140 --> 00:13:43,800 So 8 hours is about 29,000 seconds. 146 00:13:44,240 --> 00:13:49,900 So what we're going to do is we say our hash rate is 380 billion hashes per second. 147 00:13:49,900 --> 00:13:53,720 And we want to let it run for a little over 29,000 seconds. 148 00:13:53,720 --> 00:14:00,600 So we simply multiply that to find out the number of hash calculations that we can make with our 4 2080 TIs in that amount of seconds. 149 00:14:00,600 --> 00:14:10,740 And that gives us 11.1 quadrillion guesses in 8 hours with this attack. 150 00:14:11,180 --> 00:14:13,980 So now we sit here and we flip it around. 151 00:14:13,980 --> 00:14:25,380 We want to find out what we need our base loop to look like to hit that 8 hour target. 152 00:14:25,380 --> 00:14:33,600 So right now with the mask of question mark A, the base is 95 for each character set. 153 00:14:33,600 --> 00:14:40,980 But if we take this 11.1 quadrillion and we raise it to the 1 over 9th power, we get 60. 154 00:14:40,980 --> 00:14:50,420 And what we can do with that is HashCat, for anywhere you're using a mask, actually uses Markov tables to do a probabilistic brute force. 155 00:14:50,500 --> 00:14:55,260 Instead of a classic dumb brute force where you're going A, A, A, A, A, etc. 156 00:14:55,260 --> 00:14:56,980 all the way through Z, Z, Z, Z. 157 00:14:57,500 --> 00:15:08,540 HashCat generates some Markov statistics and will order the search space for each character position probabilistically based on those Markov tables. 158 00:15:09,660 --> 00:15:15,380 So we can take our HashCat command and we can append this dash T 60. 159 00:15:15,400 --> 00:15:19,080 And what that does is that sets our Markov table threshold to 60. 160 00:15:19,080 --> 00:15:31,540 And what that simultaneously does is that lowers our base loop from using the 95s to using 60 instead. 161 00:15:31,540 --> 00:15:39,540 So instead of 95 to the 9th, the key space is now only 60 to the 9th, using only the top 60 characters in each mask position. 162 00:15:43,310 --> 00:15:44,370 All right. 163 00:15:45,970 --> 00:15:49,270 Let's kind of shift gears here and talk about loopback attacks. 164 00:15:49,290 --> 00:15:54,350 So by and large, password cracking is mostly just a feedback loop. 165 00:15:55,230 --> 00:16:02,450 You know, we crack passwords so that we can learn new passwords, which we then turn around and use to crack future passwords. 166 00:16:02,450 --> 00:16:06,570 And this cycle happens over and over for decades. 167 00:16:07,650 --> 00:16:11,410 And it holds true for every large password breach we've ever had, right? 168 00:16:11,410 --> 00:16:16,870 So starting with probably the most famous in recent history, which would be Roku. 169 00:16:17,070 --> 00:16:22,110 Roku.txt, while dated, is still kind of like the de facto example when we're talking about a word list. 170 00:16:22,110 --> 00:16:25,170 Even in this slide deck, I've used Roku.txt extensively. 171 00:16:26,770 --> 00:16:28,790 So, you know, we have the Roku passwords. 172 00:16:28,790 --> 00:16:36,590 That allowed us to identify new passwords by adding rules and, you know, basically mangling up those words to crack new passwords. 173 00:16:36,590 --> 00:16:40,530 And then once we got those new passwords, we add those to our word list collection, right? 174 00:16:40,730 --> 00:16:43,030 And then we're going to turn around and add rules to those. 175 00:16:43,030 --> 00:16:47,870 And we're going to continuously find new passwords based on the previous passwords that we've cracked. 176 00:16:50,510 --> 00:16:55,970 So in a loopback attack, which, again, you can do a loopback attack on a single run, right? 177 00:16:55,970 --> 00:16:58,770 For whatever run you're working on at that point in time. 178 00:16:59,010 --> 00:17:12,790 Or, you know, when you use previously cracked passwords, you're essentially still doing a loopback attack because you're taking the passwords found in your previous runs, even if those runs were a decade ago, and you're iterating on those to discover new passwords in your current run. 179 00:17:14,050 --> 00:17:18,810 So to do that, we'll just strip the plaintext passwords out of our hashcat.py file. 180 00:17:20,190 --> 00:17:23,870 And then we'll use that as a word list with some rules. 181 00:17:23,870 --> 00:17:27,530 Throw some best64 at it, throw some dead1 at it, you know, what have you. 182 00:17:27,970 --> 00:17:32,930 Now, we can take that a little bit further with what's called a fingerprint attack. 183 00:17:34,010 --> 00:17:43,630 Instead of using the plaintext passwords themselves, we can break each plaintext password down into what are known as fingerprints. 184 00:17:44,030 --> 00:17:46,890 A fingerprint would just be like, let's say, the word password. 185 00:17:46,890 --> 00:17:56,230 So it's going to split that up into P, P-A, P-A-S, P-A-S-S, P-S-S, P-A-S-S-W, so on and so forth. 186 00:17:56,830 --> 00:18:02,610 Basically expanding each word into each, you know, individual cluster of letters of itself. 187 00:18:03,530 --> 00:18:21,850 So to do that, we take our cracked passwords, whether it be looped back from your current hashcat.pot or cracked passwords from a previous run, you know, maybe like the RockyLeague or, you know, LinkedIn breach or Ashley Madison, Edmodo, Gizmodo, whatever. 188 00:18:22,070 --> 00:18:30,030 Literally dozens and dozens, if not thousands and thousands of public password breaches out there that have all sorts of, you know, plaintext or easy-to-crack passwords. 189 00:18:30,030 --> 00:18:34,770 And we use those to generate the fingerprints using expander.bin from hashcatutils. 190 00:18:35,030 --> 00:18:42,350 Once we have the fingerprints, we can either run that as a combinator attack or we can use that in a hybrid attack. 191 00:18:43,910 --> 00:18:46,910 You can do, you know, any numerous things with them. 192 00:18:48,490 --> 00:18:51,170 And you can also add rules to nearly any attack as well. 193 00:18:51,170 --> 00:18:58,530 So let's say you're using your fingerprints, right, and you're doing your combinator attack. 194 00:18:58,530 --> 00:19:01,550 Let's say you're using RockYou with your fingerprint file. 195 00:19:01,830 --> 00:19:03,650 Let's throw some rules on that. 196 00:19:03,830 --> 00:19:11,150 So the "-J rule is going to operate on the left-hand side there, the base loop. 197 00:19:11,350 --> 00:19:17,010 And in this example, we're deleting the last two characters from every word from the word list. 198 00:19:17,290 --> 00:19:23,850 And then we are appending our fingerprints from our loopback attacks to every word in that word list. 199 00:19:25,250 --> 00:19:27,330 This is kind of a favorite attack I like to run. 200 00:19:27,330 --> 00:19:35,450 I like to do "-J", right bracket, and then "-J", two right brackets, then "-J", three right brackets, so on and so forth. 201 00:19:37,270 --> 00:19:48,570 And that's going to enable you to find some pretty interesting new planes as we continue to cut characters off the end of the left dictionary and then continue to append our fingerprints to the right. 202 00:19:50,950 --> 00:19:52,830 Same thing with this example here. 203 00:19:52,830 --> 00:19:58,070 So like I said, "-J operates on the left-hand side, while "-K operates on the right-hand side. 204 00:19:58,330 --> 00:20:01,130 And of course, the C rule means to capitalize the word. 205 00:20:01,130 --> 00:20:09,230 So let's say we want to capitalize the rules from RockYou and then capitalize the words from our fingerprints. 206 00:20:09,330 --> 00:20:21,150 We can append "-JC", "-KC", to our command line, and that will enable us to capitalize each of the words on each side before combining them. 207 00:20:23,230 --> 00:20:28,430 And you can do the same thing with hybrid attacks as well. 208 00:20:28,610 --> 00:20:33,570 So let's say we have our fingerprints file, and we want to append double digits to every word in our fingerprints. 209 00:20:35,030 --> 00:20:46,090 We can add a "-JC", say we want to remove the last character from each word in our fingerprints, and then capitalize that word before appending the double digits. 210 00:20:48,170 --> 00:20:50,590 All right, now let's talk about stemming. 211 00:20:50,590 --> 00:20:53,930 It sounds sexual, but it isn't. 212 00:20:53,930 --> 00:20:58,230 Stemming is essentially identifying base words from each password. 213 00:20:59,130 --> 00:21:15,850 And this is going to be very useful for when you're doing your loopback attacks, whether, again, that's the looping back over passwords you just cracked in a previous run, or you're talking about looping back over passwords you've cracked from anything over the years. 214 00:21:16,530 --> 00:21:24,930 And essentially what we're doing in identifying these base words is we're unrolling the rules that people apply when they create passwords. 215 00:21:24,990 --> 00:21:30,010 So, you know, most people, when they're told to make a password stronger, they will uppercase the first letter. 216 00:21:30,170 --> 00:21:37,890 They'll substitute, like, an A for a four, or an E for a three, etc., and probably put a couple of digits on the end. 217 00:21:38,090 --> 00:21:43,270 So when we stem, the first thing we're going to do is we're going to remove any leading and trailing digits and specials. 218 00:21:43,930 --> 00:21:47,110 We're going to convert it all to lowercase to normalize it. 219 00:21:47,110 --> 00:21:51,410 And any midstream digits and specials, we're going to convert those back to letters. 220 00:21:51,890 --> 00:21:53,150 And, of course, there's a lot more you can do here. 221 00:21:53,150 --> 00:21:57,970 This is kind of a very basic example of stemming, and there's also multiple tools out there that can do this for you. 222 00:21:58,470 --> 00:22:02,810 Like, I have some small scripts on the Hashcat forums that can do this. 223 00:22:02,810 --> 00:22:05,030 I think Pack can do this as well. 224 00:22:06,150 --> 00:22:10,230 And probably a dozen other tools that people have made on GitHub that can do wordless stemming. 225 00:22:11,750 --> 00:22:27,070 But once you have those stemmed words, you have a nice set of base words that you can use to either do fingerprint attack or hybrid attack, or you can use those with, like, rulegen.py from Pack to generate new Hashcat rules off of. 226 00:22:29,630 --> 00:22:35,230 So stemming, of course, is very powerful based on the things we can do with it once we have the common base words. 227 00:22:37,070 --> 00:22:41,390 All right, here's some more advanced things you can do with Hashcat. 228 00:22:41,390 --> 00:22:44,270 temesis.pl, again, from Hashcat Utils. 229 00:22:44,650 --> 00:22:59,770 What this is going to do is it's going to basically take fingerprints from each word, and it's going to create rules that will insert that word and fragments of that word throughout the word list that you pick. 230 00:23:01,230 --> 00:23:06,450 So let's say we pick rockyu, and we've created our temesis rule from our base words. 231 00:23:06,710 --> 00:23:12,630 It's going to go through and take every word from rockyu and insert patterns based on our base words. 232 00:23:13,030 --> 00:23:16,330 It's going to interlace those throughout the words in rockyu. 233 00:23:17,050 --> 00:23:20,910 And, of course, you can chain rules as well. 234 00:23:21,170 --> 00:23:24,670 So when you chain rules, the rules are applied in order. 235 00:23:24,670 --> 00:23:31,630 So we're starting with rockyu.txt, and then every word from rockyu is going to be... 236 00:23:31,630 --> 00:23:34,650 have the rules from our temesis.rule file applied to it. 237 00:23:34,710 --> 00:23:42,070 And then, after we apply temesis rule, it's going to then apply the best64 rules on top of that. 238 00:23:42,390 --> 00:23:52,330 So the key space for this can actually get really large really quick because it's going to be the number of words in rockyu times the number of rules in temesis times the number of rules in best64. 239 00:23:52,570 --> 00:23:57,810 So when you're performing this attack, it can get really large really quick. 240 00:23:57,890 --> 00:24:00,190 But it can also be really powerful. 241 00:24:02,890 --> 00:24:06,930 Rule chain like best64 and best64 is usually a good one. 242 00:24:06,930 --> 00:24:15,690 Sometimes, depending on your hash rate, you can chain dead1.rule or rockyu30000.rule with best64. 243 00:24:16,870 --> 00:24:21,690 But yeah, you can come up with some pretty cool attacks using rule chaining in this fashion. 244 00:24:22,950 --> 00:24:33,150 And sometimes it's a necessity if you have, like, a really targeted pattern that you want to hit that you can't just hit with a single rule file. 245 00:24:33,330 --> 00:24:37,810 You can create multiple rule files and chain them to try to generate the type of plain text you're after. 246 00:24:39,770 --> 00:24:43,810 And then, of course, there's PrinceProcessor, which is also available on hashcat.github. 247 00:24:44,770 --> 00:24:48,650 PrinceProcessor is sort of a more advanced combinator attack. 248 00:24:49,790 --> 00:24:57,730 It's kind of difficult to describe, but just think of it like a more advanced combinator attack, which you can pipe into hashcat through standardin. 249 00:25:00,190 --> 00:25:03,410 And that's it for advanced stuff. 250 00:25:03,410 --> 00:25:11,270 There's a lot more fun things that we can do, and we can cover that in a future session. 251 00:25:11,310 --> 00:25:16,410 But yeah, that's some of the really cool advanced stuff that you can do with hashcat.