1 00:00:00,000 --> 00:00:03,380 Please give it up for Jay Beal. He's going to take us through the next 50 minutes. 2 00:00:11,220 --> 00:00:14,180 Hey, everybody. I'll let you file in just a little bit. 3 00:00:15,020 --> 00:00:19,260 While I introduced my co-presenter, this is Justin Searle. 4 00:00:19,420 --> 00:00:24,840 He's our newest hire at Intel Guardians, and, well, he's a badass guy. 5 00:00:26,720 --> 00:00:31,500 So we'll talk a little bit more about him and his contributions to this talk, 6 00:00:31,540 --> 00:00:35,560 both positive and negative, because I'm going to blame things on him. 7 00:00:36,420 --> 00:00:38,060 Or at least that's what he thinks. 8 00:00:38,760 --> 00:00:40,700 So let's see. Here's what we're doing. 9 00:00:41,460 --> 00:00:46,060 I've been doing defensive programs for a long time, 10 00:00:46,120 --> 00:00:51,420 and somehow I've, well, spent about six or seven years now pen testing, 11 00:00:51,560 --> 00:00:54,640 and now and then we end up creating some tools. 12 00:00:54,840 --> 00:00:56,240 So I'm releasing one. 13 00:00:57,680 --> 00:00:59,340 And you're going to be able to find this. 14 00:00:59,500 --> 00:01:01,380 I've got a URL at the end of the slide. 15 00:01:01,460 --> 00:01:06,680 You're going to be able to find this off on Intel Guardians' site later this weekend when I get the bugs out. 16 00:01:07,820 --> 00:01:09,960 So, but I'll tell you all about it right now. 17 00:01:10,120 --> 00:01:13,520 So basically, the tool is called the Midler. 18 00:01:14,640 --> 00:01:16,760 We tried and went through all kinds of names. 19 00:01:17,440 --> 00:01:18,280 What's that? 20 00:01:19,500 --> 00:01:21,060 Oh, iPriest, don't hurt me. 21 00:01:22,860 --> 00:01:24,160 I'm a very nice man. 22 00:01:24,840 --> 00:01:29,320 He is a very nice man who's got a weight ratio of three to one on me. 23 00:01:31,120 --> 00:01:32,920 And I'm telling you it's all muscle. 24 00:01:40,340 --> 00:01:41,700 That's great. Fill it up. 25 00:01:42,180 --> 00:01:46,580 Okay, so I'm just going to get a little bit of a slow start and let a couple more people in. 26 00:01:47,320 --> 00:01:48,660 But basically, here's what we're doing. 27 00:01:48,840 --> 00:01:54,140 So we're going to talk a little bit about, in general, an attack vector shared networks. 28 00:01:54,840 --> 00:01:57,380 Because we're all on a lot more shared networks than we ever were before, 29 00:01:57,460 --> 00:01:59,340 and we probably don't think about it quite as much. 30 00:02:01,560 --> 00:02:02,440 So we'll... 31 00:02:03,820 --> 00:02:04,920 Come on in. 32 00:02:06,460 --> 00:02:09,040 Okay, so for those of you watching on video, 33 00:02:09,140 --> 00:02:10,640 there are a lot of people in the hall, 34 00:02:10,760 --> 00:02:13,400 and we're finding ways to stack them around the room. 35 00:02:13,820 --> 00:02:14,260 And... 36 00:02:16,820 --> 00:02:21,240 Yeah, I'm not pissed. 37 00:02:21,980 --> 00:02:22,540 Woo-hoo! 38 00:02:30,400 --> 00:02:32,100 Yeah, I think that... 39 00:02:32,100 --> 00:02:35,340 I think the goons actually deserve quite another round of applause here. 40 00:02:35,540 --> 00:02:36,520 Go, goons! 41 00:02:37,580 --> 00:02:38,160 Woo-hoo! 42 00:02:46,300 --> 00:02:47,460 Yeah, that's not good. 43 00:02:53,040 --> 00:02:54,380 I'm trying to get a run. 44 00:02:56,000 --> 00:02:56,680 Come on in. 45 00:02:56,680 --> 00:02:56,960 You're welcome. 46 00:03:04,940 --> 00:03:06,020 I'm sorry. 47 00:03:06,160 --> 00:03:06,840 I'm sorry. 48 00:03:07,960 --> 00:03:08,640 I'm sorry. 49 00:03:08,780 --> 00:03:08,980 I'm sorry. 50 00:03:12,420 --> 00:03:13,100 I'm sorry. 51 00:03:24,840 --> 00:03:29,080 I think it's really, really important because, gosh, if anything bad happens in this room, 52 00:03:29,200 --> 00:03:31,500 I'm about one of the last people that's going to be able to get out. 53 00:03:31,940 --> 00:03:37,700 So I want to reiterate that you can't block doors. 54 00:03:37,940 --> 00:03:39,640 You absolutely cannot block doors. 55 00:03:39,880 --> 00:03:41,080 It's not good to block doors. 56 00:03:41,220 --> 00:03:42,180 That is how people die. 57 00:03:42,380 --> 00:03:44,680 And I do not mean the people that you block from getting out. 58 00:03:44,780 --> 00:03:49,300 I mean you as you get trampled really, really badly, really badly. 59 00:03:49,400 --> 00:03:50,240 It's no, no, no fun. 60 00:03:50,400 --> 00:03:51,480 So first, don't block doors. 61 00:03:51,480 --> 00:03:55,520 Second, keep a clear aisle for some definition of aisle. 62 00:03:55,700 --> 00:03:59,440 That means goons should be able to run down, and they may just do it as like a test. 63 00:03:59,740 --> 00:04:02,460 And, again, the goons are called goons for a reason. 64 00:04:02,580 --> 00:04:04,520 So don't block the aisles either. 65 00:04:06,400 --> 00:04:06,980 Okay, wow. 66 00:04:07,180 --> 00:04:08,380 This is really a lot of fun. 67 00:04:08,480 --> 00:04:12,260 I'm already having fun with this, and I haven't even gotten to the table of contents. 68 00:04:12,700 --> 00:04:13,100 Rock. 69 00:04:14,460 --> 00:04:15,440 This is just cool. 70 00:04:16,040 --> 00:04:17,080 Okay, so let's see. 71 00:04:17,220 --> 00:04:21,140 So what we're going to talk about is basically just one of the things. 72 00:04:21,180 --> 00:04:21,460 I like. 73 00:04:21,480 --> 00:04:22,360 I like to do every now and then. 74 00:04:22,500 --> 00:04:23,340 I think we all do. 75 00:04:23,500 --> 00:04:28,520 Is basically say what kinds of maybe bad assumptions are we making? 76 00:04:28,640 --> 00:04:34,340 Or what kinds of issues have we kind of left behind as things that we dealt with a long time ago? 77 00:04:34,480 --> 00:04:36,820 Or that we figure, you know, isn't much of a problem anymore? 78 00:04:37,540 --> 00:04:40,580 I have my own favorite sets of them. 79 00:04:41,040 --> 00:04:42,940 You know, patching is a real fun one. 80 00:04:43,140 --> 00:04:44,880 I know, patching is like one of the most boring things. 81 00:04:45,040 --> 00:04:49,280 But we start going and looking and saying, okay, how long does it take between when someone, 82 00:04:49,620 --> 00:04:51,340 when the, when Microsoft. 83 00:04:51,480 --> 00:04:55,120 When Microsoft patch comes out, and when it gets reverse engineered and turned into a weaponable exploit, 84 00:04:55,400 --> 00:04:57,680 and that number is like under a day by far. 85 00:04:59,340 --> 00:05:03,520 And then, you know, we look and we say our average patch time is like three months. 86 00:05:03,880 --> 00:05:06,360 I mean, you know, not all of us, because we're in this room. 87 00:05:06,540 --> 00:05:10,160 But, like, you know, nationwide, it's pretty bad. 88 00:05:10,540 --> 00:05:14,080 Anyway, it's kind of, patching is one of those boring little things that we kind of left behind. 89 00:05:14,180 --> 00:05:16,800 And, well, it's actually the thing that's going to kill us one day. 90 00:05:16,980 --> 00:05:20,160 Which, from talking to Dan, is basically what's going on with DNS2. 91 00:05:21,480 --> 00:05:22,800 And I think he's right. 92 00:05:23,100 --> 00:05:25,240 Okay, so, but here's what we're going to do. 93 00:05:25,280 --> 00:05:27,220 We're going to talk about, we're going to have a little bit of fun. 94 00:05:27,800 --> 00:05:30,940 We're going to talk about shared networks and not that much. 95 00:05:30,980 --> 00:05:33,340 But we're going to talk about what happens when you share a network with me. 96 00:05:33,400 --> 00:05:34,480 I mean, with a bad guy. 97 00:05:35,160 --> 00:05:41,960 With somebody who's up to no good and possibly has forgotten their, you know, laws and all kinds of ethics and stuff like that. 98 00:05:43,260 --> 00:05:48,500 And we're going to talk about how you can use these kinds of attacks to exploit a good number of sites. 99 00:05:49,140 --> 00:05:51,220 Including Gmail and LinkedIn and LiveJournal. 100 00:05:51,480 --> 00:05:53,720 And, honestly, tons and tons and tons of sites. 101 00:05:54,980 --> 00:05:56,160 Way, way, way too easily. 102 00:05:56,380 --> 00:05:59,440 And we'll talk about how you can do it against sites that are actually not as vulnerable. 103 00:06:00,120 --> 00:06:01,600 Like online banks. 104 00:06:01,800 --> 00:06:05,520 And we'll talk about what you can do when you're sharing a network with someone. 105 00:06:05,600 --> 00:06:07,660 And you can start Trojan software installation and update. 106 00:06:07,840 --> 00:06:09,380 And that was really fun to learn about. 107 00:06:09,500 --> 00:06:10,860 And I'll tell you how I learned about that later on. 108 00:06:11,180 --> 00:06:14,000 And we're going to talk about browser exploits. 109 00:06:14,720 --> 00:06:21,180 And how it gets a heck of a lot easier when you're not trying to get somebody halfway across the country or the planet to click on a link. 110 00:06:21,800 --> 00:06:23,900 Because you can make them go where you want. 111 00:06:24,120 --> 00:06:25,140 And we'll get to that. 112 00:06:25,520 --> 00:06:31,580 And then, lastly, we're going to talk about what you can do to try to survive hostile networks. 113 00:06:33,120 --> 00:06:39,320 I think DEF CON's been rated by, you know, at least 14 intelligence agencies as the most hostile network in the world. 114 00:06:39,520 --> 00:06:40,760 Okay, that's made up. 115 00:06:40,900 --> 00:06:42,620 But I could see it being true. 116 00:06:44,000 --> 00:06:45,900 Every year I bring a laptop here. 117 00:06:46,060 --> 00:06:48,280 And, you know, when I get home, I burn the laptop. 118 00:06:48,440 --> 00:06:50,900 No, I burn the hard drive. 119 00:06:51,480 --> 00:06:52,120 I burn the hard drive out. 120 00:06:52,260 --> 00:06:54,780 It was a fresh one that went in before I got here. 121 00:06:54,880 --> 00:06:56,140 It didn't have any real data on it. 122 00:06:56,260 --> 00:07:00,780 I just installed some kind of, well, it used to be a Linux distribution. 123 00:07:01,060 --> 00:07:02,240 But now it's Apple. 124 00:07:02,720 --> 00:07:03,340 But it's good. 125 00:07:04,840 --> 00:07:05,440 Apple, yay. 126 00:07:06,800 --> 00:07:07,440 But anyway. 127 00:07:07,920 --> 00:07:08,880 And, you know, I get home. 128 00:07:09,000 --> 00:07:11,760 And I don't torch the laptop anymore because they've gotten expensive. 129 00:07:11,980 --> 00:07:12,960 But I torch the hard drive. 130 00:07:13,180 --> 00:07:14,840 And then I grind up in little bits. 131 00:07:14,940 --> 00:07:17,520 And then I kind of wait for a really, really, really windy day. 132 00:07:17,680 --> 00:07:20,460 And I go out to, like, one of the places where they used to test airplanes. 133 00:07:20,680 --> 00:07:21,260 Like the... 134 00:07:21,260 --> 00:07:23,500 Not, like, normal airplanes with jet engines and stuff. 135 00:07:23,600 --> 00:07:24,800 I mean, like, the Wright Brothers kind of thing. 136 00:07:24,880 --> 00:07:27,100 And I try to throw up the hard drive bits into the wind. 137 00:07:27,520 --> 00:07:30,600 Okay, well, I'm getting way, way, way off topic. 138 00:07:31,920 --> 00:07:32,900 But this is DEF CON. 139 00:07:33,020 --> 00:07:33,680 So we get to do. 140 00:07:33,960 --> 00:07:36,040 Because you've got to assume that we're going to. 141 00:07:36,160 --> 00:07:37,140 That we're going to have a whole lot of fun. 142 00:07:37,240 --> 00:07:38,220 And that's what we're here to do. 143 00:07:38,320 --> 00:07:40,520 And, wow, this is a blast every single year. 144 00:07:41,620 --> 00:07:42,400 So let's see. 145 00:07:43,300 --> 00:07:49,060 The deal is, basically, HTTP, or let's call it non-encrypted web traffic. 146 00:07:49,300 --> 00:07:50,260 Whatever you want to call it. 147 00:07:50,280 --> 00:07:51,080 Non-encrypted HTTP. 148 00:07:51,260 --> 00:07:52,900 And shared networks. 149 00:07:53,060 --> 00:07:55,720 Networks you share with, well, anybody bad. 150 00:07:55,880 --> 00:07:57,240 Or anybody who might want to be bad. 151 00:07:57,380 --> 00:07:59,300 Or anybody who might spend a little bit of time being bad. 152 00:07:59,480 --> 00:08:01,960 And otherwise is a perfectly reasonable DEF CON speaker. 153 00:08:03,260 --> 00:08:05,340 You go to these hostile... 154 00:08:05,340 --> 00:08:07,100 You go to all these shared networks. 155 00:08:07,660 --> 00:08:09,900 And we don't really think about how many times we share a network. 156 00:08:10,140 --> 00:08:11,180 We all got... 157 00:08:11,180 --> 00:08:13,200 I mean, it's really been fun watching the security industry. 158 00:08:13,480 --> 00:08:14,820 I mean, watching our community. 159 00:08:15,000 --> 00:08:20,580 Because, you know, we had to fight so darn hard to get companies and people to use firewalls. 160 00:08:20,600 --> 00:08:21,240 And we're not. 161 00:08:21,260 --> 00:08:21,820 We're not done yet. 162 00:08:22,080 --> 00:08:27,560 Because I tell you, one of the most fun things to do is to actually put an outbound firewall on your machine. 163 00:08:27,660 --> 00:08:31,540 And find out about all the things that, well, used to go out without you knowing about it. 164 00:08:31,600 --> 00:08:34,460 I put this little thing called Little Snitch on my laptop for a little while. 165 00:08:34,660 --> 00:08:37,080 And I started watching all the stuff that was talking to everywhere. 166 00:08:37,300 --> 00:08:41,340 And I started realizing there were a ton of people who are still, you know, at home. 167 00:08:41,500 --> 00:08:43,180 They're not behind any kind of an ad box. 168 00:08:43,340 --> 00:08:46,900 They're not behind really anything of a firewall or much of a firewall. 169 00:08:47,180 --> 00:08:51,120 And I know this because, well, my machine's going and doing Skype. 170 00:08:51,260 --> 00:08:52,680 And it's doing all... 171 00:08:52,680 --> 00:08:53,160 It's just... 172 00:08:53,160 --> 00:08:54,780 I'm looking at it and saying, oh, my gosh. 173 00:08:55,160 --> 00:09:00,320 But anyway, assuming that we've all got these great firewalls and so on, we think we're pretty safe. 174 00:09:00,460 --> 00:09:01,380 And it's nice. 175 00:09:01,480 --> 00:09:02,420 We've gotten a lot safer. 176 00:09:02,600 --> 00:09:04,860 But then we get on these wireless networks with people. 177 00:09:05,120 --> 00:09:10,540 And, you know, Dave Maynor and Johnny Cash taught us a couple years ago that even having our wireless card on might be dangerous. 178 00:09:12,180 --> 00:09:17,040 And, okay, well, you know, if we don't join the network, I don't have anything that lead. 179 00:09:17,440 --> 00:09:18,260 I wish I did. 180 00:09:18,360 --> 00:09:19,220 But I don't. 181 00:09:19,860 --> 00:09:21,240 But on the other hand... 182 00:09:21,260 --> 00:09:22,980 And what I do have is just... 183 00:09:22,980 --> 00:09:27,240 If we go and start looking at actually everything that leaks out of your laptop, it's pretty amazing. 184 00:09:27,900 --> 00:09:30,080 I'm not going to go after everything that leaks out of your laptop. 185 00:09:30,280 --> 00:09:32,940 I'm pretty amazed at how much I see when I sniff a network. 186 00:09:33,620 --> 00:09:36,900 Of course, legally, it's always one I'm trying to protect. 187 00:09:37,040 --> 00:09:38,020 That's why I'm sniffing it. 188 00:09:38,040 --> 00:09:41,040 It's the only reason I'd ever sniff a network or glue or anything. 189 00:09:41,340 --> 00:09:41,760 No, no. 190 00:09:42,080 --> 00:09:43,700 DEF CON speakers do not sniff glue. 191 00:09:43,880 --> 00:09:46,180 They apparently, I think, have a lot harder stuff. 192 00:09:47,720 --> 00:09:48,440 So, anyway. 193 00:09:49,480 --> 00:09:50,040 So, yeah. 194 00:09:50,200 --> 00:09:51,240 I mean, and if you think about it... 195 00:09:51,260 --> 00:09:53,080 You might be like, well, no, I never use any shared networks. 196 00:09:53,340 --> 00:09:54,920 And, honestly, I live in Seattle now. 197 00:09:55,060 --> 00:09:58,000 This is, like, the place where, like, coffee houses are huge. 198 00:09:58,480 --> 00:09:59,460 Everyone's in the coffee houses. 199 00:09:59,620 --> 00:10:01,660 They're all on the Wi-Fi, and it's all free. 200 00:10:01,780 --> 00:10:03,000 And there's free Wi-Fi everywhere. 201 00:10:03,140 --> 00:10:04,660 We've got the Seattle wireless. 202 00:10:04,880 --> 00:10:06,120 We've got the Seattle wireless community. 203 00:10:06,180 --> 00:10:06,880 It's just huge. 204 00:10:07,220 --> 00:10:08,280 And you find it everywhere. 205 00:10:08,500 --> 00:10:10,440 You're constantly going to wireless networks in hotels. 206 00:10:11,000 --> 00:10:11,900 Not in this one. 207 00:10:12,000 --> 00:10:13,040 Not on my life. 208 00:10:13,340 --> 00:10:15,900 But, you know, you're going on wireless networks in hotels. 209 00:10:16,040 --> 00:10:17,280 You're going on wireless networks... 210 00:10:17,280 --> 00:10:20,220 You know, if you go to a non-security conference, you might turn your laptop on. 211 00:10:21,260 --> 00:10:24,140 You know, you might turn the wireless card on your laptop on and, you know, join on. 212 00:10:24,240 --> 00:10:25,620 You might even be paying for it. 213 00:10:25,660 --> 00:10:28,420 Heck, you could be paying for the wireless networks, and there's still not really any safer. 214 00:10:28,700 --> 00:10:31,740 You're sharing it with a whole bunch of people who may or may not be bad. 215 00:10:33,140 --> 00:10:38,240 Or who may or may not have had bad people install bad things on their laptop, even though they're good. 216 00:10:39,560 --> 00:10:41,140 So, you know, we go to coffee shops. 217 00:10:41,240 --> 00:10:41,800 We go to bookstores. 218 00:10:42,460 --> 00:10:44,160 You know, actually, there was a really... 219 00:10:44,160 --> 00:10:45,900 There's been a series of great talks. 220 00:10:45,960 --> 00:10:48,060 One was Simple Nomad talking about going on an airplane. 221 00:10:49,120 --> 00:10:51,180 And starting to just, you know, finding people with their wireless. 222 00:10:51,260 --> 00:10:54,100 And he would go and set up a little network with them. 223 00:10:54,220 --> 00:10:56,220 And, you know, start seeing what he could see. 224 00:10:56,420 --> 00:10:57,580 I'm sure that he didn't do that. 225 00:10:57,620 --> 00:10:58,480 It's all fictional stories. 226 00:11:00,140 --> 00:11:01,500 But, yeah, it's kind of... 227 00:11:01,500 --> 00:11:07,220 You know, the deal is, especially with wireless, we're all on shared networks with lots of bad people all the time. 228 00:11:07,260 --> 00:11:09,940 And it's really kind of nice to think about... 229 00:11:09,940 --> 00:11:10,660 Well, maybe it's not. 230 00:11:10,760 --> 00:11:11,880 But I think it's nice. 231 00:11:11,960 --> 00:11:14,960 I think it's nice to think about what people can do and what people are doing. 232 00:11:15,180 --> 00:11:17,860 And you open yourselves up to a heck of a lot of attack. 233 00:11:18,100 --> 00:11:20,100 You also open yourself up to a whole lot of monitoring. 234 00:11:20,380 --> 00:11:21,240 I don't know anything about... 235 00:11:21,260 --> 00:11:22,100 I don't know anybody who does this. 236 00:11:22,180 --> 00:11:26,240 Or if I did know them, I wouldn't have known their name or anything like that. 237 00:11:26,420 --> 00:11:32,140 But I've heard there are lots of people who will go on wireless networks and just simply set up a sniffer of some sort. 238 00:11:32,240 --> 00:11:34,180 And just start watching passwords go by. 239 00:11:34,600 --> 00:11:39,840 Well, and so, you know, a lot of the services that would have clear text passwords go by started saying, 240 00:11:39,920 --> 00:11:41,440 Wait, we've heard of this wall of sheep thing. 241 00:11:42,280 --> 00:11:43,340 And that's not good. 242 00:11:43,440 --> 00:11:44,440 So we're going to start... 243 00:11:44,440 --> 00:11:45,600 We're going to encrypt. 244 00:11:45,640 --> 00:11:46,420 We're going to encrypt something. 245 00:11:46,620 --> 00:11:47,600 We'll encrypt those passwords. 246 00:11:48,000 --> 00:11:50,680 And so now, you know, my friends who... 247 00:11:50,680 --> 00:11:51,100 I don't know. 248 00:11:51,100 --> 00:11:54,580 I don't know the names of who would be, you know, sniffing on these wireless networks. 249 00:11:54,820 --> 00:11:56,120 They don't see passwords go by anymore. 250 00:11:56,500 --> 00:11:58,180 But they see IM conversations. 251 00:11:58,280 --> 00:11:59,420 And they see email going by. 252 00:11:59,540 --> 00:12:01,520 And they see all kinds of wonderful clear text stuff. 253 00:12:03,740 --> 00:12:06,100 This is what you've got to kind of understand. 254 00:12:06,420 --> 00:12:07,720 And this is what you've got to tell your friends. 255 00:12:07,860 --> 00:12:08,620 You've got to tell your family. 256 00:12:08,760 --> 00:12:10,940 You've got to tell your places of employ. 257 00:12:11,180 --> 00:12:13,020 And you've got to tell everybody on the earth. 258 00:12:13,100 --> 00:12:17,800 If we share a LAN, if you and I share a LAN, I can view and modify your traffic. 259 00:12:18,340 --> 00:12:18,700 Okay? 260 00:12:19,580 --> 00:12:20,400 Whether or not... 261 00:12:20,400 --> 00:12:24,200 Whether or not in modifying it, I break it, and it doesn't work. 262 00:12:24,380 --> 00:12:26,200 It's useless to me and useless to you. 263 00:12:26,480 --> 00:12:27,800 Well, that's different. 264 00:12:28,200 --> 00:12:31,700 If it's clear text, for the most part, I get to view and modify it, and I have a lot of fun. 265 00:12:32,200 --> 00:12:35,320 By the way, this is one of the... 266 00:12:35,320 --> 00:12:36,240 I have... 267 00:12:36,240 --> 00:12:37,380 I don't really have rants. 268 00:12:37,440 --> 00:12:38,420 I'm a pretty nice guy. 269 00:12:38,660 --> 00:12:40,860 I don't think anybody's ever said, wow, that Jay, he's grumpy. 270 00:12:41,100 --> 00:12:41,460 Right? 271 00:12:41,560 --> 00:12:44,720 But I have all these weird thoughts about things. 272 00:12:44,940 --> 00:12:47,280 And, you know, and things that kind of bug me. 273 00:12:47,380 --> 00:12:48,760 Because I start to think about it. 274 00:12:49,420 --> 00:12:50,280 And I say... 275 00:12:50,400 --> 00:12:52,480 You know, we're always talking. 276 00:12:52,680 --> 00:12:53,640 Whenever we're talking... 277 00:12:53,640 --> 00:12:56,440 I mean, I'm a consultant, or you can call us a consultant. 278 00:12:57,200 --> 00:12:59,240 We do sell our time by the hour and all that. 279 00:12:59,520 --> 00:13:04,720 But, you know, I go and I talk to lots and lots of companies, and we sit down. 280 00:13:04,840 --> 00:13:06,000 And one of the things we do is we talk about... 281 00:13:06,000 --> 00:13:10,280 You know, before we start hacking anything or looking at firewalls or whatever we're going to do, 282 00:13:10,420 --> 00:13:12,480 we kind of say, well, you know, what are the threats? 283 00:13:12,660 --> 00:13:13,960 What are the threats that are most... 284 00:13:13,960 --> 00:13:15,700 What are the biggest things that could harm the business? 285 00:13:16,500 --> 00:13:19,000 And when we do that, we say, okay. 286 00:13:19,400 --> 00:13:20,260 They start talking. 287 00:13:20,400 --> 00:13:23,460 You know, the data that bad guys could see that they shouldn't be able to see. 288 00:13:23,520 --> 00:13:24,400 They could see secret stuff. 289 00:13:24,720 --> 00:13:25,720 And they say... 290 00:13:25,720 --> 00:13:26,920 And they could take things down. 291 00:13:27,020 --> 00:13:27,840 They could do denial of service. 292 00:13:28,140 --> 00:13:32,140 And they always, always, I swear, always forget the last one. 293 00:13:32,460 --> 00:13:34,560 Everybody knows that first one is confidentiality. 294 00:13:34,780 --> 00:13:38,840 And that, well, kind of last one, but I've reordered it, is availability. 295 00:13:39,660 --> 00:13:41,180 Anybody know what the middle one is? 296 00:13:42,800 --> 00:13:43,200 Integrity. 297 00:13:43,200 --> 00:13:44,100 Oh, God, wait. 298 00:13:44,580 --> 00:13:46,780 Who the hell cares if I can see that data? 299 00:13:46,840 --> 00:13:48,440 Sometimes it's really good that I can see it. 300 00:13:48,500 --> 00:13:49,840 But what if I could change it? 301 00:13:50,400 --> 00:13:52,420 What if I could change it and you didn't know I changed it? 302 00:13:52,980 --> 00:13:55,840 And what if I could do that, you know, all the time? 303 00:13:55,980 --> 00:13:58,420 And I think that's one of the things we're going to talk about in this talk. 304 00:13:58,540 --> 00:13:59,480 We're going to talk about... 305 00:13:59,480 --> 00:14:04,020 We're going to talk about how with good tools or, you know, honestly, with even bad tools, 306 00:14:04,580 --> 00:14:08,220 you can get at the integrity part just as much as the confidentiality. 307 00:14:08,220 --> 00:14:10,180 You can have a heck of a lot more fun with the integrity. 308 00:14:10,560 --> 00:14:11,600 It's a lot more fun. 309 00:14:11,660 --> 00:14:12,740 And we'll get into the kinds of attacks. 310 00:14:13,160 --> 00:14:15,580 But what you need to understand is if you're sharing a LAN with me, 311 00:14:15,600 --> 00:14:19,940 especially a wireless LAN, the wireless that brought back the broadcast domain, 312 00:14:20,400 --> 00:14:22,880 you know, we all had hubs, and it was, like, really crazy 313 00:14:22,880 --> 00:14:25,880 because you could, like, tell your network card to just tell you everything that went by on the wire 314 00:14:25,880 --> 00:14:27,180 instead of just the stuff that was for it. 315 00:14:27,400 --> 00:14:29,260 And all of a sudden, you'd be like, wow, I can see everybody's traffic. 316 00:14:29,360 --> 00:14:29,780 This is really cool. 317 00:14:30,080 --> 00:14:33,660 And then, well, that's been kind of a decade since that was really all the way true. 318 00:14:33,840 --> 00:14:35,840 You know, we got switches, and these switches were really nice. 319 00:14:35,920 --> 00:14:37,400 And now we can only see your stuff. 320 00:14:37,620 --> 00:14:39,880 And, well, unless you played some games, which we'll talk about. 321 00:14:40,640 --> 00:14:43,680 But on a wireless network, oh, wow, we all went broadcast again. 322 00:14:44,200 --> 00:14:45,640 I mean, we went really broadcast. 323 00:14:45,820 --> 00:14:47,860 I don't just mean, like, the packet goes into a hub, 324 00:14:47,860 --> 00:14:49,140 and the hub sends it out in all the directions. 325 00:14:49,400 --> 00:14:49,940 I mean... 326 00:14:50,580 --> 00:14:52,500 Dude, I can be really, really far away. 327 00:14:52,760 --> 00:14:55,000 As long as I've got a really nice antenna, I can be really, really far away 328 00:14:55,000 --> 00:14:56,080 and watch all of your traffic. 329 00:14:56,200 --> 00:14:56,800 And you don't know it. 330 00:14:56,980 --> 00:14:58,300 And you didn't have to do anything. 331 00:14:58,440 --> 00:14:59,280 And I didn't have to throw any packets. 332 00:14:59,400 --> 00:15:00,360 You don't even know I'm doing it. 333 00:15:01,100 --> 00:15:01,420 That's... 334 00:15:01,420 --> 00:15:03,260 Well, anyway, so we'll get into that. 335 00:15:05,120 --> 00:15:07,160 So the thing you've got to understand is I can... 336 00:15:07,160 --> 00:15:11,440 If we're on a LAN together, and I'm bad, I'm looking at your traffic. 337 00:15:11,580 --> 00:15:13,260 And I can do this in a bunch of different ways. 338 00:15:13,340 --> 00:15:16,700 One of my favorite ideas is just to stand up your own DHCP server. 339 00:15:17,100 --> 00:15:19,720 I mean, you know, you could go and play games with the switches, 340 00:15:19,780 --> 00:15:20,380 but why not just play? 341 00:15:20,400 --> 00:15:21,520 Stand up your own DHCP server. 342 00:15:22,040 --> 00:15:24,460 I mean, everybody just kind of expects they'll put their laptop on a network, 343 00:15:24,560 --> 00:15:26,500 and their laptop will go and try to get an IP address. 344 00:15:26,760 --> 00:15:29,840 And they figure that the box that gives it to them 345 00:15:29,840 --> 00:15:32,740 will probably be a nice, friendly one that was supposed to be on the network. 346 00:15:32,920 --> 00:15:36,000 But honestly, DHCP is this wonderful broadcast thing, right? 347 00:15:36,060 --> 00:15:38,760 It's like, hey, does anybody have an IP address for me, me, me? 348 00:15:39,120 --> 00:15:41,180 And it says, and somebody wins a race. 349 00:15:41,240 --> 00:15:42,460 Somebody races back and says, I do. 350 00:15:42,760 --> 00:15:44,480 And sometimes that's the right somebody, 351 00:15:44,600 --> 00:15:46,380 and sometimes it's the wrong somebody. 352 00:15:47,500 --> 00:15:49,100 Now, I'm going to tell you guys something. 353 00:15:49,260 --> 00:15:50,380 Because we're at a hacker conference, 354 00:15:50,400 --> 00:15:53,280 and I've been on a lot of good networks gone bad. 355 00:15:54,160 --> 00:15:55,940 If you're going to do that to me, 356 00:15:56,020 --> 00:15:59,820 if you're going to give me a DHCP lease instead of the real person, 357 00:15:59,860 --> 00:16:01,060 you're going to do any of these network games, 358 00:16:01,200 --> 00:16:02,400 please route my packets. 359 00:16:06,380 --> 00:16:08,840 I mean, really, how many of us have gone on a network, 360 00:16:08,920 --> 00:16:10,960 and we're like, okay, the network's down. 361 00:16:11,060 --> 00:16:11,620 What's going on? 362 00:16:11,680 --> 00:16:15,080 There's some fools trying to sniff all the traffic. 363 00:16:15,140 --> 00:16:16,320 He sent all the traffic to him, 364 00:16:16,400 --> 00:16:20,100 but he's not bothering to route it because he's clueless and stupid. 365 00:16:20,480 --> 00:16:22,060 Or lazy, or whatever. 366 00:16:22,240 --> 00:16:23,720 Or he stopped a long time ago, 367 00:16:23,760 --> 00:16:25,480 but he didn't put the network back the way he found it. 368 00:16:26,140 --> 00:16:27,500 Which really, you've got to think, 369 00:16:27,540 --> 00:16:29,700 there's got to be some kind of ethics to doing bad things. 370 00:16:29,860 --> 00:16:30,620 I mean, you can be bad. 371 00:16:32,860 --> 00:16:35,380 But there's like levels of badness, you know? 372 00:16:35,540 --> 00:16:39,080 There's like kind of, you know, there's, I don't know, 373 00:16:39,220 --> 00:16:41,700 there's like shoving somebody in line or cutting in line. 374 00:16:41,820 --> 00:16:44,280 And then there's like, you know, eating a kitten. 375 00:16:44,560 --> 00:16:47,140 But eating a kitten is really bad, okay? 376 00:16:47,600 --> 00:16:50,080 And I would posit that if you're going to watch my traffic, 377 00:16:50,080 --> 00:16:53,060 if you're going to route, if you're going to have all my traffic go to your box, 378 00:16:53,200 --> 00:16:54,900 and you don't bother to route it out to the internet, 379 00:16:54,960 --> 00:16:57,000 where I was trying to get, that's eating the kitten. 380 00:16:57,520 --> 00:16:58,620 Just don't do that. 381 00:16:59,500 --> 00:17:01,940 Okay, so here we are. 382 00:17:02,840 --> 00:17:05,240 So the DHCP server's a nice way of doing things. 383 00:17:05,320 --> 00:17:08,960 Another nice way of doing things, and it's amazingly simple and easy, 384 00:17:09,680 --> 00:17:12,960 is you can run a little tool like ARP spoof, or RouterCap, or whatever. 385 00:17:13,240 --> 00:17:15,040 And you can run a little tool that'll basically say, 386 00:17:15,160 --> 00:17:17,040 hi, I'm the router. 387 00:17:17,740 --> 00:17:19,840 Everybody who wants to go out, you come to me. 388 00:17:20,080 --> 00:17:22,380 And if you wanted to be really, really careful about it, 389 00:17:22,420 --> 00:17:24,960 or really, really targeted, you could be like, no, I'm that one server. 390 00:17:25,220 --> 00:17:26,940 That's the really, really highly important server. 391 00:17:27,100 --> 00:17:30,840 But honestly, most of us, if we were bad, and we were going in, 392 00:17:30,880 --> 00:17:32,260 we'd just, you know, we just want to be a router. 393 00:17:32,540 --> 00:17:34,920 Maybe we want to, actually, honestly, in honor of Dan, 394 00:17:36,160 --> 00:17:37,460 maybe we want to be the DNS server. 395 00:17:37,640 --> 00:17:39,760 That's a good person to be, too, because you start saying, 396 00:17:39,860 --> 00:17:45,780 wow, everybody who, like, asks for www.livejournal.com, that's my laptop. 397 00:17:46,400 --> 00:17:47,860 And they're not ever going to know the difference. 398 00:17:48,520 --> 00:17:48,840 Anyway. 399 00:17:48,840 --> 00:17:52,220 So, we'll get to that, but this is, I think this is kind of fun. 400 00:17:52,440 --> 00:17:54,540 Anyway, yeah, I added a slide. 401 00:17:54,820 --> 00:17:56,700 I had a slide I forgot about adding, but I added it. 402 00:17:57,260 --> 00:17:59,340 DNS is a beautiful, beautiful thing to an attacker, 403 00:17:59,520 --> 00:18:01,640 and we wouldn't be complete if we didn't talk about it. 404 00:18:01,680 --> 00:18:04,820 UDP protocols are so beautiful, because they're so much easier to spoof. 405 00:18:05,060 --> 00:18:07,860 And they're just, it's just, there's just, it's just so much. 406 00:18:07,880 --> 00:18:09,080 It makes things worlds easier. 407 00:18:09,660 --> 00:18:11,440 And it's a beautiful thing for an attacker. 408 00:18:11,580 --> 00:18:13,420 And Dan, I read Dan's slides. 409 00:18:13,580 --> 00:18:15,460 I missed his talk before, but I'm going to see it. 410 00:18:15,620 --> 00:18:18,540 But Dan has some really good ideas. 411 00:18:18,540 --> 00:18:22,080 Here, DNS is a wonderful thing to an attacker, absolutely. 412 00:18:23,440 --> 00:18:25,580 What I really like, you know, on the one hand, 413 00:18:25,620 --> 00:18:27,700 you could spoof DNS replies to everything on the network, 414 00:18:27,840 --> 00:18:29,960 and that doesn't go away as a threat. 415 00:18:30,220 --> 00:18:32,520 We don't really have much of anything we can do about it. 416 00:18:32,900 --> 00:18:33,300 Okay? 417 00:18:33,360 --> 00:18:36,180 If you happen to put your laptop on a network at the same, 418 00:18:36,220 --> 00:18:39,460 on the same network, and I send out a DNS, 419 00:18:39,540 --> 00:18:42,100 and I send out a DNS request, and you watch it go by, 420 00:18:42,240 --> 00:18:43,200 you can respond to it. 421 00:18:43,280 --> 00:18:45,760 And quite possibly, very often, trust me, 422 00:18:45,820 --> 00:18:47,020 DNS spoof is a great tool. 423 00:18:47,160 --> 00:18:48,420 You can respond to it. 424 00:18:48,420 --> 00:18:49,600 It's a little bit faster than the real DNS server. 425 00:18:50,260 --> 00:18:54,420 Part of that is because, well, you already know the answer, 426 00:18:54,540 --> 00:18:56,720 well, the fake answer, whereas it might have to go and do work 427 00:18:56,720 --> 00:19:01,360 to find out where, you know, finance.yahoo.com is, or such. 428 00:19:01,540 --> 00:19:04,740 Anyway, the other really cool thing about DNS 429 00:19:04,740 --> 00:19:09,220 is if you can poison it, if you can poison DNS for like an hour 430 00:19:09,220 --> 00:19:11,040 or five minutes or ten minutes or whatever, 431 00:19:11,140 --> 00:19:12,020 you can get an SSL cert. 432 00:19:12,340 --> 00:19:15,200 Because honestly, the way they do SSL certs is kind of simple. 433 00:19:15,420 --> 00:19:17,560 It's, you apply for an SSL cert. 434 00:19:17,560 --> 00:19:20,280 If you can get an email for the domain for a short time, 435 00:19:22,000 --> 00:19:23,560 then you've got the SSL cert. 436 00:19:23,840 --> 00:19:26,960 And revocation is really amazingly difficult if it all works. 437 00:19:27,720 --> 00:19:30,180 So basically, the people who own the domain for real 438 00:19:30,180 --> 00:19:31,080 have to wait for it to expire. 439 00:19:33,960 --> 00:19:35,580 So, okay, well, I'll get to some more, 440 00:19:35,600 --> 00:19:36,780 I'll get to some more man-in-the-middle stuff, 441 00:19:36,960 --> 00:19:39,040 but I think that this is good stuff to think about. 442 00:19:39,140 --> 00:19:40,480 We trust our networks way too much. 443 00:19:41,280 --> 00:19:43,920 So if we share a LAN, did I go back a slide? 444 00:19:46,200 --> 00:19:46,880 Hmm. Okay. 445 00:19:46,880 --> 00:19:49,400 So let me get on to some of the, let me get on some more of the meat. 446 00:19:49,500 --> 00:19:51,520 I've been playing, I've been man-in-the-middle-ing 447 00:19:51,520 --> 00:19:53,180 all of my web traffic for about three months. 448 00:19:53,360 --> 00:19:55,020 And I've been having a heck of a lot of fun doing it. 449 00:19:55,080 --> 00:19:57,700 And I've been surprised at, well, how much of it goes by clear text 450 00:19:57,700 --> 00:19:59,880 and how much stuff is in there and how much stuff is persistent. 451 00:20:00,640 --> 00:20:02,560 And now I'm afraid of Google, too. 452 00:20:03,100 --> 00:20:04,020 But I'll get to that. 453 00:20:04,960 --> 00:20:07,560 So basically, part of what I want to say is that, you know, 454 00:20:07,580 --> 00:20:10,000 beyond just the straight, this website is clear text. 455 00:20:11,000 --> 00:20:15,880 Sites that are mixed between clear text and not-so-clear text are between, you know, H-E-D-P, 456 00:20:16,240 --> 00:20:16,860 and then, you know, I don't know. 457 00:20:16,880 --> 00:20:20,880 And whatever you want to call it, SSL, TLS, encrypted web traffic, 458 00:20:21,500 --> 00:20:22,920 they're, I'll call them a menace. 459 00:20:23,020 --> 00:20:24,140 I think it's a reasonable thing. 460 00:20:24,520 --> 00:20:29,560 And the problem is that any time you're unencrypted, I get to watch. 461 00:20:29,780 --> 00:20:31,300 But remember, I'm into integrity. 462 00:20:31,660 --> 00:20:34,520 I don't just get to watch, I can clone your session. 463 00:20:34,940 --> 00:20:35,340 Okay? 464 00:20:35,420 --> 00:20:36,860 I can throw in whatever I want. 465 00:20:37,040 --> 00:20:38,620 If I can route your packets for you, 466 00:20:38,740 --> 00:20:41,780 and I try to say that that's actually pretty easy and trivial, 467 00:20:41,900 --> 00:20:43,060 and we all knew how to do that a long time ago. 468 00:20:43,320 --> 00:20:44,940 If I can route your packets for you, 469 00:20:45,020 --> 00:20:46,860 well, then, I can take any of your packets, 470 00:20:46,880 --> 00:20:48,600 any of the ones that, you know, will let me, 471 00:20:48,640 --> 00:20:49,580 any of the clear text ones, 472 00:20:49,920 --> 00:20:51,720 and, you know, change them if I want. 473 00:20:51,940 --> 00:20:54,040 I could, honestly, I could keep them for myself 474 00:20:54,040 --> 00:20:56,100 and not send them on to their real destination. 475 00:20:56,520 --> 00:20:58,540 And I could send my own stuff on to the real destination. 476 00:20:58,780 --> 00:20:59,940 And then, whenever the answers came back, 477 00:21:00,000 --> 00:21:00,740 I could hold on to that, 478 00:21:00,800 --> 00:21:01,920 and I could send you something else. 479 00:21:02,260 --> 00:21:03,700 And if you start scripting this, 480 00:21:03,760 --> 00:21:04,720 if you start going programmatic, 481 00:21:04,800 --> 00:21:05,960 you can really do a whole lot. 482 00:21:06,820 --> 00:21:09,360 I kind of, part of the way I got an idea for this 483 00:21:09,360 --> 00:21:11,920 was basically the idea of taking a user 484 00:21:11,920 --> 00:21:14,460 who's signing in to webmail and saying, 485 00:21:14,520 --> 00:21:16,860 wait, if I can get them on to my webmail site, 486 00:21:16,860 --> 00:21:18,380 instead of their real webmail server, 487 00:21:18,620 --> 00:21:20,720 I can control their whole, like, email world. 488 00:21:21,080 --> 00:21:22,840 I know that sounds really overblown, 489 00:21:22,960 --> 00:21:24,760 but really, it's, I can sit there and say, 490 00:21:24,820 --> 00:21:27,020 okay, well, I don't want them to see this email that came in. 491 00:21:27,140 --> 00:21:28,380 So I'm just going to make sure that, 492 00:21:28,420 --> 00:21:30,200 in the view that they're getting of the data, 493 00:21:30,300 --> 00:21:31,280 they never see that email. 494 00:21:31,540 --> 00:21:33,460 Maybe they never see any email from this person. 495 00:21:33,580 --> 00:21:35,620 Maybe this is, you know, maybe I'm, you know, 496 00:21:35,660 --> 00:21:37,320 I don't know, let me think of something bad. 497 00:21:37,640 --> 00:21:40,160 I don't know, we're both trying to date the same girl, maybe. 498 00:21:41,200 --> 00:21:43,140 And, you know, this guy's never going to get an email 499 00:21:43,140 --> 00:21:43,720 from her anymore. 500 00:21:44,320 --> 00:21:46,440 And, heck, I'm going to send some email from him 501 00:21:46,440 --> 00:21:46,840 to her, and I'm going to send some email 502 00:21:46,840 --> 00:21:47,100 from her to her, saying, 503 00:21:47,320 --> 00:21:48,740 I don't ever want to talk to you again. 504 00:21:49,440 --> 00:21:49,800 Right? 505 00:21:50,400 --> 00:21:51,820 And she's not going to know, 506 00:21:51,840 --> 00:21:53,080 unless she goes out of band. 507 00:21:53,360 --> 00:21:54,780 But, you know, but we've got VoIP, 508 00:21:54,860 --> 00:21:56,260 and I'm working on it, right? 509 00:21:56,500 --> 00:22:00,880 So, so anyway, we've got this, 510 00:22:00,960 --> 00:22:02,560 so it's really, I mean, you really, 511 00:22:02,620 --> 00:22:04,020 it's really freaking crazy, 512 00:22:05,260 --> 00:22:06,740 because you could put someone 513 00:22:06,740 --> 00:22:07,860 in their own little email matrix, 514 00:22:08,080 --> 00:22:09,700 and they don't know they're in the matrix. 515 00:22:09,900 --> 00:22:11,560 They think that they're just going on their mail site 516 00:22:11,560 --> 00:22:14,300 as per normal, and it's not that hard. 517 00:22:14,440 --> 00:22:16,820 And I wrote a tool to do this kind of thing. 518 00:22:16,840 --> 00:22:20,120 So anyway, one of the, this is actually 519 00:22:20,120 --> 00:22:21,820 one of the things that got me thinking about this, 520 00:22:21,900 --> 00:22:23,880 was basically in, we were, you know, 521 00:22:23,900 --> 00:22:25,840 we've been doing, we do a lot of web app hacking. 522 00:22:25,960 --> 00:22:27,000 I do a lot of web app hacking, 523 00:22:27,080 --> 00:22:28,640 and it's really, really fun, and it's great stuff. 524 00:22:29,480 --> 00:22:31,580 But constantly, we talk to, we talk to companies, 525 00:22:31,740 --> 00:22:33,360 and they, and we say, you know, 526 00:22:34,420 --> 00:22:35,840 your users are logging in, 527 00:22:35,920 --> 00:22:37,880 and you're encrypting their password, 528 00:22:38,120 --> 00:22:40,280 and then after that, you're leaving 529 00:22:40,280 --> 00:22:41,680 the whole session unencrypted. 530 00:22:41,860 --> 00:22:44,000 And they say, well, we protected the password. 531 00:22:44,220 --> 00:22:45,100 You can't get the password. 532 00:22:45,560 --> 00:22:47,160 And I say, the problem is, 533 00:22:47,200 --> 00:22:48,780 that if I share a network with them, 534 00:22:48,900 --> 00:22:50,400 not to be repetitious, 535 00:22:50,640 --> 00:22:52,260 but if I share a network with them, 536 00:22:52,320 --> 00:22:53,760 I can see everything they send, 537 00:22:53,920 --> 00:22:55,580 but more than that, I can impersonate them. 538 00:22:55,720 --> 00:22:57,580 And I can impersonate them for, well, 539 00:22:57,580 --> 00:22:59,620 about as long as I can manage to keep a clone session. 540 00:23:00,840 --> 00:23:02,460 So it's really kind of, I mean, I can, 541 00:23:02,540 --> 00:23:04,480 with most applications, I can be in the application, 542 00:23:04,700 --> 00:23:05,460 they can be in the application, 543 00:23:05,660 --> 00:23:06,680 we can both be in at the same time, 544 00:23:06,700 --> 00:23:07,540 we're both the same user, 545 00:23:07,960 --> 00:23:09,580 and they may not ever know I'm there. 546 00:23:09,700 --> 00:23:10,740 They may not ever know what I'm up to. 547 00:23:10,820 --> 00:23:12,460 If I'm just grabbing data, they'll never really know. 548 00:23:15,100 --> 00:23:15,540 That could be subtle. 549 00:23:17,440 --> 00:23:19,060 So anyway, I mean, this is one of the, 550 00:23:19,100 --> 00:23:20,560 I take LinkedIn as an example, 551 00:23:20,680 --> 00:23:22,260 but I only take LinkedIn as an example 552 00:23:22,260 --> 00:23:24,340 because it was just one of the ones I was thinking about. 553 00:23:24,520 --> 00:23:26,380 It's one of the ones, it's one of the sites that we all, 554 00:23:26,500 --> 00:23:28,600 you know, that I think a lot of people in this room use. 555 00:23:29,240 --> 00:23:30,980 But LinkedIn is this great site. 556 00:23:31,280 --> 00:23:33,480 You can go to, you can, like many, many people, 557 00:23:33,560 --> 00:23:35,620 just go to www.linkedin.com. 558 00:23:36,220 --> 00:23:37,620 And you'll have an unencrypted session. 559 00:23:37,840 --> 00:23:39,000 And then when you go to do your password, 560 00:23:39,120 --> 00:23:40,260 it'll be encrypted, and then when you're done, 561 00:23:40,300 --> 00:23:40,960 you'll go unencrypted. 562 00:23:41,260 --> 00:23:43,420 And you could say, no, I'm not going to be like that. 563 00:23:43,420 --> 00:23:44,300 I'm going to make sure 564 00:23:44,300 --> 00:23:47,140 that I'm not going to Jay's version of LinkedIn. 565 00:23:47,300 --> 00:23:49,460 I'm going to make sure that I'm going to the right one. 566 00:23:49,840 --> 00:23:50,900 So you'll, so you'll type 567 00:23:53,260 --> 00:23:54,640 hdbs://www.linkedin.com, right? 568 00:23:54,760 --> 00:23:56,560 And that'll actually give you some assurance 569 00:23:56,560 --> 00:23:58,040 that you're actually getting to the real LinkedIn, 570 00:23:58,180 --> 00:23:59,100 not to me instead, 571 00:23:59,220 --> 00:24:00,480 and then I'm going to forward things on. 572 00:24:01,120 --> 00:24:02,340 Okay, that's, that's good. 573 00:24:02,620 --> 00:24:04,900 The difficulty is that you'll go there, 574 00:24:04,960 --> 00:24:06,800 you'll go to that, you'll go to that encrypted site, 575 00:24:06,900 --> 00:24:08,160 you'll log in, great, 576 00:24:08,320 --> 00:24:09,480 and then LinkedIn will give you, 577 00:24:09,520 --> 00:24:10,880 will take you back to clear text. 578 00:24:13,420 --> 00:24:14,240 So you can keep typing hdbs, 579 00:24:14,420 --> 00:24:16,240 and the problem is they keep giving you pages back 580 00:24:16,240 --> 00:24:18,760 that have, well, clear text links all over them. 581 00:24:18,840 --> 00:24:19,860 So you're just stuck. 582 00:24:20,800 --> 00:24:22,880 And that's just how the site operates, 583 00:24:23,020 --> 00:24:24,100 and it's really, really no fun. 584 00:24:24,660 --> 00:24:26,420 So that's our, that's our red link. 585 00:24:27,160 --> 00:24:27,880 That's where you go. 586 00:24:28,020 --> 00:24:30,880 So if you change the URL, clicking on any link 587 00:24:30,880 --> 00:24:33,780 basically just gets you back to not so SSL, 588 00:24:33,820 --> 00:24:34,460 not so encrypted. 589 00:24:35,760 --> 00:24:37,820 Anyway, there are, there are people out there 590 00:24:37,820 --> 00:24:39,920 that have made, that have made modifications to browsers, 591 00:24:40,100 --> 00:24:41,140 they've gone and gotten plug-ins, 592 00:24:41,320 --> 00:24:42,860 they do like me 593 00:24:43,420 --> 00:24:44,260 through a defensive proxy. 594 00:24:45,220 --> 00:24:47,200 And basically they make it so that all of their, 595 00:24:47,220 --> 00:24:49,480 all of their stuff is going, whenever the site 596 00:24:49,480 --> 00:24:51,440 will permit it, is going encrypted every single time. 597 00:24:51,520 --> 00:24:52,540 So they just keep making encrypted, 598 00:24:52,760 --> 00:24:54,740 and a lot of applications will let you do that, 599 00:24:54,780 --> 00:24:55,480 but not all of them. 600 00:24:56,440 --> 00:24:58,920 But anyway, the nice thing for me as an attacker, 601 00:24:59,160 --> 00:25:00,960 it's really a lot nicer to be an attacker, 602 00:25:01,100 --> 00:25:01,680 I'm telling you. 603 00:25:01,920 --> 00:25:04,040 It's like way better to be on the attack side of this one. 604 00:25:04,380 --> 00:25:06,420 Okay, as an attacker, all I've got to do 605 00:25:06,420 --> 00:25:09,740 is wait for one request to go by, 606 00:25:09,900 --> 00:25:10,800 and I get to clone session, 607 00:25:11,060 --> 00:25:12,420 and maybe I get to inject some things, 608 00:25:12,420 --> 00:25:14,860 I might inject some JavaScript, or inject some redirects. 609 00:25:16,280 --> 00:25:18,020 So, you know, let's, let's look at, 610 00:25:18,060 --> 00:25:19,420 let's kind of start thinking about what I can do. 611 00:25:19,560 --> 00:25:21,620 So, one of the first things I do is basically, 612 00:25:21,700 --> 00:25:24,040 I'm going to get your machine to go to my machine. 613 00:25:24,420 --> 00:25:25,600 Maybe it's going to my machine 614 00:25:25,600 --> 00:25:26,680 because it thinks it's the router, 615 00:25:26,780 --> 00:25:27,820 maybe it's going to my machine 616 00:25:27,820 --> 00:25:29,100 because it thinks it's the DNS server, 617 00:25:29,300 --> 00:25:30,780 or the real web server, or what have you. 618 00:25:30,960 --> 00:25:32,060 But I'll do that in general, 619 00:25:32,120 --> 00:25:33,060 I'll do it through ARP spoofing. 620 00:25:33,800 --> 00:25:37,700 I might do it through DNS spoofing, 621 00:25:37,700 --> 00:25:39,160 and I might do it through DHCP spoofing. 622 00:25:40,280 --> 00:25:42,000 And none of that's really all that hard. 623 00:25:42,420 --> 00:25:43,620 I mean, there are nice command line tools 624 00:25:43,620 --> 00:25:45,180 for everything but the DHCP spoofing, 625 00:25:45,200 --> 00:25:46,260 and the DHCP spoofing, well, 626 00:25:46,380 --> 00:25:48,460 you can use kp or hping or whatever, 627 00:25:48,660 --> 00:25:51,940 or you can just stand up your own DHCP server 628 00:25:51,940 --> 00:25:53,440 that has the same settings as the real one 629 00:25:53,900 --> 00:25:54,900 because they're kind of public. 630 00:25:55,120 --> 00:25:57,180 You can figure out which IPs are taken, 631 00:25:57,280 --> 00:25:58,580 and, you know, go and assign the rest. 632 00:25:58,720 --> 00:25:59,520 You can be really friendly. 633 00:26:00,640 --> 00:26:03,180 You know, I don't know if you guys have seen this, 634 00:26:03,220 --> 00:26:04,760 but I've thought about this, 635 00:26:04,840 --> 00:26:07,340 but this is really kind of the way that DHCP thing works. 636 00:26:07,660 --> 00:26:09,540 If I can beat the DHCP server 637 00:26:09,540 --> 00:26:11,800 and give you an answer before the real one does, 638 00:26:12,420 --> 00:26:13,720 well, everything's going to work just fine 639 00:26:13,720 --> 00:26:15,300 as long as the real DHCP server 640 00:26:15,300 --> 00:26:16,000 doesn't give out your address. 641 00:26:16,480 --> 00:26:19,060 So if I kind of watch what addresses it's giving out 642 00:26:19,060 --> 00:26:20,500 and give you and say, okay, well, 643 00:26:20,580 --> 00:26:22,380 it's not going to get to this last 20 for a while, 644 00:26:22,480 --> 00:26:23,480 so I'll give out those, 645 00:26:23,880 --> 00:26:25,000 it's kind of like this guy, 646 00:26:25,200 --> 00:26:26,420 this happened to my wife like a week ago, 647 00:26:26,580 --> 00:26:28,140 it's kind of like the guy that stands out in the parking lot, 648 00:26:28,280 --> 00:26:30,600 and the parking attendant in that lot, 649 00:26:30,740 --> 00:26:31,740 if there is an attendant, 650 00:26:31,900 --> 00:26:33,580 doesn't really wear a jacket or uniform, 651 00:26:33,740 --> 00:26:34,820 and he just goes up to, you know, 652 00:26:34,820 --> 00:26:36,740 people are parking their cars and says, hey, it's $5, 653 00:26:37,160 --> 00:26:41,640 and, you know, writes them a receipt, and then walks away from the lot, and you get a ticket, and you're like, what the heck? 654 00:26:42,420 --> 00:26:43,480 This is, you know, 655 00:26:44,240 --> 00:26:46,400 yet another way where you're not really quite sure 656 00:26:46,400 --> 00:26:47,180 who you're talking to. 657 00:26:48,000 --> 00:26:48,940 Somebody got friendly. 658 00:26:49,100 --> 00:26:51,100 They said you can have that spot. No problem. 659 00:26:52,160 --> 00:26:52,560 Okay. 660 00:26:53,820 --> 00:26:55,900 So what kinds of things can you do? 661 00:26:56,040 --> 00:26:57,300 I can start injecting clear, 662 00:26:57,380 --> 00:26:59,020 I can inject anything into your traffic. 663 00:26:59,160 --> 00:27:00,960 If it's clear text, I get to inject anything I want. 664 00:27:01,160 --> 00:27:02,460 It's fun. It's really good. 665 00:27:02,540 --> 00:27:03,980 I can inject in both directions. 666 00:27:04,280 --> 00:27:06,160 So I can inject JavaScript into clear text traffic. 667 00:27:06,340 --> 00:27:08,040 I can go and take your session keys. 668 00:27:08,520 --> 00:27:11,360 So, you know, like, HTTP is this really, you know, 669 00:27:11,360 --> 00:27:13,340 web is this really, really crazy little protocol 670 00:27:13,340 --> 00:27:15,120 that kind of was invented as file transfer 671 00:27:15,560 --> 00:27:16,660 for the most part, right? 672 00:27:16,780 --> 00:27:18,420 It was kind of glorified file transfer. 673 00:27:18,520 --> 00:27:20,380 Pretty fast glorified file transfer, 674 00:27:20,460 --> 00:27:22,920 but glorified file transfer with this nice hyperlinking stuff. 675 00:27:23,320 --> 00:27:25,000 And then we've, like, gone and basically 676 00:27:25,000 --> 00:27:26,660 made everything web. 677 00:27:27,260 --> 00:27:29,100 I mean everything, and we'll talk about that, 678 00:27:29,200 --> 00:27:31,520 but we've made everything web, and so that's really nice. 679 00:27:31,620 --> 00:27:33,640 But the thing is, as glorified file transfer, 680 00:27:33,800 --> 00:27:34,940 it doesn't have any state. 681 00:27:35,140 --> 00:27:37,140 So we bolted on this weird thing called cookies 682 00:27:37,140 --> 00:27:39,040 and said, okay, I'm going to, as the server, 683 00:27:39,180 --> 00:27:41,340 I'm going to go and I'm going to tell your browser 684 00:27:41,360 --> 00:27:43,220 hey, every time you talk to me, 685 00:27:43,280 --> 00:27:45,640 I want you to remind me that you're user number 45, 686 00:27:45,780 --> 00:27:46,820 because otherwise I'm not going to know 687 00:27:46,820 --> 00:27:49,540 that you're user number 45, that you're user J. 688 00:27:49,940 --> 00:27:51,900 So I'm going to remember J logged in, 689 00:27:51,900 --> 00:27:52,740 he gave me his password, 690 00:27:53,160 --> 00:27:54,520 and in exchange for his password, 691 00:27:54,600 --> 00:27:56,420 I gave him this session ID, I gave him this cookie, 692 00:27:56,620 --> 00:27:58,320 I gave him this thing, I gave him a number, 693 00:27:58,400 --> 00:28:00,860 I gave him 45, you know, like at a deli counter. 694 00:28:01,060 --> 00:28:03,500 And I said, okay, every time you talk to me, 695 00:28:03,520 --> 00:28:05,360 remind me that you're number 45 so I can remember 696 00:28:05,360 --> 00:28:06,580 that you're J so I don't have to ask you 697 00:28:06,580 --> 00:28:07,580 for your password every single time. 698 00:28:08,260 --> 00:28:10,680 Okay, cool. So we've got these session cookies, 699 00:28:11,360 --> 00:28:13,180 and if anybody watches that number go by, 700 00:28:13,700 --> 00:28:15,760 very much like the deli counter, 701 00:28:16,340 --> 00:28:18,100 or the whatever, or the pharmacy, 702 00:28:18,200 --> 00:28:19,960 or what have you, they can kind of come up 703 00:28:19,960 --> 00:28:21,280 and say, hi, I'm number 45. 704 00:28:21,460 --> 00:28:22,920 And they say, oh, good, I'm so glad to see you, 705 00:28:22,940 --> 00:28:24,540 number 45, here's your prescription. 706 00:28:25,240 --> 00:28:27,320 Right, this is, anyway, it kind of works 707 00:28:27,320 --> 00:28:28,960 very much the same way with web apps. 708 00:28:29,300 --> 00:28:30,840 So if I've got session keys, 709 00:28:30,980 --> 00:28:32,960 if I've got your session keys, if I can see them once, 710 00:28:33,420 --> 00:28:35,100 well, then that means I can start up 711 00:28:35,100 --> 00:28:35,960 my own parallel session. 712 00:28:36,200 --> 00:28:38,040 And some web apps are really nice and actually say, 713 00:28:38,140 --> 00:28:40,080 wait, there's two of you, and I'll knock one of you off, 714 00:28:41,740 --> 00:28:43,040 but you'll probably notice me. 715 00:28:43,340 --> 00:28:45,240 So I guess that's better than if, 716 00:28:45,400 --> 00:28:46,800 like, you know, we're both there 717 00:28:46,800 --> 00:28:49,260 and you never noticed me, but it's still not great. 718 00:28:51,180 --> 00:28:52,400 So there are other things I can do. 719 00:28:52,440 --> 00:28:53,520 I can intercept your logout requests. 720 00:28:53,740 --> 00:28:54,820 So you go and say, logout. 721 00:28:54,900 --> 00:28:56,140 And I'm like, wait, if you log out, 722 00:28:56,260 --> 00:28:58,400 this session hijacking thing 723 00:28:58,400 --> 00:29:00,820 or this session cloning thing doesn't work so well, 724 00:29:00,940 --> 00:29:02,420 so I'm not going to let you log out. 725 00:29:02,520 --> 00:29:04,640 You try to log out, if I'm proxying all your traffic, 726 00:29:04,900 --> 00:29:06,400 if all your traffic's routing through me, 727 00:29:06,520 --> 00:29:07,840 then I'll just say, uh, logouts? 728 00:29:07,840 --> 00:29:10,640 No, I'm not permitting those. And if I know the application 729 00:29:11,360 --> 00:29:13,460 ahead of time, instead of just, you know, 730 00:29:13,480 --> 00:29:15,920 this is one of the things with existing tools, right? 731 00:29:15,980 --> 00:29:17,800 If I know the application ahead of time 732 00:29:17,800 --> 00:29:19,140 and I know this is the logout link, 733 00:29:19,740 --> 00:29:21,480 well, I can just make sure that any time you send 734 00:29:21,480 --> 00:29:23,220 anything that matches this given regular expression, 735 00:29:23,400 --> 00:29:23,940 ooh, reg apps, 736 00:29:25,020 --> 00:29:26,540 then I'm not going to let it go by. 737 00:29:26,660 --> 00:29:28,360 But I'll let everything else you do go by, 738 00:29:28,720 --> 00:29:29,840 just not that one. 739 00:29:30,360 --> 00:29:32,040 Okay, so what else can I do? 740 00:29:32,300 --> 00:29:34,960 I can replace, and this is his idea, 741 00:29:35,140 --> 00:29:36,460 um, um, 742 00:29:37,040 --> 00:29:38,260 it is, I think, 743 00:29:39,440 --> 00:29:41,340 at least, I think I had it 744 00:29:41,360 --> 00:29:42,620 but then I forgot it. 745 00:29:43,000 --> 00:29:44,940 But that's like so many ideas we've all had 746 00:29:44,940 --> 00:29:46,540 because I'm pretty sure every idea I've ever had 747 00:29:46,540 --> 00:29:49,040 somebody else has had before and not just one, 748 00:29:49,120 --> 00:29:50,280 like 15,000. 749 00:29:51,520 --> 00:29:52,960 So anyway, this, this, uh, 750 00:29:53,060 --> 00:29:55,400 I can go through and I can replace HTTPS links 751 00:29:55,400 --> 00:29:56,420 with HTTP links. 752 00:29:56,740 --> 00:29:59,200 And this is something really, really cool. 753 00:29:59,320 --> 00:30:00,860 This is something that we're actually doing, 754 00:30:01,020 --> 00:30:02,340 that we're actually doing in the middler. 755 00:30:03,520 --> 00:30:05,240 This is part of the reason the middler is, 756 00:30:05,280 --> 00:30:06,780 well, not entirely working right now 757 00:30:06,780 --> 00:30:09,100 because we added some functionality at the very last minute. 758 00:30:09,160 --> 00:30:11,220 But, on the other hand, it's cool functionality. 759 00:30:11,360 --> 00:30:11,680 It's better. 760 00:30:11,880 --> 00:30:13,920 So now, um, well, I'll go into it. 761 00:30:13,940 --> 00:30:16,440 I've got a slide on it that talks about exactly how it works. 762 00:30:16,840 --> 00:30:18,580 So the middler basically does this. 763 00:30:19,120 --> 00:30:21,080 The middler has two kinds of modes. 764 00:30:21,560 --> 00:30:22,940 One is an interactive mode. 765 00:30:23,100 --> 00:30:24,900 And that interactive mode is somewhat similar 766 00:30:24,900 --> 00:30:26,820 to existing tools, um, 767 00:30:27,000 --> 00:30:29,380 except that it actually is there to make it 768 00:30:29,380 --> 00:30:30,760 kind of brain-dead easy for you to clone, 769 00:30:30,820 --> 00:30:32,260 for you to clone other people's sessions. 770 00:30:32,440 --> 00:30:34,220 Instead of having to be a web app hacker, 771 00:30:34,260 --> 00:30:35,980 instead of having to be a web app programmer 772 00:30:35,980 --> 00:30:37,840 where somebody really, you know, can follow this, 773 00:30:37,840 --> 00:30:39,140 and it takes a while. 774 00:30:39,300 --> 00:30:41,300 It really does take a little while with some of these apps 775 00:30:41,300 --> 00:30:42,260 to go and profile them and say, 776 00:30:42,320 --> 00:30:43,600 okay, well, these are the cookies I need, 777 00:30:43,660 --> 00:30:45,020 and these are the requests that I need, and so on. 778 00:30:46,440 --> 00:30:48,940 We've spent some time with different apps 779 00:30:48,940 --> 00:30:51,660 and said, okay, this is what's log-in, 780 00:30:51,720 --> 00:30:52,440 this is what's log-out, 781 00:30:52,500 --> 00:30:53,540 these are the session cookies I need, 782 00:30:53,640 --> 00:30:55,620 these are the things, and what we're doing 783 00:30:55,620 --> 00:30:57,400 is basically doing something non-interactive. 784 00:30:57,480 --> 00:30:58,380 But I've gotten ahead of myself. 785 00:30:58,600 --> 00:30:59,820 We've got this interactive thing, 786 00:30:59,960 --> 00:31:01,580 and basically what you can do is 787 00:31:01,580 --> 00:31:05,420 if one person is surfing through the proxy, 788 00:31:06,160 --> 00:31:06,760 unbeknownst to them, 789 00:31:07,380 --> 00:31:09,260 and you're the bad guy who set up the proxy, 790 00:31:09,460 --> 00:31:12,480 you can go to the proxy and clone their session by just, 791 00:31:12,540 --> 00:31:13,240 you know, I can just, 792 00:31:13,280 --> 00:31:14,340 if I'm going through the proxy, 793 00:31:14,400 --> 00:31:16,600 and I'm coming from my IP address, 794 00:31:17,160 --> 00:31:19,080 well, then when I try to go to, you know, 795 00:31:19,080 --> 00:31:20,780 when I try to go to LinkedIn or LiveJournal, 796 00:31:20,860 --> 00:31:22,040 I'll go in as somebody else, 797 00:31:22,200 --> 00:31:23,780 and I can choose the somebody else, 798 00:31:24,020 --> 00:31:25,400 but I can go in as somebody else 799 00:31:25,400 --> 00:31:26,600 that's on the proxy right now, 800 00:31:26,680 --> 00:31:28,240 and maybe as many of them. 801 00:31:28,340 --> 00:31:29,920 So that part we're kind of all used to. 802 00:31:30,180 --> 00:31:33,580 I mean, we don't do that so much, because the existing tools kind of make it easy to watch, 803 00:31:33,720 --> 00:31:35,400 but not so easy to actually, you know, 804 00:31:35,420 --> 00:31:35,920 well, modify. 805 00:31:36,160 --> 00:31:38,660 Again, integrity, not confidentiality. 806 00:31:38,740 --> 00:31:40,560 Well, both, but integrity is really fun. 807 00:31:40,940 --> 00:31:42,600 Okay, or more to the point, attacking it. 808 00:31:43,420 --> 00:31:44,540 So the first part, 809 00:31:44,740 --> 00:31:46,480 so we can do this, this is kind of, 810 00:31:46,500 --> 00:31:47,460 the interactive parts, 811 00:31:47,960 --> 00:31:49,640 the parts that, you know, you're really going to do, 812 00:31:49,720 --> 00:31:51,460 and this is human, this is at human speed, 813 00:31:51,620 --> 00:31:53,880 but I like machine speed better, it's faster. 814 00:31:54,140 --> 00:31:56,380 But at human speed, we can actually go and basically, 815 00:31:56,500 --> 00:31:58,200 you know, we can just clone someone's session 816 00:31:58,200 --> 00:31:59,140 and make that really easy, 817 00:31:59,220 --> 00:32:00,960 and you don't have to go and sit there and figure out 818 00:32:00,960 --> 00:32:03,900 which things you need to clone, which things are being changed, 819 00:32:05,420 --> 00:32:06,700 you can go through that, let the proxy do it for you. 820 00:32:06,820 --> 00:32:08,300 So that's the first thing the middler does, 821 00:32:08,700 --> 00:32:10,680 and it's a useful thing. 822 00:32:10,880 --> 00:32:12,500 We can also just start saying, you know what, 823 00:32:12,640 --> 00:32:15,940 as long as you're going to be able to clone someone's session, 824 00:32:16,040 --> 00:32:17,620 as long as you're going to be able to proxy their session, 825 00:32:17,780 --> 00:32:19,740 and, you know, look at every single bit that comes through 826 00:32:19,740 --> 00:32:20,820 and change whatever you want, 827 00:32:21,040 --> 00:32:23,020 we can actually start going through and injecting JavaScript 828 00:32:23,020 --> 00:32:24,680 and other links into the page. 829 00:32:24,820 --> 00:32:25,700 You can put whatever links you want, 830 00:32:25,840 --> 00:32:28,420 but I like JavaScript because it means you can send somebody 831 00:32:28,420 --> 00:32:29,660 to links they didn't want to go to. 832 00:32:30,680 --> 00:32:32,940 You could put in pictures, as we've all seen, 833 00:32:32,960 --> 00:32:34,620 with some really disgusting pictures. 834 00:32:35,420 --> 00:32:36,860 You can go through and, you know, 835 00:32:36,940 --> 00:32:38,740 and we tend to see it here, 836 00:32:38,900 --> 00:32:40,060 I don't know why that is, 837 00:32:40,160 --> 00:32:43,300 but you can go through and put in your own, 838 00:32:43,380 --> 00:32:45,360 and I like this a lot, because turning off JavaScript 839 00:32:45,360 --> 00:32:47,160 doesn't really save you one bit, this is part of HTTP. 840 00:32:47,460 --> 00:32:49,560 You could go and actually start putting in your own redirects. 841 00:32:50,160 --> 00:32:51,600 So you can say, hey, you know what, 842 00:32:51,680 --> 00:32:54,220 I'm going to decide that every other user, 843 00:32:54,300 --> 00:32:55,700 or only these three users, or whatever, 844 00:32:55,860 --> 00:32:57,460 are going to be redirected to the site of my choice. 845 00:32:57,640 --> 00:32:58,920 And that site of my choice might be, 846 00:32:59,040 --> 00:33:00,760 I don't know, it might be my own vanity site, 847 00:33:00,860 --> 00:33:02,900 but that wouldn't be nearly as fun or nearly as evil. 848 00:33:02,960 --> 00:33:05,400 I could make it a phishing site, but that's not any more fun. 849 00:33:05,420 --> 00:33:06,660 That's not all that much fun. 850 00:33:06,820 --> 00:33:08,320 What I'd really like to do is redirect them to, 851 00:33:08,400 --> 00:33:09,680 I don't know, Metasploit. 852 00:33:09,760 --> 00:33:10,960 Yeah, client-side exploits. 853 00:33:11,180 --> 00:33:12,180 So that would be fun. 854 00:33:12,300 --> 00:33:14,380 Or I could redirect them over to, you know, 855 00:33:14,420 --> 00:33:16,820 anybody heard of Beef, the browser exploitation framework? 856 00:33:17,300 --> 00:33:18,160 That thing's really fun. 857 00:33:18,240 --> 00:33:21,120 This guy, Kevin Johnson, who's taught everybody a lot, 858 00:33:22,000 --> 00:33:23,680 got me really into this idea, 859 00:33:23,840 --> 00:33:26,680 and I'm blown away from some of the demos I've seen. 860 00:33:26,780 --> 00:33:27,960 I need to play with it more myself. 861 00:33:28,340 --> 00:33:29,600 But this is pretty easy. 862 00:33:30,180 --> 00:33:32,420 You know, we can go through and do some of the normal stuff, 863 00:33:32,500 --> 00:33:34,600 like logging the user's whole session, 864 00:33:35,420 --> 00:33:37,380 the middler's actually got some really nice stuff. 865 00:33:37,500 --> 00:33:40,120 Again, trying to go and basically take previous tools 866 00:33:40,120 --> 00:33:42,280 to a really, really different level. 867 00:33:42,480 --> 00:33:44,020 The middler's actually got some stuff in there 868 00:33:44,020 --> 00:33:46,160 so that we can parse out the Excel that's going by. 869 00:33:46,260 --> 00:33:47,240 We can parse out JSON. 870 00:33:47,740 --> 00:33:49,780 JSON is JavaScript Object Notation. 871 00:33:49,840 --> 00:33:52,300 It's like what Google uses to send your mail back and forth. 872 00:33:52,600 --> 00:33:53,620 So if you can parse it, 873 00:33:53,720 --> 00:33:55,880 it gets a whole lot easier to read somebody else's mail 874 00:33:55,880 --> 00:33:58,080 or throw some in there or delete some or whatever. 875 00:33:58,360 --> 00:34:00,040 But we're making it so that the intent 876 00:34:00,040 --> 00:34:01,460 is to make it really, really easy, 877 00:34:02,000 --> 00:34:03,500 not only for you to do this interactively, 878 00:34:03,980 --> 00:34:05,400 but for you to add onto it. 879 00:34:05,420 --> 00:34:06,520 Because that's the idea. 880 00:34:06,680 --> 00:34:08,480 It's like, I'm this kind of weird open-source guy, 881 00:34:08,640 --> 00:34:10,420 and, well, this is open-source attack tools. 882 00:34:10,560 --> 00:34:13,280 So I'm going to tell you that it's going to be really easy. 883 00:34:13,440 --> 00:34:15,560 I'm not going to get to write documentation this weekend 884 00:34:15,560 --> 00:34:16,700 by far about how to do it, 885 00:34:16,760 --> 00:34:18,220 but it's going to be pretty easy for you 886 00:34:18,220 --> 00:34:19,080 to add more and more sites. 887 00:34:20,700 --> 00:34:22,380 The really fun stuff to me, though, 888 00:34:22,420 --> 00:34:24,480 also is this kind of doing some site-specific features. 889 00:34:25,000 --> 00:34:26,620 And this is a little weird, because you say, 890 00:34:26,680 --> 00:34:28,900 wait, I can do all this with a browser, 891 00:34:29,000 --> 00:34:30,860 but I'm going to kind of go into some of the stuff you might do. 892 00:34:32,060 --> 00:34:34,640 So the first is, suppose Gmail and Webmail. 893 00:34:34,840 --> 00:34:35,400 Gmail, you can do that. 894 00:34:35,420 --> 00:34:36,700 Yahoo Mail, all the different Webmails. 895 00:34:37,180 --> 00:34:39,160 Most of these Webmails all basically leave 896 00:34:39,160 --> 00:34:40,520 almost the entire session clear text, 897 00:34:40,660 --> 00:34:42,780 which means, ding-ding, we can all have fun with them. 898 00:34:43,020 --> 00:34:44,700 So what kinds of things might you do with Gmail? 899 00:34:45,420 --> 00:34:46,800 Well, you might read the user's email, 900 00:34:46,920 --> 00:34:47,960 which is kind of the obvious. 901 00:34:48,260 --> 00:34:50,540 And by read the user's email, it'll just mean their email, 902 00:34:50,600 --> 00:34:53,220 the email that they're reading, but also all their other email, 903 00:34:53,340 --> 00:34:54,220 and go through the folders. 904 00:34:54,600 --> 00:34:57,260 And part of the intent of the middler is to go and say, 905 00:34:57,380 --> 00:34:58,940 listen, why do this at human speed? 906 00:34:59,060 --> 00:35:00,080 Let's do this programmatically. 907 00:35:00,180 --> 00:35:03,320 Let's say, listen, if I'm watching Justin read his Gmail, 908 00:35:03,740 --> 00:35:04,220 it's nice. 909 00:35:04,220 --> 00:35:06,100 I can go and click on a link and see what his message is 910 00:35:06,100 --> 00:35:07,980 and all that, and I hit compose and send a message. 911 00:35:08,180 --> 00:35:08,660 Yeah, whatever. 912 00:35:09,340 --> 00:35:11,600 What I really want to do is just harvest all of his messages 913 00:35:11,600 --> 00:35:13,560 all at once, and I want to do it before I even knew about it. 914 00:35:13,600 --> 00:35:16,300 I want to do it while I'm off drinking or whatever it is I do, 915 00:35:16,340 --> 00:35:18,180 eating sushi, because I don't really drink so much, 916 00:35:18,220 --> 00:35:19,360 but sushi, that I do. 917 00:35:20,100 --> 00:35:23,040 But so I want to make that really, really, really easy. 918 00:35:23,860 --> 00:35:24,620 And that's the intent. 919 00:35:24,800 --> 00:35:25,920 We're basically automating the... 920 00:35:26,520 --> 00:35:27,560 I don't want to use that word. 921 00:35:27,620 --> 00:35:29,580 Okay, so we're automating the... 922 00:35:30,620 --> 00:35:31,440 That's a bad word, too. 923 00:35:32,740 --> 00:35:33,740 Gee, I don't have any... 924 00:35:34,220 --> 00:35:35,460 How do you not curse at DEF CON? 925 00:35:35,660 --> 00:35:37,220 Yeah, we're automating the crap out of it. 926 00:35:38,120 --> 00:35:38,760 Absolutely, positively. 927 00:35:39,400 --> 00:35:41,460 Anyway, so you can go through and you can read their email, 928 00:35:41,560 --> 00:35:42,400 but you can go beyond that. 929 00:35:42,460 --> 00:35:44,040 As long as you're logged into Google as them 930 00:35:44,460 --> 00:35:45,780 and you didn't need their password, 931 00:35:45,960 --> 00:35:47,040 you're just writing their session. 932 00:35:47,180 --> 00:35:48,060 Why not do a whole bunch more? 933 00:35:48,160 --> 00:35:49,800 Why not read all their past Google Talk conversations? 934 00:35:50,560 --> 00:35:52,100 I think about that and I think, oh, gosh, 935 00:35:52,200 --> 00:35:54,480 I've used Google Talk with my wife, my friends, my coworkers. 936 00:35:55,860 --> 00:35:57,800 And why not harvest their whole address book? 937 00:35:57,980 --> 00:36:00,020 I mean, we probably don't care about that so much, 938 00:36:00,120 --> 00:36:01,380 but if you were a professional spammer, 939 00:36:01,440 --> 00:36:02,680 a professional phisher, a professional... 940 00:36:02,680 --> 00:36:04,140 Well, if you wanted to send clients 941 00:36:04,140 --> 00:36:05,420 side exploits to all of their friends 942 00:36:05,420 --> 00:36:06,580 or all of their coworkers or whatever, 943 00:36:06,700 --> 00:36:07,640 that might be really useful, too. 944 00:36:08,060 --> 00:36:09,360 And we could send our own emails. 945 00:36:09,500 --> 00:36:10,300 We can do that programmatically, 946 00:36:10,320 --> 00:36:11,440 so we can send tons of emails. 947 00:36:11,620 --> 00:36:12,760 And they all look like they came from this guy 948 00:36:12,760 --> 00:36:14,640 and he can't prove that it wasn't him, right? 949 00:36:15,080 --> 00:36:16,420 You follow the headers and you're like, 950 00:36:16,480 --> 00:36:17,460 yeah, this was absolutely him. 951 00:36:17,640 --> 00:36:18,980 You can go and profile the user 952 00:36:18,980 --> 00:36:20,220 in all the other Google applications. 953 00:36:20,420 --> 00:36:20,700 Awesome. 954 00:36:21,120 --> 00:36:22,200 You can profile the user 955 00:36:22,200 --> 00:36:23,380 in all the other Google applications. 956 00:36:23,560 --> 00:36:25,320 And since you can prevent that, 957 00:36:25,400 --> 00:36:26,840 since you can prevent him from logging out, 958 00:36:27,000 --> 00:36:28,200 he thinks he's logged out 959 00:36:28,200 --> 00:36:29,280 and you're gonna keep using that session 960 00:36:29,280 --> 00:36:31,060 for a long, long, long time. 961 00:36:31,500 --> 00:36:33,480 When I start thinking about all the Google applications, 962 00:36:33,660 --> 00:36:34,120 I really get the feeling that, 963 00:36:34,140 --> 00:36:35,480 when I get scared, I love Google. 964 00:36:35,700 --> 00:36:37,080 I love all the stuff they give me. 965 00:36:37,140 --> 00:36:38,760 They give me all this wonderful functionality, 966 00:36:39,040 --> 00:36:40,440 most of it through my browser 967 00:36:40,440 --> 00:36:41,500 and even through my phone. 968 00:36:41,620 --> 00:36:42,500 That's really, really cool. 969 00:36:42,920 --> 00:36:44,040 But every so often I think, 970 00:36:44,120 --> 00:36:46,940 gosh, wow, you know, if I were Google, 971 00:36:47,840 --> 00:36:50,180 I'd have a lot of information on a lot of people. 972 00:36:50,720 --> 00:36:53,260 You know, I'd almost wanna sell that stuff. 973 00:36:53,460 --> 00:36:54,280 But if I didn't sell it, 974 00:36:54,300 --> 00:36:55,900 maybe I'd just one day be like, 975 00:36:55,980 --> 00:36:57,080 you know, screw this ad stuff. 976 00:36:57,400 --> 00:36:58,440 We're gonna be an intelligence agency 977 00:36:58,440 --> 00:36:59,620 because we already know it all. 978 00:36:59,780 --> 00:37:02,220 I mean, we don't know it, but it's all in there. 979 00:37:02,320 --> 00:37:03,880 We just have to mine through it and find it all. 980 00:37:04,940 --> 00:37:06,960 Anyway, hopefully Google won't get mad at me 981 00:37:06,960 --> 00:37:09,260 and publish all of my stuff on the internet somewhere 982 00:37:09,260 --> 00:37:10,640 or, you know, whatever. 983 00:37:10,800 --> 00:37:12,400 But be nice. 984 00:37:13,060 --> 00:37:15,460 Okay, so it's kind of crazy. 985 00:37:15,660 --> 00:37:19,360 Imagine not so much what happens if, you know, 986 00:37:19,460 --> 00:37:21,300 don't think so much about what would happen 987 00:37:21,300 --> 00:37:23,960 if somebody could get to your Google data, right? 988 00:37:24,040 --> 00:37:25,480 Because you're like, no, I'm too smart for that. 989 00:37:25,600 --> 00:37:26,780 I would never use Gmail for anything 990 00:37:26,780 --> 00:37:28,520 that wasn't absolutely public, right? 991 00:37:28,560 --> 00:37:29,960 I know you're all like that. I'm not. 992 00:37:30,320 --> 00:37:33,320 So why don't you think instead about what would happen 993 00:37:33,320 --> 00:37:36,300 if you could get to all of my Google data? 994 00:37:36,640 --> 00:37:39,020 What would happen if you could get to those docs 995 00:37:39,020 --> 00:37:40,700 and those spreadsheets and, you know, 996 00:37:40,740 --> 00:37:42,600 my email and my chat conversations 997 00:37:42,600 --> 00:37:45,960 and my bookmarks and my browsing history? 998 00:37:46,360 --> 00:37:47,700 I mean, Google will show you your own, 999 00:37:47,820 --> 00:37:50,720 so as long as you're cloning somebody's session, 1000 00:37:50,900 --> 00:37:51,900 why not look at theirs? 1001 00:37:52,280 --> 00:37:53,900 I mean, you know, mine, I guess. 1002 00:37:54,120 --> 00:37:56,720 So please be nice when you're looking at all of it 1003 00:37:56,720 --> 00:37:57,960 and, you know, keep it to yourself. 1004 00:37:58,320 --> 00:37:59,800 It'll be just between you and me 1005 00:37:59,800 --> 00:38:02,500 and you and you and you and you. 1006 00:38:04,160 --> 00:38:05,620 Okay. But this is bad. 1007 00:38:05,740 --> 00:38:07,140 You shouldn't do it, so please don't go 1008 00:38:07,140 --> 00:38:08,260 and do this stuff to me. 1009 00:38:08,460 --> 00:38:10,780 Please. Please. Pretty please. 1010 00:38:11,040 --> 00:38:12,020 So other sites. 1011 00:38:12,300 --> 00:38:14,440 I think LiveJournal's a really fun one to think about, too. 1012 00:38:14,640 --> 00:38:16,140 This is one of the reasons I targeted it 1013 00:38:16,560 --> 00:38:18,420 as one of the first sites to do this within the tool. 1014 00:38:18,780 --> 00:38:21,300 And LiveJournal really shows you the power of... 1015 00:38:21,300 --> 00:38:23,360 I think LiveJournal really shows you the power 1016 00:38:23,360 --> 00:38:24,700 of doing this programmatically. 1017 00:38:25,200 --> 00:38:26,280 LiveJournal's a blogging site, 1018 00:38:26,400 --> 00:38:28,140 but to call LiveJournal another blogging site 1019 00:38:28,140 --> 00:38:31,220 is kind of really underestimating what it does. 1020 00:38:31,520 --> 00:38:33,300 People think of LiveJournal as a private thing. 1021 00:38:33,300 --> 00:38:35,860 I don't know. Who in here has actually got a LiveJournal? 1022 00:38:35,960 --> 00:38:38,560 I know we're all kind of getting older, so it's... 1023 00:38:38,560 --> 00:38:40,740 Oh, more of you do than that. I read some of yours. 1024 00:38:41,080 --> 00:38:44,320 Okay. So this LiveJournal thing can get really popular, 1025 00:38:45,220 --> 00:38:47,860 especially, you know, especially among, you know, young adults. 1026 00:38:47,980 --> 00:38:50,600 But basically, LiveJournal's this blogging site 1027 00:38:50,600 --> 00:38:53,340 where people kind of expect that a lot of their blog posts will be private. 1028 00:38:53,640 --> 00:38:56,560 They mark their blog posts as just for me, you know? 1029 00:38:56,560 --> 00:38:58,640 It's like your own little journal site and your own little diary. 1030 00:38:58,800 --> 00:39:01,580 But they also mark their posts as just for me and my friends. 1031 00:39:01,920 --> 00:39:03,160 My friends can know this. 1032 00:39:03,300 --> 00:39:05,160 But nobody else can, because this is really embarrassing. 1033 00:39:05,320 --> 00:39:08,560 I don't want everyone to know about how drunk I got last weekend or whatever it was. 1034 00:39:08,880 --> 00:39:10,240 But they can actually do something else. 1035 00:39:10,280 --> 00:39:13,220 I started finding out from my friends who use LiveJournal far more than I do, 1036 00:39:13,260 --> 00:39:16,320 because I've logged into it, like, I don't know, you know, once a month or something. 1037 00:39:16,860 --> 00:39:19,400 But, you know, I've talked to people, and they have all these filters set up. 1038 00:39:19,500 --> 00:39:21,100 They say, this is one group of friends, this is one group of friends, 1039 00:39:21,180 --> 00:39:22,500 this is another group of friends, this is another group of friends. 1040 00:39:22,720 --> 00:39:25,400 This group can know about my career, but this group can't. 1041 00:39:25,400 --> 00:39:27,260 And this group can know about my sex life, but this group can't. 1042 00:39:27,260 --> 00:39:30,120 And so on and so on and so on. I'm serious. I'm serious. 1043 00:39:30,360 --> 00:39:31,860 I could... I could... Yeah. 1044 00:39:32,600 --> 00:39:33,160 So, anyway... 1045 00:39:34,620 --> 00:39:37,920 But they have this expectation of privacy, and yet it's also clear text, 1046 00:39:38,100 --> 00:39:40,480 which means you could programmatically, with a proxy, 1047 00:39:40,620 --> 00:39:41,860 if you could get them to surf through the proxy, 1048 00:39:41,960 --> 00:39:45,260 which just means you have to be on a, you know, on a wireless network with them, 1049 00:39:45,300 --> 00:39:47,640 which, oh, is that ever going to happen with somebody who blogs? 1050 00:39:48,340 --> 00:39:49,780 People got to blog from everywhere, right? 1051 00:39:50,360 --> 00:39:54,400 So, you know, you can go through and read their private and their friends-only journal entries, 1052 00:39:54,540 --> 00:39:55,600 but you can do more than that. 1053 00:39:55,640 --> 00:39:57,280 You could go and make them all public if you wanted to. 1054 00:39:57,880 --> 00:39:58,900 You could make some of them public. 1055 00:39:58,980 --> 00:40:02,620 You could make some of them that aren't supposed to be seen by one of their groups of friends 1056 00:40:02,620 --> 00:40:03,120 visible. 1057 00:40:03,300 --> 00:40:06,620 You know, to that group of people who would be offended or what have you. 1058 00:40:06,760 --> 00:40:08,540 You could go through and harvest their friends list, 1059 00:40:08,720 --> 00:40:10,840 and then go look at all of their friends' private posts. 1060 00:40:11,140 --> 00:40:13,720 And if you did this programmatically, which is what we do in the Midler, 1061 00:40:14,500 --> 00:40:18,400 you'd get a lot of it really fast, and it would be kind of fun. 1062 00:40:19,120 --> 00:40:21,500 Anyway, you could even start, you know, you could even give yourself more privilege. 1063 00:40:21,600 --> 00:40:24,300 You could add your, you know, you could add your own user to the victims list, 1064 00:40:24,480 --> 00:40:26,240 and now we've got something like Sammy all over again. 1065 00:40:26,600 --> 00:40:30,520 And there have been some really great talks about social networking at Black Hat and DEF CON this year, 1066 00:40:30,600 --> 00:40:31,460 and yes. 1067 00:40:32,580 --> 00:40:33,220 So, LinkedIn. 1068 00:40:33,300 --> 00:40:33,980 LinkedIn's another good one. 1069 00:40:34,060 --> 00:40:34,840 Same kind of thing. 1070 00:40:35,100 --> 00:40:36,600 Just imagine the same kind of thing. 1071 00:40:36,680 --> 00:40:39,560 It's just we all kind of have this expectation of LinkedIn that, you know, 1072 00:40:40,380 --> 00:40:40,980 Justin's my friend. 1073 00:40:41,020 --> 00:40:41,840 He can have my phone number. 1074 00:40:42,160 --> 00:40:43,220 He can have all my phone numbers. 1075 00:40:43,240 --> 00:40:44,260 He can have my home phone number. 1076 00:40:44,300 --> 00:40:44,700 That's okay. 1077 00:40:44,800 --> 00:40:46,800 But I'm not sure that I want everyone to have it. 1078 00:40:46,860 --> 00:40:48,500 That's, you know, so whatever. 1079 00:40:51,480 --> 00:40:52,760 I want to go a little bit further. 1080 00:40:52,900 --> 00:40:53,840 What's wrong with this picture? 1081 00:40:54,600 --> 00:40:57,940 This is actually pretty hard to see, but this is ClearText Banking site. 1082 00:40:58,100 --> 00:40:58,920 This is a ClearText. 1083 00:40:59,040 --> 00:40:59,740 This is U.S. Bank. 1084 00:41:00,040 --> 00:41:01,640 This is the front page of their site. 1085 00:41:01,800 --> 00:41:02,120 Okay? 1086 00:41:02,180 --> 00:41:02,820 It's ClearText. 1087 00:41:03,300 --> 00:41:07,660 But you'll note, and I've blown it up a bit, there's some locks over here where you put 1088 00:41:07,660 --> 00:41:08,560 in your personal ID. 1089 00:41:09,000 --> 00:41:09,280 Okay? 1090 00:41:09,340 --> 00:41:10,280 This is where you put in your username. 1091 00:41:10,400 --> 00:41:12,600 And there are locks, and those locks are there to make you feel very safe. 1092 00:41:13,140 --> 00:41:13,420 Okay. 1093 00:41:13,740 --> 00:41:15,260 So, why are they there to make you feel safe? 1094 00:41:15,340 --> 00:41:19,640 Well, that, this form where you put your login ID, it's encrypted. 1095 00:41:19,880 --> 00:41:20,220 It's okay. 1096 00:41:20,320 --> 00:41:20,900 It's SSL. 1097 00:41:21,020 --> 00:41:22,240 So, we're all supposed to feel safe. 1098 00:41:22,360 --> 00:41:25,780 And I remember back when I did feel safe with that, and I felt really dumb once I figured 1099 00:41:25,780 --> 00:41:26,140 it out. 1100 00:41:26,420 --> 00:41:27,400 I said, wait a second. 1101 00:41:27,500 --> 00:41:32,600 What if, since you, how to go, since you went to ClearText site first, doesn't that mean 1102 00:41:32,600 --> 00:41:33,180 that that? 1103 00:41:33,300 --> 00:41:36,540 That SSL page, that, that SSL link doesn't have to be SSL? 1104 00:41:36,620 --> 00:41:40,340 And you may not even ever know it wasn't SSL, and most of us don't look for it. 1105 00:41:40,400 --> 00:41:42,540 I mean, honestly, Justin, you made a good point. 1106 00:41:42,700 --> 00:41:43,900 You made a good point about this. 1107 00:41:45,180 --> 00:41:46,900 He said, wait, I'm a security guy. 1108 00:41:47,060 --> 00:41:47,360 Great. 1109 00:41:47,580 --> 00:41:52,780 He said, I'm a security guy, and I don't always notice if it's gone SSL or not. 1110 00:41:52,960 --> 00:41:53,820 I don't, I don't always notice. 1111 00:41:54,060 --> 00:41:58,380 I, I'm, okay, just so I'm not just making fun of him, I don't always notice. 1112 00:41:58,680 --> 00:41:59,040 Okay? 1113 00:41:59,180 --> 00:42:03,220 I found out how much was ClearText by sticking an outbound, sticking this little, 1114 00:42:03,300 --> 00:42:05,820 little snitch outbound firewall on my machine and saying, what? 1115 00:42:07,220 --> 00:42:07,540 Okay. 1116 00:42:07,640 --> 00:42:11,820 So, anyway, this is a banking site that, you know, if you wanted to, you could fool 1117 00:42:11,820 --> 00:42:15,200 a tremendous number of people into just, well, never going encrypted. 1118 00:42:15,800 --> 00:42:19,620 And this is actually, this is actually something, let's see, yeah, we have it here. 1119 00:42:19,900 --> 00:42:24,540 This is what, this is what the middler does, and this is one of Justin's big contributions. 1120 00:42:24,740 --> 00:42:26,200 So, yeah, you should speak to it, because I keep talking. 1121 00:42:26,300 --> 00:42:26,620 Yeah, not a problem. 1122 00:42:27,340 --> 00:42:30,360 So, originally, Jay had this nice, beautiful, beautiful program. 1123 00:42:31,720 --> 00:42:32,460 Nice little thing. 1124 00:42:32,580 --> 00:42:33,200 It came up. 1125 00:42:33,300 --> 00:42:34,340 And, well, it's Python. 1126 00:42:34,500 --> 00:42:34,840 It's beautiful. 1127 00:42:36,020 --> 00:42:39,600 And he asked me to go ahead and, and if I could help him out, try to finish up some 1128 00:42:39,600 --> 00:42:42,800 of the nice functionality for the nice demo for, for everybody here at DEF CON. 1129 00:42:42,980 --> 00:42:43,900 And I said, sure, why not? 1130 00:42:44,060 --> 00:42:44,860 Good friend that I am. 1131 00:42:45,280 --> 00:42:49,640 Get out my nice little ice pick and start reverse engineering some programs, trying 1132 00:42:49,640 --> 00:42:52,020 to, to get some nice little point and click stuff in there for everybody. 1133 00:42:52,180 --> 00:42:54,700 And we started this nice little conversation. 1134 00:42:54,920 --> 00:42:59,300 I was like, hey, Jay, you know, your, your concept right now is, is we have these secure 1135 00:42:59,300 --> 00:43:02,940 websites and, and your tool only works if the first page is. 1136 00:43:03,580 --> 00:43:03,900 Unsecure. 1137 00:43:04,320 --> 00:43:05,220 If it's unencrypted. 1138 00:43:06,060 --> 00:43:10,880 And your solution to try to gain some additional information is we're just going to head and 1139 00:43:10,880 --> 00:43:15,300 try to inject some JavaScript, do some other tricks that, that everybody's really heard. 1140 00:43:16,360 --> 00:43:18,760 And, and that was kind of the, the backbone of the, the tool. 1141 00:43:18,980 --> 00:43:20,700 And honestly, part of it was I was just going to wait. 1142 00:43:20,860 --> 00:43:23,760 I was like, wait, they're going to go through the encrypted part and then they'll be clear 1143 00:43:23,760 --> 00:43:24,140 text again. 1144 00:43:24,860 --> 00:43:26,420 But Justin said we didn't have to wait. 1145 00:43:26,560 --> 00:43:27,140 But wait a minute. 1146 00:43:27,260 --> 00:43:29,820 We're, we're already man in the middle in them. 1147 00:43:29,900 --> 00:43:31,420 We have control of their connections. 1148 00:43:31,500 --> 00:43:32,780 All their traffic's floating through us. 1149 00:43:33,300 --> 00:43:39,000 What if, when they go to that clear text password, or clear text first page, we never let them 1150 00:43:39,000 --> 00:43:40,140 get to HTTPS? 1151 00:43:40,780 --> 00:43:45,980 In the, in the middle, we go ahead and we rewrite all the hrefs inside the page so that they 1152 00:43:45,980 --> 00:43:46,920 don't have the S. 1153 00:43:47,160 --> 00:43:50,480 And, and, and that was where I said to Justin, wait, there's a problem. 1154 00:43:50,660 --> 00:43:55,080 I've been on lots of apps where, you know, you try to, you try to go clear text and it 1155 00:43:55,080 --> 00:43:57,640 says, no, no, no, this part of the application is only available encrypted. 1156 00:43:58,860 --> 00:44:01,480 So, we allowed the proxy to go ahead and stay encrypted. 1157 00:44:01,860 --> 00:44:03,280 And we basically created. 1158 00:44:03,300 --> 00:44:06,200 We created a proxy that strips out SSL for the client. 1159 00:44:06,420 --> 00:44:07,780 And then it kind of keeps track. 1160 00:44:07,980 --> 00:44:12,200 Well, right now, in a kind of stupid sin cookie kind of way, but it kind of keeps track of 1161 00:44:12,200 --> 00:44:16,160 all the things that it, all the things that it changed from SSL to not so SSL. 1162 00:44:16,240 --> 00:44:18,540 All these links that used to be SSL that aren't SSL anymore. 1163 00:44:18,660 --> 00:44:22,220 It's like, wait, I know that whenever the user surfs to one of those, when they come 1164 00:44:22,220 --> 00:44:26,300 through me, I got to go and make sure that I change them around again, make them SSL 1165 00:44:26,300 --> 00:44:26,500 again. 1166 00:44:26,620 --> 00:44:29,420 So, we've got this kind of little kludge, but we kind of like it. 1167 00:44:29,520 --> 00:44:30,460 It, it, it works. 1168 00:44:30,960 --> 00:44:33,280 Which is, we just take the URL that was in the link. 1169 00:44:33,300 --> 00:44:33,700 It's SSL. 1170 00:44:33,780 --> 00:44:35,920 And we throw a little, we throw a little cookie in. 1171 00:44:36,060 --> 00:44:37,500 We were going to do a random number. 1172 00:44:37,620 --> 00:44:38,700 And we probably will eventually. 1173 00:44:38,880 --> 00:44:40,820 But right now, we just, it was proof of concept. 1174 00:44:40,860 --> 00:44:42,120 We did secure four. 1175 00:44:42,840 --> 00:44:46,000 And, you know, so we said to the proxy, he says, okay, if the user's trying to surf 1176 00:44:46,000 --> 00:44:50,100 to something through me, and I see this, and I see secure four, I know that that means 1177 00:44:50,100 --> 00:44:54,120 I'm supposed to go and pull the secure four out and make sure that I do that session encrypted. 1178 00:44:54,460 --> 00:44:55,560 User never needs to do that. 1179 00:44:55,680 --> 00:44:57,200 We're going to keep things just as they are. 1180 00:44:57,300 --> 00:44:57,760 Hunky dory. 1181 00:44:57,860 --> 00:44:58,640 And it works really well. 1182 00:44:58,820 --> 00:45:03,220 And honestly, I'm going to tell you, I, I love my family, but they're not IT people. 1183 00:45:03,300 --> 00:45:04,440 And none of them will ever know the difference. 1184 00:45:05,160 --> 00:45:07,120 Which is really sad, because I'm really working on it. 1185 00:45:07,200 --> 00:45:08,440 But I'm just not that good a teacher. 1186 00:45:09,100 --> 00:45:09,420 Okay. 1187 00:45:10,380 --> 00:45:14,320 So, yeah, the only, and then the only problem we really have left is, is most of us are 1188 00:45:14,320 --> 00:45:15,960 actually typing in the URLs that are by hand. 1189 00:45:16,160 --> 00:45:19,420 A lot of the secure websites that we're actually going to, most of us go ahead and just type 1190 00:45:19,420 --> 00:45:20,040 the, the domain. 1191 00:45:20,200 --> 00:45:21,140 And, and it pops right up. 1192 00:45:21,160 --> 00:45:22,780 And it redirects us over to the HTTPS. 1193 00:45:23,780 --> 00:45:26,760 But occasionally, we have bookmarks that go directly to HTTPS. 1194 00:45:27,480 --> 00:45:29,860 Or occasionally, we'll actually type in the HTTPS. 1195 00:45:31,040 --> 00:45:33,140 So, the solution for that is we. 1196 00:45:33,300 --> 00:45:37,480 We either simply wait for them to go ahead and have the application drop them back out 1197 00:45:37,480 --> 00:45:38,580 or move over to another website. 1198 00:45:38,840 --> 00:45:41,780 Or if you really want, you can go ahead and, and give them a self-signed certificate and, 1199 00:45:41,840 --> 00:45:42,800 and broadcast to the world. 1200 00:45:42,840 --> 00:45:43,640 Say, hey, I'm right here. 1201 00:45:43,760 --> 00:45:46,540 But we all know that, how many people actually pay attention to that little thing. 1202 00:45:47,160 --> 00:45:47,520 Absolutely. 1203 00:45:47,640 --> 00:45:49,760 But, so we have multiple, multiple different options there. 1204 00:45:49,880 --> 00:45:54,340 But, given enough time, that person will eventually drop out of SSL mode. 1205 00:45:54,480 --> 00:45:57,500 Eventually find something to click on that is back in SSL mode. 1206 00:45:57,680 --> 00:45:59,780 And we'll prevent him from ever going back in. 1207 00:45:59,980 --> 00:46:00,340 Okay. 1208 00:46:00,460 --> 00:46:01,500 Now, we're running low on time. 1209 00:46:01,620 --> 00:46:02,760 So, I've skipped a couple slides. 1210 00:46:02,760 --> 00:46:06,480 But, I want to get out of just the application, out of the web application space. 1211 00:46:07,620 --> 00:46:09,700 There's something else that, there's something else I realized. 1212 00:46:09,820 --> 00:46:13,300 And that was, I have a whole lot of software that updates, that self-updates. 1213 00:46:13,380 --> 00:46:17,000 A tremendous amount of software on this laptop right here that's self-updating all the time. 1214 00:46:17,280 --> 00:46:20,160 And the first time I thought about it, I was like, wow, if anybody were to sniff the wire, 1215 00:46:20,340 --> 00:46:22,680 they could find out, like, what versions of software I'm running. 1216 00:46:22,940 --> 00:46:24,480 They'd figure out which ones were vulnerable. 1217 00:46:24,640 --> 00:46:28,280 And they could even send me client-set exploits specifically targeted to the vulnerable software that I have. 1218 00:46:28,640 --> 00:46:30,720 And since they're watching me try to update, 1219 00:46:30,820 --> 00:46:32,620 and they know that update's going to take, like, 20 minutes to, 1220 00:46:32,760 --> 00:46:35,820 they can do it while I'm still downloading the update. 1221 00:46:36,020 --> 00:46:37,080 How about a race condition there? 1222 00:46:37,500 --> 00:46:37,900 Right? 1223 00:46:37,960 --> 00:46:38,900 So, that's really, really fun. 1224 00:46:39,140 --> 00:46:41,040 And we've been kind of watching this. 1225 00:46:41,120 --> 00:46:42,500 We've started looking more and more at this. 1226 00:46:42,640 --> 00:46:46,240 And there have actually been, I started looking at this and I said, wait, my iPhone. 1227 00:46:46,740 --> 00:46:50,580 My iPhone's got this, okay, so, any Apple people in the crowd? 1228 00:46:52,380 --> 00:46:54,740 Could you guys, like, plug your ears? 1229 00:46:55,860 --> 00:46:58,000 So, I might have jailbroken my iPhone. 1230 00:46:58,460 --> 00:47:02,220 And it's possible, or it might have happened to me while I wasn't looking. 1231 00:47:03,200 --> 00:47:07,140 Because I went to, actually, I probably surfed to a vulnerable, 1232 00:47:07,480 --> 00:47:10,900 I probably surfed to a website that was supposed to be all nice, 1233 00:47:11,020 --> 00:47:13,180 but it had an image file that was, you know, bad. 1234 00:47:14,380 --> 00:47:15,140 It was bad. 1235 00:47:15,360 --> 00:47:17,580 And so, my machine, it got hacked. 1236 00:47:17,680 --> 00:47:21,000 But one of the things I learned with this installer.app thing that was really, really cool, 1237 00:47:21,100 --> 00:47:24,460 I mean, the baddie who hacked my phone, he left me this installer.app thing. 1238 00:47:24,560 --> 00:47:26,680 And, you know, a love for sushi. 1239 00:47:26,900 --> 00:47:32,520 And I realized, wait a second, installer.app, it's like pulling down a software catalog in clear text. 1240 00:47:33,440 --> 00:47:34,340 That's really cool. 1241 00:47:34,520 --> 00:47:35,320 I can man in the middle of that. 1242 00:47:35,400 --> 00:47:36,960 Now I can put whatever software I want on the iPhone. 1243 00:47:37,380 --> 00:47:39,220 Well, I mean, I already could, but I'm a baddie. 1244 00:47:39,240 --> 00:47:41,040 So, now I can change the software that's going on. 1245 00:47:41,400 --> 00:47:44,400 Because if you can do the catalog, if you can man in the middle of the catalog, 1246 00:47:44,700 --> 00:47:47,300 then you can actually choose where all the software comes from. 1247 00:47:47,700 --> 00:47:51,120 And there's some college students, one of them doing this dissertation on it, 1248 00:47:51,640 --> 00:47:55,120 who basically figured out that he could do this to a whole bunch of open source distributions. 1249 00:47:55,560 --> 00:47:56,320 And what else? 1250 00:47:56,360 --> 00:47:56,880 Yeah, we can do it. 1251 00:47:57,040 --> 00:47:58,440 So, we're doing it for software installation. 1252 00:47:58,680 --> 00:47:59,840 We're doing it for software updates. 1253 00:47:59,980 --> 00:48:00,900 Start watching your software updates. 1254 00:48:00,960 --> 00:48:01,800 You'll be really, really scared. 1255 00:48:01,800 --> 00:48:04,100 The other thing is, you could exploit vulnerable browsers. 1256 00:48:04,280 --> 00:48:06,660 And if you want to exploit vulnerable browsers, it's really, really nice for man in the middle people. 1257 00:48:06,820 --> 00:48:07,840 Because they think they're going to CNN. 1258 00:48:07,980 --> 00:48:10,520 They think they're going to their own bank site. 1259 00:48:10,760 --> 00:48:11,360 And, wow. 1260 00:48:12,260 --> 00:48:13,100 I didn't do that. 1261 00:48:13,280 --> 00:48:13,880 I didn't do that. 1262 00:48:14,200 --> 00:48:14,920 Did they kill them both? 1263 00:48:15,060 --> 00:48:15,800 Oh, here you go, Jay. 1264 00:48:17,320 --> 00:48:18,100 You won't get it.