1 00:00:00,000 --> 00:00:03,840 Well, thanks for coming to this talk. I'm Matt Weir. I'm from Florida State 2 00:00:03,840 --> 00:00:07,860 University, and this talk here, as you can see, is a password cracking on a budget. 3 00:00:10,360 --> 00:00:14,440 Before I begin, there's a couple of people I just want to thank. First of all, 4 00:00:14,440 --> 00:00:18,180 Bill Glodek, who is another research student, who unfortunately for me 5 00:00:18,180 --> 00:00:23,500 graduated, but he did quite a bit of the work here. Professor Sudhir Agarwal, my 6 00:00:23,500 --> 00:00:27,640 major professor, Professor Breno, and then also the National Institute for 7 00:00:27,640 --> 00:00:30,820 Justice for funding this research. So I really do appreciate that so I don't have 8 00:00:30,820 --> 00:00:37,420 to teach all those intro to C++ classes there. Real quick about me, just so you 9 00:00:37,420 --> 00:00:41,160 know who the hell I am. As I said before, my name is Matt Weir. I'm currently a PhD 10 00:00:41,160 --> 00:00:45,240 student at Florida State University. Before I decided to go back to college 11 00:00:45,240 --> 00:00:48,520 and take a significant pay cut, I was a network security engineer for 12 00:00:48,520 --> 00:00:52,780 Northrop Grumman TASC. In the last project I was on, I helped support the 13 00:00:52,780 --> 00:00:56,920 JTF Joint Task Force Global Network Operations with some of their forensics 14 00:00:56,920 --> 00:00:57,560 investments. 15 00:00:59,260 --> 00:01:03,380 Also, just to let you guys know, I have had my password stolen in the past, so this 16 00:01:03,380 --> 00:01:06,260 hits a little close to home. In fact, I discovered that during the course of 17 00:01:06,260 --> 00:01:10,160 this research. A lot of what we do is try to figure out how people actually 18 00:01:10,160 --> 00:01:14,540 create passwords. In order to do that, what we do is we look at disclosed 19 00:01:14,540 --> 00:01:18,000 password lists. So like a hacker will break into a site, they'll steal all the 20 00:01:18,000 --> 00:01:21,020 passwords, they'll post them online, and then we take a look at them to try to 21 00:01:21,020 --> 00:01:24,660 figure out what they are. If they just post the hashes, then we actually 22 00:01:24,660 --> 00:01:27,540 have to go ahead and crack those passwords in order to try to figure out how to 23 00:01:27,540 --> 00:01:29,660 figure out how people create those passwords in the first place. 24 00:01:30,500 --> 00:01:35,620 So a long time ago I played a video game called Batmud, which is way better than World of 25 00:01:35,620 --> 00:01:40,000 Warcraft. But unfortunately they didn't have a very secure website apparently. 26 00:01:40,440 --> 00:01:44,300 So as I was going through these lists here, I was like, oh hey, I know these people, that's 27 00:01:44,300 --> 00:01:49,480 my username. Crap, that's my password. So this has hit a little close to home here 28 00:01:49,480 --> 00:01:52,400 for me. But I think that's actually fairly common. 29 00:01:53,120 --> 00:01:56,520 If you think that every single website that you've ever entered a username and password 30 00:01:56,520 --> 00:01:57,520 into is going to be a password, then you're probably wrong. You're probably not going to 31 00:01:57,520 --> 00:01:57,800 be able to get the password. 32 00:01:57,800 --> 00:02:00,200 But if you have a website that is really secure and never been broken into, you're 33 00:02:00,200 --> 00:02:01,760 kind of probably at the wrong conference here. 34 00:02:05,200 --> 00:02:09,340 Now I'd like to have a disclaimer before my talk, just so you notice and can walk 35 00:02:09,340 --> 00:02:14,960 out early if you want to. But I'm a student and I crack passwords in a research-type setting. 36 00:02:15,460 --> 00:02:19,800 So we're not really getting hard drives and encrypted files and having to crack them. 37 00:02:20,540 --> 00:02:23,440 Instead we're going ahead and we're cracking these big old password lists here. 38 00:02:23,700 --> 00:02:27,020 So some of the tools that we do use may be a little bit different than what you would 39 00:02:27,020 --> 00:02:30,300 use in real life here. But hopefully the techniques are fairly similar. 40 00:02:31,800 --> 00:02:35,060 Also, I'll freely admit I've been wrong about many things before. I'll probably be wrong 41 00:02:35,060 --> 00:02:39,100 about a lot of stuff in the future. So I certainly don't claim to know everything 42 00:02:39,100 --> 00:02:42,760 there is about password cracking. And in fact, quite a bit of what we've been 43 00:02:42,760 --> 00:02:44,820 doing I kind of feel has been reinventing the wheel. 44 00:02:45,840 --> 00:02:49,260 Because password cracking has been something that's been out there for a long time, but 45 00:02:49,260 --> 00:02:51,880 it's not really well documented. So we've had to kind of rediscover a lot of 46 00:02:51,880 --> 00:02:55,000 it ourselves. And actually that's kind of the goal of this 47 00:02:55,000 --> 00:02:55,540 talk here. 48 00:02:55,540 --> 00:03:01,640 If you are just setting up your own forensics shop, or you're a system administrator, the 49 00:03:01,640 --> 00:03:06,860 last system admin left and then passed down all the passwords and now your boss is telling 50 00:03:06,860 --> 00:03:10,200 you you need to go ahead and crack these passwords, what do you do? 51 00:03:11,680 --> 00:03:16,220 Because a lot of stuff online pretty much just says, like, run John the Ripper or Cain 52 00:03:16,220 --> 00:03:20,040 and Abel, and leaves it at that. Or maybe gives you a CISSP overview of how 53 00:03:20,040 --> 00:03:22,960 to crack passwords. But trying to actually apply that in real 54 00:03:22,960 --> 00:03:24,360 life is a lot different, I've found. 55 00:03:25,840 --> 00:03:30,620 So really, all this talk is, is just if you're put in that position, how can you maximize 56 00:03:30,620 --> 00:03:37,700 the chances of you cracking that password? So since I do tend to kind of wander a bit, 57 00:03:37,800 --> 00:03:40,100 I figured I might at least give you an overview of what we're going to be talking about. 58 00:03:41,220 --> 00:03:44,420 At the very beginning we're just going to start real quick with just some password cracking 59 00:03:44,420 --> 00:03:47,720 basics. Just so everyone here who wandered in kind 60 00:03:47,720 --> 00:03:50,980 of were on the same level. And also kind of tell what we've been focusing 61 00:03:50,980 --> 00:03:54,200 on as far as our research goes. Then we're going to go ahead and talk about 62 00:03:54,200 --> 00:03:55,440 input dictionaries. Word lists. 63 00:03:55,540 --> 00:03:59,360 A little bit about where to get them, but more about how to generate them yourselves. 64 00:03:59,800 --> 00:04:01,680 Or at least some of our work at trying to generate them. 65 00:04:01,860 --> 00:04:05,400 Because a lot of the word lists online are, leave a little bit to be desired there. 66 00:04:06,120 --> 00:04:08,260 And then we're going to talk about word mangling rules. 67 00:04:08,960 --> 00:04:13,040 How you go ahead and pick them. A little bit of advanced John the Ripper. 68 00:04:13,500 --> 00:04:17,000 And then finally, some of our research that we've been doing on trying to automatically 69 00:04:17,000 --> 00:04:20,420 generate word mangling rules. Because doing that by hand is a real pain. 70 00:04:23,980 --> 00:04:25,520 Also, because this is a 50 minute talk, we're going to talk a little bit about how to generate 71 00:04:25,540 --> 00:04:25,700 word lists. From the start let me just talk about 72 00:04:25,700 --> 00:04:26,700 some of the way we've been doing it, and then after the talk, and that's probably the worst 73 00:04:26,700 --> 00:04:29,060 way to give information about technical stuff in the world. 74 00:04:30,480 --> 00:04:33,500 Please, my email address is here. It's on the slides on your CD. 75 00:04:33,920 --> 00:04:36,460 If you have any questions, go ahead and let me know. 76 00:04:36,940 --> 00:04:39,640 Also, I'll be available in the, you know, Q and A room afterwards. 77 00:04:39,900 --> 00:04:43,120 Please show up. Grill me. We can geek out about word lists and stuff 78 00:04:43,120 --> 00:04:47,200 like that. But it's really important for me that this 79 00:04:47,200 --> 00:04:50,000 research actually has some application in the real world. 80 00:04:50,140 --> 00:04:52,740 I don't want to just go ahead and write papers that don't really apply to anything. 81 00:04:52,740 --> 00:04:56,420 At the end of the day, if no one's actually using this information or it's not worthwhile, 82 00:04:57,140 --> 00:04:58,900 I'll go ahead and I'll try to research something else. 83 00:04:59,540 --> 00:05:01,020 Please get in touch with me. 84 00:05:01,260 --> 00:05:05,320 If you think what I'm doing is wrong or you think these tools are crap, please let me 85 00:05:05,320 --> 00:05:09,540 know, as long as you can tell me maybe a better way or some way to improve that crap there. 86 00:05:11,040 --> 00:05:14,740 If you have some good ideas that you want me to look at, we're research students, we're 87 00:05:14,740 --> 00:05:19,020 always looking for the stuff to work on, so please, you're not bugging me if you go 88 00:05:19,020 --> 00:05:19,820 ahead and contact me. 89 00:05:22,680 --> 00:05:26,360 Also, you might want to copy down that URL at the bottom there, because that's not on 90 00:05:26,360 --> 00:05:26,720 the slides. 91 00:05:28,320 --> 00:05:30,880 All the tools, all the scripts and stuff like that, we're providing online. 92 00:05:32,100 --> 00:05:37,000 Unfortunately, our main website, which is on the CD, is currently down right now, because 93 00:05:37,000 --> 00:05:41,180 our system admin took it down to make sure it's all patched up and stuff like that, because 94 00:05:41,180 --> 00:05:44,020 he said that some people were banging away on that. 95 00:05:44,700 --> 00:05:48,120 That's my fault, and now I learned that before you give a talk at DEF CON, you might want 96 00:05:48,120 --> 00:05:49,800 to give more than a week's worth of notice. 97 00:05:51,060 --> 00:05:58,760 So I apologize for that, but I threw up it on Google Pages there, so it's just reusablesec.googlepages.com, 98 00:05:58,940 --> 00:06:00,500 and you can download all tools and scripts. 99 00:06:03,600 --> 00:06:07,160 Real quick about password cracking, don't worry, it does not give me a CISSP prep course. 100 00:06:10,220 --> 00:06:14,700 There's really two types of password cracking when people think about it, online and offline. 101 00:06:15,680 --> 00:06:19,720 Online, we really don't care about too much. This is what people are trying to do to our 102 00:06:19,800 --> 00:06:25,280 website a couple days ago. The site's online, or the computer's online, 103 00:06:25,560 --> 00:06:29,720 and you're just going to try different username and password combinations to a site that's 104 00:06:29,720 --> 00:06:33,860 currently operating. The research that we've been doing really 105 00:06:33,860 --> 00:06:37,720 doesn't apply to it that much, because on online password cracking, first of all, it's 106 00:06:37,720 --> 00:06:41,060 generally very slow, so you're very limited by the number of guesses you can make. 107 00:06:41,540 --> 00:06:45,500 And it's noisy, so the system admin actually looks at the logs, which happens every once 108 00:06:45,500 --> 00:06:49,540 in a while. It really shows up. But more importantly, too, you're often only 109 00:06:49,540 --> 00:06:53,640 limited by the number of guesses you can make before the system locks you out. 110 00:06:53,760 --> 00:06:57,020 You try four passwords, if you get it wrong, then you're locked out of the system. 111 00:06:58,080 --> 00:07:03,380 What we're really focusing on, though, is offline password cracking. This is the computer 112 00:07:03,380 --> 00:07:08,680 forensics. You obtain the warrant, you broke down the door, you seize the hard drive, you 113 00:07:08,680 --> 00:07:12,640 get back to your shop, and all of a sudden you realize, well, this hard drive's encrypted, 114 00:07:12,820 --> 00:07:18,280 or there's encrypted files on here. How do we go about breaking these? When you get into 115 00:07:18,280 --> 00:07:19,520 that situation there, you're really limited by the number of guesses you can make before 116 00:07:19,520 --> 00:07:22,300 the system locks you out. You're really only limited by the amount of time you can spend 117 00:07:22,300 --> 00:07:25,580 trying to crack these passwords, and the amount of computing power you can throw at the problem. 118 00:07:28,980 --> 00:07:32,900 I'll be talking about password hashes a lot. It really just comes down to, hopefully, 119 00:07:33,040 --> 00:07:38,460 your computer, your bank, the website, doesn't store passwords in plain text, because then 120 00:07:38,460 --> 00:07:41,560 there's no need for password cracking. Someone breaks into the site, they see all the passwords, 121 00:07:41,660 --> 00:07:46,900 they're done, they can have a beer. Most sites go ahead and they store a password 122 00:07:46,900 --> 00:07:49,500 in a one-way cryptographic function. You just get massive amounts of passwords in there. 123 00:07:49,500 --> 00:07:56,660 You can't figure out what it is very easily. Let's say a user goes ahead and creates the 124 00:07:56,660 --> 00:08:01,680 password DEF CON. The computer will not save the word DEF CON on the computer, hopefully, 125 00:08:01,900 --> 00:08:07,100 in theory anyway. There's a couple talks about this later where it sometimes does. Instead, 126 00:08:07,340 --> 00:08:12,000 the computer will hash the password. The MD5 hash of DEF CON is that long string there. 127 00:08:13,100 --> 00:08:19,040 To log in, though, it stores that hash instead of the actual password. When you log in, you 128 00:08:19,040 --> 00:08:24,220 type DEF CON in again. The computer hashes that password, and it compares it to what 129 00:08:24,220 --> 00:08:27,920 it has stored on the computer. If those two hashes match, it goes ahead and logs you in. 130 00:08:29,200 --> 00:08:33,700 Cracking passwords is very similar. You just make a whole lot more guesses. You make a 131 00:08:33,700 --> 00:08:37,540 guess, you hash a guess, you compare it to the hash that's on your hard drive, and if 132 00:08:37,540 --> 00:08:41,760 those two hashes match, you've cracked the password. Really, the question is, how do 133 00:08:41,760 --> 00:08:48,000 you go ahead making those guesses intelligently? Hashing those guesses takes a lot of time sometimes. 134 00:08:51,100 --> 00:08:54,900 There are really two main ways that you go about trying to crack a password. The first 135 00:08:54,900 --> 00:08:58,680 one, which we're going to be spending most of our time on, is a dictionary attack. You 136 00:08:58,680 --> 00:09:02,600 take words from an input dictionary that contain words that you think someone might want to 137 00:09:02,600 --> 00:09:06,060 use to create their password, and then you mangle it in a way that people normally do 138 00:09:06,060 --> 00:09:10,300 when they create passwords. In your input dictionary, you might have a password, and 139 00:09:10,300 --> 00:09:14,200 you try that. If that doesn't work, you try password 11, or capitalize P and replace 140 00:09:14,200 --> 00:09:17,240 the A. This is what people normally think about when you talk about password cracking. 141 00:09:20,400 --> 00:09:24,820 When we crack these lists here, we hit what we call a brick wall after a certain point. 142 00:09:26,340 --> 00:09:30,340 Initially, when we start cracking passwords, we're doing really well, because we're cracking 143 00:09:30,340 --> 00:09:35,960 lists of a couple thousand passwords. Initially, we'll crack a couple hundred, and then we'll 144 00:09:35,960 --> 00:09:40,320 go down to cracking maybe 10 an hour, and then maybe one an hour, and then one a day. 145 00:09:40,660 --> 00:09:43,760 Then, pretty soon, we're to the point where we're cracking maybe one a week, and we're 146 00:09:43,760 --> 00:09:48,160 like, why are we doing this? We've got to move on to the next list there. 147 00:09:49,040 --> 00:09:53,420 We call that the brick wall, because you go a long, long period of time. It's like hitting 148 00:09:53,420 --> 00:09:56,140 a brick wall where you're not cracking any passwords, and it seems like you're just spinning 149 00:09:56,140 --> 00:09:59,720 your wheels. When you're doing a dictionary-based attack, 150 00:10:00,160 --> 00:10:04,440 it's really frustrating, because you've got to figure out why you're not cracking those 151 00:10:04,440 --> 00:10:08,560 passwords. You don't know until you actually crack the password why it was. You could not 152 00:10:08,560 --> 00:10:11,600 be just trying to write dictionary words. Your dictionary could be poor. It doesn't 153 00:10:11,600 --> 00:10:13,900 have the word in it. It doesn't have DEF CON in it, so you're not trying that. 154 00:10:14,660 --> 00:10:18,280 Or, you might not be trying to write word-mangling rule. The person might have capitalized the 155 00:10:18,280 --> 00:10:21,740 first letter, replaced A with an at symbol, and added 11 to the end of it. You're just 156 00:10:21,740 --> 00:10:25,500 not trying that as your word-mangling rules. It's really hard to figure out, when you're 157 00:10:25,500 --> 00:10:29,600 trying to crack these passwords, do I try more dictionaries? Do I start with more dictionary 158 00:10:29,600 --> 00:10:33,860 words at the problem? Or do I try more advanced word-mangling rules on the dictionaries I'm 159 00:10:33,860 --> 00:10:37,900 currently using? This is a real trade-off, because you're always limited by the amount 160 00:10:37,900 --> 00:10:42,180 of time, the amount of guesses that you can make. The bigger your dictionary, the less 161 00:10:42,180 --> 00:10:47,340 word-mangling rules you can apply to that dictionary. And vice versa, the more word-mangling 162 00:10:47,340 --> 00:10:48,260 rules you do, the less word-mangling rules you can apply to that dictionary. 163 00:10:48,260 --> 00:10:51,500 The smaller dictionary that you have to do to apply to those word-manglings, too. So it's 164 00:10:51,500 --> 00:10:52,180 a real trade-off. 165 00:10:55,380 --> 00:10:58,360 And then there's brute force, where you just kind of go through it. We're just going to 166 00:10:58,360 --> 00:11:03,640 go try every single possible combination. And don't let anyone tell you anything differently. 167 00:11:03,760 --> 00:11:08,360 Brute force is wonderful. I love brute force if you can do it. The problem is this is password 168 00:11:08,360 --> 00:11:13,320 cracking on a budget, and generally brute force is not an option for longer passwords. But 169 00:11:13,320 --> 00:11:17,020 if there's no password creation policy, it still helps you get a lot of passwords that 170 00:11:17,020 --> 00:11:20,260 you normally wouldn't get with a dictionary-based attack. 171 00:11:20,820 --> 00:11:26,080 So here's some examples of some real passwords that crack with brute force, like VPTP. That's 172 00:11:26,080 --> 00:11:28,660 not going to be in my dictionary. It's not a real dictionary word. I have no idea how 173 00:11:28,660 --> 00:11:31,640 they picked it. But since it's really short, it's easy to crack with brute force. 174 00:11:32,660 --> 00:11:39,780 Another one, WFX8ZJ. Once again, I'm not going to crack it with a dictionary-based 175 00:11:39,780 --> 00:11:44,040 attack. And luckily, they didn't make it one more character longer, because if they did, 176 00:11:44,100 --> 00:11:46,560 I wouldn't be able to crack it with brute force. But since it was only six characters 177 00:11:46,560 --> 00:11:48,000 long, I was able to crack it. 178 00:11:49,260 --> 00:11:53,740 00K00. So that's kind of just something that they can remember. Once again, it's very resistant 179 00:11:53,740 --> 00:11:54,440 to dictionary attacks. 180 00:11:55,000 --> 00:12:00,120 And the final one that kind of just annoys me is Wii, for Nintendo Wii, I think. And 181 00:12:00,120 --> 00:12:06,820 this just kind of points out that dictionaries are only good when they were made. So most 182 00:12:06,820 --> 00:12:12,380 dictionaries are fairly old. If someone's favorite band is MC Hammer, you're golden. 183 00:12:13,220 --> 00:12:16,540 But if you like Linkin Park, even though they're old, too, you're probably not going to crack 184 00:12:16,560 --> 00:12:20,700 to find it. Anything recent, it's very hard to keep these dictionaries up to date. 185 00:12:24,680 --> 00:12:28,940 I want to run a few demos just so I can have stuff break in front of a couple hundred people. 186 00:12:30,400 --> 00:12:35,980 I guess the real question is, how good can I do if I just do the script kitty type thing? 187 00:12:36,160 --> 00:12:40,240 I go online, I download John the Ripper, I download a couple of these word lists, and 188 00:12:40,240 --> 00:12:44,600 just run them. That's an honest question. If you can do really well with that, then 189 00:12:44,600 --> 00:12:47,280 you can just walk out and go to a different talk. You don't have to listen to me talking 190 00:12:47,280 --> 00:12:51,580 here. If you'll excuse me, I'll be kind of lame and just copy and paste these commands 191 00:12:51,580 --> 00:12:57,080 so I don't fat finger them. What I'm going to do is I'm just going to go ahead and run 192 00:12:57,080 --> 00:13:05,060 John the Ripper with the default rule set. Also, we're going to go ahead and we're going 193 00:13:05,060 --> 00:13:10,320 to crack half the MySpace password list. A long time ago, one of the more famous disclosed 194 00:13:10,320 --> 00:13:14,480 password lists was someone set up a phishing site at MySpace and managed to grab about six 195 00:13:14,480 --> 00:13:23,740 60,000 MySpace usernames and passwords. We feel that these passwords are very representative 196 00:13:23,740 --> 00:13:27,760 of what normal people would do when they create a password if there's no strong password creation 197 00:13:27,760 --> 00:13:33,480 policy. Also, just so you know, we split these password lists up into two different 198 00:13:33,480 --> 00:13:39,220 parts whenever we get a plain text password list, mainly because it's really easy to create 199 00:13:39,220 --> 00:13:42,860 password cracking rules if you know all the passwords beforehand. This way, we'll have 200 00:13:42,860 --> 00:13:44,260 a training set and a test set. 201 00:13:44,260 --> 00:13:47,780 We don't look at the test set at all, but we do look at the training set to try to figure 202 00:13:47,780 --> 00:13:50,360 out how people create passwords. Then we go ahead and try to make our rules and crack 203 00:13:50,360 --> 00:13:54,520 the test set. If the passwords are hashed when we grab them, the whole thing is a test 204 00:13:54,520 --> 00:13:58,480 set because you have to break them in the first place. Also, just so you know, these 205 00:13:58,480 --> 00:14:01,920 passwords are not hashed. I'm just outputting them to the standard out and just seeing how 206 00:14:01,920 --> 00:14:06,080 many of them we cracked with John the Ripper's rule set. The reason for that is that this 207 00:14:06,080 --> 00:14:09,180 is a 50-minute talk and it would be really boring just to watch his crunch numbers here. 208 00:14:09,480 --> 00:14:14,240 If this was hashed with, let's say, MD5, this test here would have just taken about an hour. So, I'm going to go ahead and do that. 209 00:14:14,240 --> 00:14:16,340 At the very end of the talk, we could have looked at it and it would have been pretty boring. 210 00:14:17,040 --> 00:14:22,900 If this has been hashed with a stronger hash like Linux's or Unix's Crip5, which does 211 00:14:22,900 --> 00:14:27,940 a thousand MD5 hashes, we'd have to definitely extend this talk time a little bit for this. 212 00:14:28,740 --> 00:14:33,640 Just to give you an idea, an hour if this was hashed with a very basic hash, a thousand 213 00:14:33,640 --> 00:14:36,700 hours run this test here if this was a stronger hash. 214 00:14:39,060 --> 00:14:43,720 We used just a basic words.english.text dictionary, which is one that you find in all the different 215 00:14:43,720 --> 00:14:44,220 password crash tests. This is no longer the case anymore. If you're running a script 216 00:14:44,220 --> 00:14:50,720 hacking websites. And it ran there, and then we managed to crack 3.2% of all the passwords 217 00:14:50,720 --> 00:14:54,720 there. So yeah, I mean, if you're only trying to crack one or two, that'd be great. But 218 00:14:54,720 --> 00:14:59,180 if you want to tell your boss, hey, you know, we were setting up a forensic shop here, and 219 00:14:59,180 --> 00:15:03,480 we have a 3.2% chance of cracking these passwords, that's probably not going to cut it very well. 220 00:15:05,320 --> 00:15:10,260 So the next question is, could we just be using the bad word list here? Actually, you 221 00:15:10,260 --> 00:15:15,660 always hear about people always using the same common passwords. So why don't we go 222 00:15:15,660 --> 00:15:20,080 ahead and use a word list of just common passwords? And this, once again, is just downloaded 223 00:15:20,080 --> 00:15:27,180 offline here. It's like 816 most common passwords. Ran really quick, only 41,000 guesses versus 224 00:15:27,180 --> 00:15:32,960 the 10 million guesses from the previous one. And we cracked 1.71% of the passwords. So 225 00:15:32,960 --> 00:15:38,580 once again, I mean, that's actually pretty nice. It's very few guesses, but still, you're 226 00:15:38,580 --> 00:15:40,160 not even cracking double digits. 227 00:15:43,900 --> 00:15:48,460 So let's go ahead and use a bigger dictionary. And this dictionary's description is, the 228 00:15:48,460 --> 00:15:57,160 big dictionary. It's dic0294. And this is going to actually take a couple seconds here. 229 00:15:57,300 --> 00:16:01,360 And this is actually, just so you know, one of the few good big dictionaries that I've 230 00:16:01,360 --> 00:16:04,880 had experiences with. And I'll complain about big dictionaries a little bit more later. 231 00:16:11,560 --> 00:16:21,300 But hopefully I'll do it in a minute here. Oh there we go. And finally we're cracking 232 00:16:21,300 --> 00:16:26,840 double digits. Okay. So I mean it, but it took much longer there. It took 37 million 233 00:16:26,840 --> 00:16:30,620 guesses. But we did manage to crack 19% of the passwords. So this is actually starting 234 00:16:30,620 --> 00:16:34,740 to get a little bit semi respectable here. And finally we're going to talk a little bit 235 00:16:34,740 --> 00:16:38,960 about custom dictionaries in a little bit here so i might as well go ahead and uh try one of these 236 00:16:38,960 --> 00:16:44,500 here real quick just to show you so this is a custom dictionary it's actually based off of 237 00:16:44,500 --> 00:16:49,160 wiktionary and wiktionary is a sister project to wikipedia it's an open source dictionary 238 00:16:49,600 --> 00:16:52,920 and they actually provide them in a whole bunch of different languages which is really nice 239 00:16:54,260 --> 00:16:58,100 so this is actually we're running it off the english dictionary off of wikipedia that we 240 00:16:58,100 --> 00:17:03,660 did and this generated much less guesses than a big dictionary um it's this only generated about 241 00:17:03,660 --> 00:17:07,760 three million guesses compared to the you know 31 million guesses of the big dictionary here so 242 00:17:07,760 --> 00:17:14,740 about 10 but we still managed to crack 12 of the passwords so um using custom dictionaries can 243 00:17:14,740 --> 00:17:20,380 definitely help you especially if the hash is really strong cool nothing blew up okay 244 00:17:26,580 --> 00:17:29,660 and just in case that wouldn't work there so you can just see a graphical representations 245 00:17:29,660 --> 00:17:33,260 that's the top ones a number of guesses and the bottom ones number of passwords cracked there 246 00:17:33,260 --> 00:17:33,640 so 247 00:17:33,640 --> 00:17:36,340 so you can see uh uh just how well they did there 248 00:17:39,300 --> 00:17:43,040 so the first thing i guess we should talk about though is word lists you know how important is 249 00:17:43,040 --> 00:17:47,440 a word list to um your password cracking as you can see from that previous demo it actually is 250 00:17:47,440 --> 00:17:52,020 extremely important unfortunately it's also boring as hell um i'll freely admit that if 251 00:17:52,020 --> 00:17:56,480 you're not doing password cracking currently or you don't enjoy you know organizing your sock 252 00:17:56,480 --> 00:17:59,980 drawer this is probably not going to be the most interesting thing in the world um there's probably 253 00:17:59,980 --> 00:18:03,480 actually a big overlap between password crackers and people who do like organizing a sock drawer 254 00:18:03,640 --> 00:18:07,040 actually uh but so we'll but i'll just hit the high points and once again if you want to meet 255 00:18:07,040 --> 00:18:12,600 afterwards and like that we can geek out about word lists so there's a lot of places to find 256 00:18:12,600 --> 00:18:17,120 word lists online in fact most of them have the exact same word list so they all steal from each 257 00:18:17,120 --> 00:18:20,960 other and try to talk about them being the ultimate word list site um the first one i really 258 00:18:20,960 --> 00:18:26,420 want to point out is uh the open wall.com ftp site is for uh john the ripper uh if you go to 259 00:18:26,420 --> 00:18:30,380 their website normally they don't really advertise all their word lists because they want you to 260 00:18:30,380 --> 00:18:33,620 spend money and buy their uh actual uh big word list which i don't blame them i like to spend money on them 261 00:18:33,640 --> 00:18:38,180 i love capitalism uh but if you go to their ftp site you can download a bunch of word lists from 262 00:18:38,180 --> 00:18:44,760 them the other two sites below that are just kind of general uh you know uh word list sites uh one 263 00:18:44,760 --> 00:18:47,600 site that's kind of want to make fun of a little bit uh please don't hack me if you're in this 264 00:18:47,600 --> 00:18:54,740 audience is uh the argon.com and they have the ultimate gigantic word list uh they say it's uh 265 00:18:54,740 --> 00:18:59,560 two gigabytes large and everyone says oh it's gotta be good it's two gigabytes of words and 266 00:18:59,560 --> 00:19:03,480 that actually has to be one of the worst word lists i've ever played with um first of all so 267 00:19:03,480 --> 00:19:07,780 large you can't do any word mangling rules on it it takes forever to run and it there's just so much 268 00:19:07,780 --> 00:19:12,220 duplicate so much junk in it that it really doesn't crack passwords very well um about the 269 00:19:12,220 --> 00:19:16,480 only password i managed to crack was that that impressed me when i just ran it one time is one 270 00:19:16,480 --> 00:19:21,040 guy decided for his password to use an html markup tag which i have to admit you know is a really 271 00:19:21,040 --> 00:19:24,700 good password because there's all the symbols uppercase lowercase and all that um and i wonder 272 00:19:24,700 --> 00:19:29,880 what he does for a living uh but that was just um in one of the web pages they sucked down he had 273 00:19:29,880 --> 00:19:32,320 the exact same html markup tag so i was able to crack that 274 00:19:33,560 --> 00:19:37,860 um the last site i just want to point out if you get i'll go on bit torrent you can find it is an 275 00:19:37,860 --> 00:19:43,180 exploits master password collection it has a ton of different word list on it but it also has uh 276 00:19:43,180 --> 00:19:47,200 what look like passwords on that too i don't know if they actually are passwords or not which is 277 00:19:47,200 --> 00:19:51,780 why i can talk about it uh but uh it's really good if you're just starting to try to do your 278 00:19:51,780 --> 00:19:56,420 own password cracking research you can go ahead go log on to that and uh try your tools against 279 00:19:56,420 --> 00:20:01,120 the the things on that as well and they don't have email addresses on it or anything else like 280 00:20:01,120 --> 00:20:02,380 that so i don't feel bad about this 281 00:20:03,640 --> 00:20:10,880 because just random passwords so with these word lists here um there's a lot of stuff that you need 282 00:20:10,880 --> 00:20:14,760 to be really kind of anal retentive when you're uh dealing with them in order to really help you out 283 00:20:14,760 --> 00:20:20,620 later and every single time i try to cut corners with this i've gone seriously burned uh but just 284 00:20:20,620 --> 00:20:23,700 things you need to think about was you know when you're managing your word list are you know you 285 00:20:23,700 --> 00:20:27,260 want to avoid duplicate words it seems pretty simple but uh it's actually a pain in the butt 286 00:20:27,260 --> 00:20:30,520 sometimes especially when you have multiple word lists that you're trying and you can't remember 287 00:20:30,520 --> 00:20:33,460 which one you did previously and stuff like that uh but you can't really do that because you're 288 00:20:34,180 --> 00:20:36,880 duplicating words equals wasted work because you already tried those guesses before 289 00:20:37,580 --> 00:20:41,880 you also got to ask yourself how are those words terminated are they terminated by a tab a space 290 00:20:41,880 --> 00:20:47,200 a new line a carriage return and that's really important uh most password crackers are fairly 291 00:20:47,200 --> 00:20:50,740 smart about uh dealing with that but if you're writing any custom scripts that can really bite 292 00:20:50,740 --> 00:20:57,260 you in the butt which i found out myself too standardized capitalization um how many artifacts 293 00:20:57,260 --> 00:21:02,480 are in the word list how many html tags are there you know how many time stamps and junk data just 294 00:21:03,480 --> 00:21:06,400 when you try to create the word list because you're not going to go ahead and copy paste all 295 00:21:06,400 --> 00:21:11,340 these word lists here and then finally is the word length's important and this is not really for you 296 00:21:11,340 --> 00:21:14,320 know the hash that you're doing because most password crackers are fairly smart about that 297 00:21:14,320 --> 00:21:18,600 uh but more along the lines if you want to do case mangling because if you have a really long 298 00:21:18,600 --> 00:21:22,720 word you want to try every single possible case mangling in that um you're going to spend all day 299 00:21:22,720 --> 00:21:26,800 on that one word just trying to case mangle it uh so you might want to terminate it if you're doing 300 00:21:26,800 --> 00:21:27,900 a serious case mangling 301 00:21:31,500 --> 00:21:33,340 now as i said the word list you find 302 00:21:33,480 --> 00:21:38,440 a line leave a lot to be desired so first thing you probably might want to do is if you're a 303 00:21:38,440 --> 00:21:41,920 forensics investigator you have the hard drive in front of you and it's you're trying to crack 304 00:21:41,920 --> 00:21:45,840 individual files on the hard drive is to try to find to see if you can find a password anywhere 305 00:21:45,840 --> 00:21:50,120 else on that hard drive and for that type of research i really want you to point you to david 306 00:21:50,120 --> 00:21:54,260 smith's georgetown university and he's doing some really good work and he's doing some really good 307 00:21:54,260 --> 00:22:00,480 uh tools for uh parsing that hard drive grabbing out potential passwords uh to try them 308 00:22:04,540 --> 00:22:08,640 next thing creating word lists by hand it's a pain but in some cases it can be really effective 309 00:22:08,640 --> 00:22:12,640 uh probably the best success i've had is uh swear words in different foreign languages 310 00:22:12,640 --> 00:22:16,480 because people using swear words in their password is pretty much an international type saying 311 00:22:16,480 --> 00:22:20,760 uh so i've gone to a bunch of different sites you know swear words finnish swear words german 312 00:22:20,760 --> 00:22:25,380 and stuff like that uh led me to some interesting sites too uh but just creating those custom word 313 00:22:25,380 --> 00:22:30,860 lists there um really work quite well now if you want to go ahead and script this on your backtrack 314 00:22:33,480 --> 00:22:37,840 uh that you can use as well uh that works a lot better than wget because it'll actually parse out 315 00:22:37,840 --> 00:22:41,360 some of the junk as well it's not perfect but you know it's better than you know doing it by hand 316 00:22:41,360 --> 00:22:48,640 sometimes especially if you're grabbing lots of different uh word lists now we created some 317 00:22:48,640 --> 00:22:54,220 custom word list uh generation as well um as i mentioned earlier wiktionary uh a lot of the 318 00:22:54,220 --> 00:22:57,960 foreign language word lists were really really really poor they didn't have much in them the 319 00:22:57,960 --> 00:23:02,940 some of the characters were messed up in it and so on uh so i i wanted to go ahead and create the 320 00:23:02,940 --> 00:23:03,040 uh 321 00:23:03,480 --> 00:23:08,600 a password crack or crack passwords in foreign languages because um like finnish and swedish 322 00:23:08,600 --> 00:23:14,440 all those norwegians really seem to like disclosing passwords uh so i looked at wiktionary i was like 323 00:23:14,440 --> 00:23:19,820 i don't want to do that by hand uh so i created a program called uh you know wiki grabber that 324 00:23:19,820 --> 00:23:23,440 will go online you can specify you know what language you want uh it'll go ahead and download 325 00:23:23,440 --> 00:23:27,500 it you can and since we're doing some passphrase research as well you can actually specify that 326 00:23:27,500 --> 00:23:31,440 you want only grab nouns or only grab verbs or adverbs and it actually makes pretty good word 327 00:23:31,440 --> 00:23:31,700 lists 328 00:23:32,760 --> 00:23:33,160 um 329 00:23:33,480 --> 00:23:37,080 the next step of course we are thinking as well if we're already doing this for wiktionary why 330 00:23:37,080 --> 00:23:40,780 don't we create something for wikipedia so we can create customized word lists based upon someone's 331 00:23:40,780 --> 00:23:45,080 interest so you know if they're a hacker we might do you know hacking beer you know vodka 332 00:23:45,080 --> 00:23:52,540 and um you know vegas and just grab the wikipedia pages for that uh that's actually still needs quite 333 00:23:52,540 --> 00:23:57,040 a bit of work because i didn't realize it before i started working on this here uh but trying to 334 00:23:57,040 --> 00:24:01,280 find the right words on wikipedia is actually fairly difficult so if you do beer for example 335 00:24:01,280 --> 00:24:03,460 you'll find out a lot of information about you know the fermenting of the word list and the 336 00:24:03,480 --> 00:24:07,440 fermenting of beer the history of beer and so on but you're not going to actually find beer names like 337 00:24:07,440 --> 00:24:11,580 amstel light or boddington's for that you'd actually have to go to the individual country's 338 00:24:11,580 --> 00:24:15,840 beer list and that's actually not linked off the main web page for beer there so trying to find 339 00:24:15,840 --> 00:24:18,760 that it's still hard there's still a lot of work to be done to make that a little bit easier but 340 00:24:18,760 --> 00:24:26,660 that's also on the cd and on our website now the next thing we saw was we got a whole bunch of 341 00:24:26,660 --> 00:24:31,420 cracked passwords already if someone used a word in their password before the chances of someone 342 00:24:31,420 --> 00:24:32,760 else using that word are very high 343 00:24:33,480 --> 00:24:37,580 so we wanted to go ahead and parse our cracked password lists and try to make you know customized 344 00:24:37,580 --> 00:24:43,580 dictionaries to crack more passwords and that actually works extremely well so the first thing 345 00:24:43,580 --> 00:24:47,400 we did was uh we went ahead and extracted you know the alpha characters from a password 346 00:24:48,520 --> 00:24:52,700 so um and you use that as a word and you can make certain like judges there so if you have 347 00:24:52,700 --> 00:24:56,300 you know an at symbol between two letters that was probably you can probably change that to an a 348 00:24:56,300 --> 00:25:03,040 and so on you strip out special characters and so on uh and that as i said uh we've had extremely 349 00:25:03,480 --> 00:25:09,080 success with that but uh we were a little bit worried that we're just missing words uh there's 350 00:25:09,080 --> 00:25:13,540 mangling rules there that we don't know about because we're dealing with you know tens of 351 00:25:13,540 --> 00:25:17,220 thousands of password lists you're not going to look at each one individually so we wanted to go 352 00:25:17,220 --> 00:25:22,060 ahead and just try to see if we can uh parse out the low-hanging fruit and look at the remaining 353 00:25:22,060 --> 00:25:27,500 ones and try to figure out how they were created and to do that we went ahead and decided uh use 354 00:25:27,500 --> 00:25:33,100 edit distance of uh passwords so you're all probably actually familiar with edit distance if 355 00:25:33,480 --> 00:25:37,300 even if you haven't really uh dealt with uh that term because uh it's using all the different spell 356 00:25:37,300 --> 00:25:42,820 checkers out there so you know you type death or test instead of uh it realizes you know okay you 357 00:25:42,820 --> 00:25:47,760 know you might you switch to h and e because that's a very close word there well we thought 358 00:25:47,760 --> 00:25:51,020 why can't we go ahead and use that with uh passwords as well with analyzing these 359 00:25:53,800 --> 00:25:59,060 so in a normal add distance you have rules like delete swap transpose and insert so change apple 360 00:25:59,060 --> 00:26:02,900 to apply it would have an add distance of one because you only need to change the e to a y 361 00:26:03,480 --> 00:26:06,540 and then you can match the words based upon whoever has the closest edit distance 362 00:26:06,540 --> 00:26:12,240 we decided to add a few more rules to it to simulate how people create passwords 363 00:26:12,780 --> 00:26:16,600 so for example adding numbers to the end of a password is one edit 364 00:26:16,600 --> 00:26:19,640 so the apple 99 to apple would be having a distance of one 365 00:26:23,000 --> 00:26:26,580 and this actually worked really well it had some minuses and pluses 366 00:26:27,120 --> 00:26:32,680 but i'm pretty happy with it actually it does produce false negatives sometimes they'll say 367 00:26:33,480 --> 00:26:36,520 everything in reverse so it does it does the job 368 00:26:36,520 --> 00:26:39,340 even federally捷� 369 00:26:46,220 --> 00:27:03,460 it's using a dropbox but on an mise di prey account so it's started off from a standalone 370 00:27:03,460 --> 00:27:05,820 That was kind of a bad thing, so we're trying to do 371 00:27:05,820 --> 00:27:07,680 like best of breed, so we feed a bunch 372 00:27:07,680 --> 00:27:08,980 of different dictionaries and try to create 373 00:27:08,980 --> 00:27:11,720 one good dictionary that's really headed towards it. 374 00:27:13,020 --> 00:27:15,500 But what we found out later was that it's actually 375 00:27:15,980 --> 00:27:18,480 extremely good, though, for evaluating dictionaries. 376 00:27:19,420 --> 00:27:20,540 Because it's nice to be able to say 377 00:27:20,540 --> 00:27:21,800 this dictionary sucks or blows. 378 00:27:22,380 --> 00:27:24,400 It's much nicer in an academic setting to be able to say 379 00:27:24,400 --> 00:27:25,820 this dictionary sucks and blows because. 380 00:27:27,000 --> 00:27:28,980 So this actually helps us out quite a bit. 381 00:27:29,380 --> 00:27:31,680 And also it goes back to, remember when I was talking 382 00:27:31,680 --> 00:27:34,540 about hitting the brick wall, whether the problem is 383 00:27:34,540 --> 00:27:36,980 you're not trying to write enough words in your word list 384 00:27:36,980 --> 00:27:39,500 or whether you should try more word mangling rules? 385 00:27:40,000 --> 00:27:42,740 This actually gives us an idea of what is the theoretical 386 00:27:42,740 --> 00:27:44,860 maximum number of passwords we could crack 387 00:27:44,860 --> 00:27:46,180 with this word list here. 388 00:27:48,440 --> 00:27:51,560 And so if we try every single word mangling rule 389 00:27:51,560 --> 00:27:54,080 we can think of to crack this password list here 390 00:27:54,080 --> 00:27:56,440 with this dictionary, we're only gonna crack this many. 391 00:27:56,760 --> 00:27:58,680 So like the really big dictionary will crack 392 00:27:58,680 --> 00:28:01,480 about 50% of the passwords if you try every single 393 00:28:01,480 --> 00:28:01,660 word list. 394 00:28:01,660 --> 00:28:02,720 This is the only word mangling rule you can think of. 395 00:28:02,840 --> 00:28:04,140 So that's kind of the top bar there. 396 00:28:05,220 --> 00:28:08,040 The words.english dictionary can crack only 10% of them. 397 00:28:08,300 --> 00:28:10,920 Even though it has 200,000 words in it. 398 00:28:11,040 --> 00:28:12,740 So that's why we can say this one is not very good. 399 00:28:14,080 --> 00:28:16,580 Common password one, you can crack about 5.3% 400 00:28:16,580 --> 00:28:18,940 of all passwords, just with 816 words. 401 00:28:19,740 --> 00:28:22,840 And the Wiktionary one you can crack 32% with 68,000 words. 402 00:28:23,700 --> 00:28:26,720 And really the reason why this is good is when you, 403 00:28:26,740 --> 00:28:28,340 you're never gonna hit that limit really. 404 00:28:28,840 --> 00:28:31,380 Because there's always these crazy word mangling rules 405 00:28:31,380 --> 00:28:32,820 that you just don't have a chance to use. 406 00:28:33,380 --> 00:28:34,820 But when you start getting close to that, 407 00:28:34,940 --> 00:28:37,480 you can realize, okay, I probably cracked all the passwords 408 00:28:37,480 --> 00:28:40,040 I'm gonna crack with this dictionary here. 409 00:28:40,360 --> 00:28:42,660 Maybe I need to switch to another dictionary to try this. 410 00:28:42,760 --> 00:28:43,780 Or maybe go to brute force. 411 00:28:44,320 --> 00:28:46,760 So that really helps kind of eliminate the guessing 412 00:28:47,180 --> 00:28:49,500 on when you need to do, whether you need to add more words 413 00:28:49,500 --> 00:28:51,220 to the problem, or whether you need to add more 414 00:28:51,220 --> 00:28:52,200 word mangling rules. 415 00:28:56,700 --> 00:28:58,520 Okay, I'm actually gonna kick off the next demo here 416 00:28:58,520 --> 00:29:00,260 real quick, and then we'll come back to it later 417 00:29:00,260 --> 00:29:01,360 when I have a chance to explain it. 418 00:29:02,240 --> 00:29:03,940 So, hopefully it doesn't crash in the meantime. 419 00:29:11,980 --> 00:29:13,660 But this is actually gonna be our customized 420 00:29:15,380 --> 00:29:16,940 wordless, word mangling rule creator. 421 00:29:22,060 --> 00:29:22,420 Cool. 422 00:29:28,820 --> 00:29:30,240 So the next thing that we're gonna talk about 423 00:29:30,240 --> 00:29:31,240 is word mangling rules. 424 00:29:31,360 --> 00:29:33,220 So this is what everyone really thinks about 425 00:29:33,220 --> 00:29:36,000 with the password cracking, is how do you go ahead, 426 00:29:36,140 --> 00:29:37,700 how do you mangle these passwords here 427 00:29:37,700 --> 00:29:39,800 to recreate what a user's actually doing? 428 00:29:41,000 --> 00:29:43,820 And I have to say, the one thing that's really surprised me 429 00:29:43,820 --> 00:29:46,060 when I started doing this, is how limited 430 00:29:46,060 --> 00:29:48,420 most password crackers were when it comes 431 00:29:48,420 --> 00:29:49,220 to word mangling rules. 432 00:29:49,740 --> 00:29:52,080 And I think the reason for that is that Landman hashes, 433 00:29:52,100 --> 00:29:54,360 the old Windows hash, really spoiled us. 434 00:29:54,660 --> 00:29:56,740 Because old Landman hashes, they capitalized everything. 435 00:29:56,920 --> 00:29:58,600 So you don't have to worry about case mangling at all. 436 00:29:58,920 --> 00:30:00,680 And also, they're seven characters maximum, 437 00:30:00,680 --> 00:30:03,200 so it became pretty easy to brute force them after a while. 438 00:30:03,580 --> 00:30:06,940 So I think we kind of sat on our rear end there 439 00:30:06,940 --> 00:30:09,180 for quite a while with a lot of these password crackers. 440 00:30:09,360 --> 00:30:10,880 So it makes password crackers look really good 441 00:30:10,880 --> 00:30:12,000 when in fact they're not really doing 442 00:30:12,000 --> 00:30:12,840 that much advanced stuff. 443 00:30:16,940 --> 00:30:19,200 And one thing I found, I mean, it's very easy 444 00:30:19,200 --> 00:30:20,820 to crack passwords, or not easy, 445 00:30:21,000 --> 00:30:23,760 but it's fairly straightforward to crack passwords 446 00:30:23,760 --> 00:30:25,840 to have only one simple word mangling rule 447 00:30:25,840 --> 00:30:27,120 applied to them that everyone uses. 448 00:30:27,380 --> 00:30:30,460 So like 80% of, it's like 80-something percent of 449 00:30:30,460 --> 00:30:32,600 all people in these lists that we've been seeing here 450 00:30:32,600 --> 00:30:34,780 use two numbers at the very end of their password 451 00:30:36,080 --> 00:30:37,700 for when they create passwords. 452 00:30:39,240 --> 00:30:40,620 Or I think that's right. 453 00:30:40,740 --> 00:30:41,980 You might want to double check me on that one. 454 00:30:42,400 --> 00:30:43,220 That's why I love slides. 455 00:30:43,320 --> 00:30:43,900 I need to have the stuff. 456 00:30:44,120 --> 00:30:45,500 But a lot of them do, anyway. 457 00:30:47,920 --> 00:30:50,280 So that would be one great word mangling rule, really easy. 458 00:30:50,800 --> 00:30:52,800 But when you start combining word mangling rules, 459 00:30:53,000 --> 00:30:54,120 it gets actually very difficult. 460 00:30:54,900 --> 00:30:57,880 So this password here, password12, with a capital P, 461 00:30:58,020 --> 00:30:59,560 W, and an at symbol. 462 00:31:00,460 --> 00:31:02,320 That is an extremely strong password. 463 00:31:02,620 --> 00:31:04,380 I mean, passwords can be in every single person's input 464 00:31:04,380 --> 00:31:05,560 dictionary, so that's not a problem. 465 00:31:06,000 --> 00:31:08,380 But even though, doing that word mangling rule 466 00:31:08,380 --> 00:31:09,700 where you capitalize the first letter, 467 00:31:09,760 --> 00:31:12,740 you capitalize the fifth letter, you add two numbers to the end, 468 00:31:12,860 --> 00:31:14,560 and you change the A to an at symbol, 469 00:31:14,940 --> 00:31:16,300 putting all those word mangling rules together, 470 00:31:16,420 --> 00:31:17,840 it's very unlikely that you're actually 471 00:31:17,840 --> 00:31:19,220 going to go ahead and try to be able to crack 472 00:31:19,220 --> 00:31:20,020 that password there. 473 00:31:21,700 --> 00:31:23,420 So that's an extremely strong password, 474 00:31:23,500 --> 00:31:24,980 even though we can all see how easy it is to make. 475 00:31:25,700 --> 00:31:27,640 Also, if they use a non-standard rule, even 476 00:31:27,640 --> 00:31:30,140 one non-standard rule, the chances of you cracking it 477 00:31:30,140 --> 00:31:30,780 are very small. 478 00:31:31,440 --> 00:31:34,300 So like, password was just a 7 between the P and the A. 479 00:31:34,660 --> 00:31:36,720 Since not many people go ahead and use that as a word 480 00:31:36,720 --> 00:31:39,240 mangling rule, I'd be really surprised and kind of impressed 481 00:31:39,240 --> 00:31:41,200 if someone cracked that without resorting to brute force. 482 00:31:41,840 --> 00:31:44,480 The chances of it are very low, even though it seems 483 00:31:44,480 --> 00:31:45,580 like a really simple password. 484 00:31:46,060 --> 00:31:48,020 So if you're creating your password as a defender, 485 00:31:48,420 --> 00:31:50,460 I highly recommend just don't stick with the pack. 486 00:31:50,640 --> 00:31:51,940 Try something even a little bit different, 487 00:31:52,080 --> 00:31:54,180 and chances are, it'll make your password fairly secure. 488 00:31:57,360 --> 00:31:59,860 Now, one question I get when I talk to people 489 00:31:59,860 --> 00:32:03,200 here is, should I use Cain and Abel or John the Ripper? 490 00:32:03,300 --> 00:32:05,760 Because these are the two major free password crackers out there. 491 00:32:06,100 --> 00:32:08,260 And I love Cain and Abel, I have to say, 492 00:32:08,300 --> 00:32:09,580 because they put a lot of work into it. 493 00:32:09,620 --> 00:32:10,980 It integrates a lot of different things into it. 494 00:32:11,060 --> 00:32:12,820 You've got your art poisoning, your sniffing, 495 00:32:12,820 --> 00:32:13,400 and everything else. 496 00:32:13,620 --> 00:32:15,600 So it's a wonderful program, so I hate to trash it. 497 00:32:15,860 --> 00:32:17,900 But really, if you're cracking passwords seriously, 498 00:32:18,080 --> 00:32:19,500 you need to be using John the Ripper 499 00:32:19,500 --> 00:32:21,120 if it supports the hash that you're trying to crack. 500 00:32:22,400 --> 00:32:23,940 And the reason for that's pretty simple. 501 00:32:24,640 --> 00:32:27,680 Cain and Abel doesn't have very main word mangling rules at all. 502 00:32:27,980 --> 00:32:29,460 In fact, it's extremely trivial. 503 00:32:30,060 --> 00:32:32,380 It does adding two numbers to the end of a password 504 00:32:32,380 --> 00:32:33,400 and case mangling. 505 00:32:33,700 --> 00:32:35,000 And it doesn't even combine those. 506 00:32:35,520 --> 00:32:39,240 So if you have a password 1 with a capital P, 507 00:32:39,720 --> 00:32:41,440 Cain and Abel is not going to crack that, 508 00:32:41,540 --> 00:32:43,520 because it doesn't try capital letters and numbers 509 00:32:43,520 --> 00:32:44,240 at the same time. 510 00:32:44,820 --> 00:32:47,120 So Cain and Abel is fun to learn how to crack passwords on, 511 00:32:47,280 --> 00:32:48,660 but if you're cracking passwords seriously, 512 00:32:48,780 --> 00:32:49,800 you don't want to be using it. 513 00:32:53,180 --> 00:32:54,340 John the Ripper, on the other hand, 514 00:32:54,840 --> 00:32:56,400 is configured via a config file. 515 00:32:56,840 --> 00:32:58,560 So you can go ahead and you can get really crazy 516 00:32:58,560 --> 00:32:59,600 with all the different word mangling 517 00:32:59,600 --> 00:33:00,860 rules you can think of. 518 00:33:01,180 --> 00:33:04,800 And in fact, even if John the Ripper doesn't support 519 00:33:04,800 --> 00:33:06,440 whatever word mangling rule you want to use, 520 00:33:06,700 --> 00:33:08,340 you can always just create a custom script 521 00:33:08,340 --> 00:33:10,540 and pipe those guesses directly into John the Ripper 522 00:33:10,540 --> 00:33:12,840 since it's command line, which is really nice as well. 523 00:33:13,220 --> 00:33:15,240 So you can do pretty much any type of word mangling rule 524 00:33:15,240 --> 00:33:15,840 that you want to. 525 00:33:16,980 --> 00:33:19,180 Now, when you download John the Ripper, first of all, 526 00:33:19,620 --> 00:33:21,840 one thing a lot of people say is it doesn't support 527 00:33:21,840 --> 00:33:22,900 the type of hash that I need. 528 00:33:23,340 --> 00:33:25,700 And the answer to that is it probably does. 529 00:33:25,800 --> 00:33:26,920 Someone's written a patch for it. 530 00:33:27,320 --> 00:33:28,940 And so go ahead and find it. 531 00:33:28,940 --> 00:33:29,940 Download and install it. 532 00:33:30,020 --> 00:33:32,200 And it actually will support more hashes than KN-ABLE does. 533 00:33:32,520 --> 00:33:33,940 But you need to go ahead and find those patches. 534 00:33:34,300 --> 00:33:35,660 And actually, most of them are actually 535 00:33:35,660 --> 00:33:36,380 on the John the Ripper website. 536 00:33:37,980 --> 00:33:40,260 Also, I'd recommend against using the default John the 537 00:33:40,260 --> 00:33:41,080 Ripper config file. 538 00:33:41,440 --> 00:33:44,440 It's not actually bad, but you can do a lot better. 539 00:33:44,940 --> 00:33:46,680 Now, one thing that's kind of annoyed me, or it surprised 540 00:33:46,680 --> 00:33:48,680 me, is even though this is probably one of the most 541 00:33:48,680 --> 00:33:51,160 popular password crackers out there, I've yet to find 542 00:33:51,160 --> 00:33:53,040 somebody else's John the Ripper config file that they 543 00:33:53,040 --> 00:33:53,480 posted online. 544 00:33:54,240 --> 00:33:55,960 People just don't like sharing that information 545 00:33:55,960 --> 00:33:56,900 for whatever reason. 546 00:33:57,140 --> 00:33:58,640 So it's been kind of hard to tell what other 547 00:33:58,640 --> 00:33:59,280 people are doing. 548 00:33:59,980 --> 00:34:01,660 So I tried to solve that a little bit there. 549 00:34:01,820 --> 00:34:03,860 I included a couple of our sample John the Ripper config 550 00:34:03,860 --> 00:34:04,700 files on the CD. 551 00:34:05,200 --> 00:34:07,220 So that way, at least you can look at what we're doing 552 00:34:07,220 --> 00:34:09,060 and go, ah, noobs, you're doing it horribly. 553 00:34:09,660 --> 00:34:12,040 But at least now you have some examples of what some 554 00:34:12,040 --> 00:34:12,840 other people are doing. 555 00:34:14,280 --> 00:34:16,780 Also, the John the Ripper config file, it is kind of 556 00:34:16,780 --> 00:34:18,160 intimidating a little bit, and it's pain. 557 00:34:18,720 --> 00:34:20,940 And it surprises me, because I'll be talking to somebody who 558 00:34:20,940 --> 00:34:22,880 knows like three different scripting languages and a 559 00:34:22,880 --> 00:34:23,940 bunch of different programming languages. 560 00:34:24,320 --> 00:34:26,060 And they'll be like, oh, that John the Ripper config file, 561 00:34:26,180 --> 00:34:26,840 I can't figure that out. 562 00:34:26,920 --> 00:34:27,220 It's like, what? 563 00:34:27,300 --> 00:34:28,220 It's not that hard. 564 00:34:28,300 --> 00:34:28,480 But. 565 00:34:28,480 --> 00:34:30,120 But it just intimidates people a lot. 566 00:34:30,940 --> 00:34:33,300 But I mean, there's a rules.readme file there. 567 00:34:33,400 --> 00:34:34,500 I highly recommend reading it. 568 00:34:34,700 --> 00:34:37,320 I have it open all the time when I'm modifying it, 569 00:34:37,380 --> 00:34:38,280 because I forget how they do it. 570 00:34:39,680 --> 00:34:41,940 But I highly recommend, if you're going to be doing 571 00:34:41,940 --> 00:34:44,460 serious password cracking, you really need to take time to 572 00:34:44,460 --> 00:34:44,800 learn that. 573 00:34:46,260 --> 00:34:48,860 But because I'm kind of tired about everyone whining about 574 00:34:48,860 --> 00:34:51,220 that every single time I mention John the Ripper, I 575 00:34:51,220 --> 00:34:53,940 went ahead and I created a custom John the Ripper config 576 00:34:53,940 --> 00:34:54,580 file generator. 577 00:34:54,860 --> 00:34:56,640 It's menu driven, as long as you don't mind text. 578 00:34:58,580 --> 00:34:59,220 Oh, cool. 579 00:34:59,320 --> 00:34:59,500 Thanks. 580 00:35:04,120 --> 00:35:06,040 And it didn't make it to the CD. 581 00:35:06,180 --> 00:35:08,080 I'm sorry it's at the very bottom, the link to it. 582 00:35:09,280 --> 00:35:11,580 But once our main website will get up, it'll be on that. 583 00:35:11,720 --> 00:35:13,500 And it's on the download one right now at 584 00:35:14,520 --> 00:35:15,780 reusablesec.googlepages.com. 585 00:35:16,400 --> 00:35:18,380 I probably should have put that at the top there. 586 00:35:18,460 --> 00:35:18,680 I'm sorry. 587 00:35:20,620 --> 00:35:22,500 But not only would this allow you to go ahead and create 588 00:35:22,500 --> 00:35:25,180 custom config files and stuff like that, but I threw in a 589 00:35:25,180 --> 00:35:26,360 couple different things that I wanted. 590 00:35:26,360 --> 00:35:29,060 And you'll find it as well in this feature creed. 591 00:35:29,940 --> 00:35:33,260 First of all, you can save all of your settings that you have 592 00:35:33,260 --> 00:35:34,960 here so you don't have to retype them in every single time. 593 00:35:35,940 --> 00:35:41,540 You can go ahead and add specialized or password 594 00:35:41,540 --> 00:35:42,980 creation policies to this. 595 00:35:43,420 --> 00:35:45,840 So that way you don't have to modify all of your config rules 596 00:35:45,840 --> 00:35:47,800 every single time you want to try a different site. 597 00:35:48,140 --> 00:35:50,020 So you can specify, like, I want the password to be at 598 00:35:50,020 --> 00:35:52,620 least eight characters long, have two numbers, two special 599 00:35:52,620 --> 00:35:54,080 characters, and so on. 600 00:35:55,180 --> 00:35:56,340 Also, I've made it so it's very simple. 601 00:35:56,360 --> 00:35:58,340 It's very easy to change the character set as well that it 602 00:35:58,340 --> 00:35:58,620 uses. 603 00:35:59,180 --> 00:36:01,560 So that way you can switch between different languages as 604 00:36:01,560 --> 00:36:03,800 well, since it seems like all the password crackers out there 605 00:36:03,800 --> 00:36:05,600 focus on English, and I kind of want to share the love a 606 00:36:05,600 --> 00:36:06,080 little bit there. 607 00:36:06,920 --> 00:36:08,380 So that makes things a little bit easier. 608 00:36:12,040 --> 00:36:14,840 Now, as I said before, brute force is a wonderful, wonderful 609 00:36:14,840 --> 00:36:15,600 thing to use. 610 00:36:16,080 --> 00:36:19,000 But usually you don't have the option to brute force the entire 611 00:36:19,000 --> 00:36:19,460 key space. 612 00:36:20,260 --> 00:36:23,200 So there is kind of a halfway thing where it's called targeted 613 00:36:23,200 --> 00:36:26,920 brute force, where you try to brute force just the format of 614 00:36:26,920 --> 00:36:27,400 the passwords. 615 00:36:27,760 --> 00:36:30,600 So that way if your dictionary is poor, you can still maybe 616 00:36:30,600 --> 00:36:31,340 crack the password. 617 00:36:32,080 --> 00:36:34,660 For example, you might want to brute force six characters 618 00:36:34,660 --> 00:36:35,820 followed by two numbers. 619 00:36:36,420 --> 00:36:37,900 And that speeds things up a lot. 620 00:36:38,120 --> 00:36:44,160 So even though you're brute forcing characters and numbers, you're only trying characters 621 00:36:44,160 --> 00:36:45,540 in one spot and numbers in another spot. 622 00:36:45,700 --> 00:36:47,700 So it actually narrows down the key space quite a bit. 623 00:36:48,740 --> 00:36:50,480 Now, you can do that directly in John the Ripper. 624 00:36:50,980 --> 00:36:51,860 It's a bit of a hack. 625 00:36:51,860 --> 00:36:55,560 On the CD, there's some additional slides on how to do that, and I included a sample 626 00:36:55,560 --> 00:36:57,460 of brute force config file on the CD as well. 627 00:36:58,060 --> 00:37:01,380 But in reality, if you really want to get fancy with this, I highly recommend just 628 00:37:01,380 --> 00:37:04,220 writing a custom Perl script or something like that and piping it into John the Ripper. 629 00:37:04,560 --> 00:37:07,940 And that way you can get really fancy, too, and start adding Markov rules and things like 630 00:37:07,940 --> 00:37:09,760 that to really try to help speed up brute force. 631 00:37:15,140 --> 00:37:15,500 Cool. 632 00:37:15,620 --> 00:37:16,420 We're actually doing good on time. 633 00:37:16,800 --> 00:37:17,160 Okay. 634 00:37:18,520 --> 00:37:21,640 Now, with Ward-Mangling rules, though, we quickly found out 635 00:37:21,640 --> 00:37:26,940 that it really is a pain to specify them, because the first couple of Ward-Mangling 636 00:37:26,940 --> 00:37:27,900 rules are fairly easy. 637 00:37:28,860 --> 00:37:33,320 But as you get into more and more less probable Ward-Mangling rules, first of all, they take 638 00:37:33,320 --> 00:37:37,460 a long time to run, because if you add two numbers to the end of a word, you're trying 639 00:37:37,460 --> 00:37:38,020 100 guesses. 640 00:37:38,180 --> 00:37:41,940 If you try four numbers on the end of a word, you're trying 10,000 guesses per word in your 641 00:37:41,940 --> 00:37:42,500 input dictionary. 642 00:37:42,880 --> 00:37:47,040 So you want to kind of narrow it down quite a bit, and you end up creating a couple hundred 643 00:37:47,040 --> 00:37:50,220 different Ward-Mangling rules, and then editing and managing it is a real pain. 644 00:37:51,240 --> 00:37:51,620 All right. 645 00:37:51,640 --> 00:37:57,740 So this idea was actually Professor Sudhir's idea originally, and it actually really works 646 00:37:57,740 --> 00:37:58,400 out pretty well. 647 00:37:58,820 --> 00:38:03,480 And that's why we create computers, is why don't we have them go ahead and analyze password 648 00:38:03,480 --> 00:38:07,640 lists, try to figure out how passwords were created, and create custom Ward-Mangling rules 649 00:38:07,640 --> 00:38:08,520 based upon that. 650 00:38:09,420 --> 00:38:13,600 So the actual name of this is Probabilistic Context-Free Grammar Ward-Mangling Rules. 651 00:38:14,100 --> 00:38:15,980 So you can tell what we're writing a paper on right now. 652 00:38:16,940 --> 00:38:21,620 But really, in theory, all it does is it tries to figure out how passwords are created, and 653 00:38:21,620 --> 00:38:24,400 assigns a probability to that Ward-Mangling rule. 654 00:38:24,760 --> 00:38:29,160 And it also assigns probabilities to every single number, every single special character, 655 00:38:29,820 --> 00:38:32,780 capitalization, and everything else along those lines that it finds in the password 656 00:38:32,780 --> 00:38:33,040 list. 657 00:38:33,380 --> 00:38:38,400 So it'll say one is much more common to be used than seven, and 99 is much more common 658 00:38:38,400 --> 00:38:39,320 to be used than 11. 659 00:38:42,140 --> 00:38:46,180 And really what it does then is it tries to generate the most probable passwords first. 660 00:38:47,680 --> 00:38:51,280 So right now, we have a fairly basic one that's on CD here. 661 00:38:51,340 --> 00:38:51,600 We're going to create a pretty basic one. 662 00:38:51,620 --> 00:38:55,640 It's a way of figuring out what the Ward-Mangling rule is. 663 00:38:56,460 --> 00:39:01,300 So for password 11, it would say, uppercase the first letter, have seven lowercase letters, 664 00:39:01,440 --> 00:39:02,220 and then two numbers. 665 00:39:03,580 --> 00:39:05,360 And there's definitely stuff we're looking into adding. 666 00:39:06,400 --> 00:39:09,820 It's pretty easy to add on to this, replace the A with an at symbol and stuff like that 667 00:39:09,820 --> 00:39:10,180 as well. 668 00:39:13,340 --> 00:39:17,460 Well, what it does is that structure there has a probability. 669 00:39:17,860 --> 00:39:19,940 The structure of numbers has a probability. 670 00:39:20,400 --> 00:39:21,600 And you can actually even assign a probability. 671 00:39:21,600 --> 00:39:23,800 You can assign a probability to input dictionaries. 672 00:39:23,880 --> 00:39:28,360 So you can say, this is a really common password, so I want to try a lot of Ward-Mangling rules 673 00:39:28,360 --> 00:39:28,720 on this. 674 00:39:28,920 --> 00:39:32,660 But this is a much bigger input dictionary that I want to try eventually on some of the 675 00:39:32,660 --> 00:39:33,680 more common Ward-Mangling rules. 676 00:39:35,160 --> 00:39:38,100 And it'll go ahead and it'll spit out the guesses in order for you. 677 00:39:38,580 --> 00:39:43,580 So it might try password 12 and then password bang before it tries password 13. 678 00:39:44,080 --> 00:39:47,420 So that way, it really specifies all these different Ward-Mangling rules really well 679 00:39:47,420 --> 00:39:47,900 for us. 680 00:39:48,780 --> 00:39:49,180 All right. 681 00:39:49,880 --> 00:39:50,280 All right. 682 00:39:51,180 --> 00:39:51,580 All right. 683 00:39:51,600 --> 00:39:52,260 All right. 684 00:39:52,260 --> 00:39:52,360 So let's get started. 685 00:39:52,360 --> 00:39:55,800 Now, our current implementation makes guesses and outputs them to standard out. 686 00:39:56,160 --> 00:39:59,780 So that way, we can go ahead and pipe this into any other password cracking program so 687 00:39:59,780 --> 00:40:03,420 we don't have to worry about the hashes and keeping track of which passwords are managed 688 00:40:03,420 --> 00:40:04,000 and so on. 689 00:40:04,420 --> 00:40:06,480 Because I'm lazy and I don't want to have to code all that. 690 00:40:07,580 --> 00:40:11,500 So right now, in most of our tests, we actually go ahead and output them standard out and 691 00:40:11,500 --> 00:40:15,840 input them into John the Ripper and use John the Ripper just to go ahead and do all the 692 00:40:15,840 --> 00:40:17,000 password hashing. 693 00:40:18,060 --> 00:40:20,700 Now, I'll admit this structure does have some overhead. 694 00:40:20,820 --> 00:40:21,580 That's why I didn't just flip, flip and flip. 695 00:40:21,600 --> 00:40:25,940 run it immediately. But the overhead is actually fairly low compared to a strong hash, or even 696 00:40:25,940 --> 00:40:31,460 a semi-weak hash. We have used this actually successfully in real-life cases. This is not 697 00:40:31,460 --> 00:40:35,040 saying that you run for a couple days and it takes ten times as long or so. 698 00:40:38,640 --> 00:40:42,300 Because we have a graph, and I'll show you the results in a little bit, and I'll talk 699 00:40:42,300 --> 00:40:47,160 about this graph here afterwards if you want to, but this kind of shows the number of passwords 700 00:40:47,160 --> 00:40:54,700 we crack over time versus John the Ripper. Initially, during very high probability rules, 701 00:40:54,860 --> 00:40:58,600 we do pretty much the same. In some cases, John the Ripper does a little bit better. 702 00:40:59,600 --> 00:41:04,260 But after a certain point, ours starts to do much, much better. Unlike John the Ripper, 703 00:41:04,360 --> 00:41:07,600 where you have a set number of word-mangling rules and it's done, ours has just millions 704 00:41:07,600 --> 00:41:11,360 of word-mangling rules. They're very small, but they're still millions upon millions of 705 00:41:11,360 --> 00:41:15,020 word-mangling rules. If we let this run, it'll just keep on going and going and going, and 706 00:41:15,020 --> 00:41:17,060 we don't actually have to specify all these different word-mangling rules. 707 00:41:17,160 --> 00:41:23,300 Which is really nice. Now we get to check to see if anything crashed 708 00:41:23,300 --> 00:41:33,580 or not. Oh, cool, it looks like it actually worked here. First time for everything here, yep. 709 00:41:37,520 --> 00:41:43,240 Once again, we trained this one on the training set of the MySpace rule, and we're trying 710 00:41:43,240 --> 00:41:46,560 to crack the test set. If you want to see some graphs and stuff like this of us training 711 00:41:46,560 --> 00:41:50,640 it on different password lists and then trying to crack other password lists, talk to me 712 00:41:50,640 --> 00:41:53,540 in the after-talk room, and I got some graphs and stuff like that, because we've definitely 713 00:41:53,540 --> 00:41:58,960 looked at this too. But with John the Ripper, with the English word list, it cracked 3.2% 714 00:41:58,960 --> 00:42:05,700 of the words. With our password cracking thing, we cracked 5.6% of the words. With 715 00:42:05,700 --> 00:42:10,800 the common passwords, John the Ripper cracked 1.7%. Using the same number of guesses, we 716 00:42:10,800 --> 00:42:14,680 managed to crack 2.9%. So it's not perfect, but... 717 00:42:15,880 --> 00:42:22,280 And the Wikipedia English one. John the Ripper cracked 12%. We cracked 21%. So in most cases 718 00:42:22,280 --> 00:42:25,060 that we found here, it does much better than John the Ripper. 719 00:42:30,800 --> 00:42:35,720 That's pretty much it. Oh, yeah, here's just some graphs so you can see the number of passwords 720 00:42:35,720 --> 00:42:44,660 cracked there versus John the Ripper. Oh, I don't have it right now. So... 721 00:42:44,680 --> 00:42:51,900 slideshow. That would explain it. So that's it, though. If anyone has any questions, 722 00:42:52,200 --> 00:42:56,880 feel free to ask now or talk to me in the talk room here. That's my email address. As 723 00:42:56,880 --> 00:43:01,360 I said, please email me if you have any ideas or anything like that. If you have any password 724 00:43:01,360 --> 00:43:05,120 lists you want us to crack, as long as they're legal, I'll definitely take a look at those 725 00:43:05,120 --> 00:43:06,920 as well. And that's our web page.