1 00:00:02,700 --> 00:00:05,720 Wow, I wish I hadn't said that to him. 2 00:00:06,840 --> 00:00:11,700 What I was talking about before I came up is that this year was the third Black Hat talk I did. 3 00:00:11,880 --> 00:00:15,920 This is my first at DEF CON and I'm a thousand times more nervous about this. 4 00:00:20,100 --> 00:00:26,040 I've been coming since about DC 10 and I'm always amazed here. 5 00:00:26,040 --> 00:00:32,160 I always learn so much and I'm really honored and really stoked and really amazed to be standing up here. 6 00:00:32,260 --> 00:00:33,820 And a little freaked out, so I'll do my best. 7 00:00:36,580 --> 00:00:39,020 Sorry for the Black Hat slides. I suck. 8 00:00:39,520 --> 00:00:44,100 I was going to put DC logos and I was up way too late last night. Sorry. 9 00:00:45,600 --> 00:00:52,140 So who am I? I'm a security consultant, which means that I deal with a lot of people who get owned. 10 00:00:52,740 --> 00:00:55,340 That's kind of a lot of the job if you do this stuff for a living. 11 00:00:56,880 --> 00:01:00,780 I work for a company called Spiritipic Technologies, which is in St. Louis. 12 00:01:02,440 --> 00:01:05,140 We do forensics a lot. We do incident response a lot. 13 00:01:05,600 --> 00:01:07,600 So like I say, deal with people who get owned a lot. 14 00:01:08,220 --> 00:01:10,060 And weddings, funerals, bar mitzvahs. 15 00:01:11,300 --> 00:01:15,620 I like unsolvable problems, so to me defense is a little more interesting. 16 00:01:16,880 --> 00:01:18,600 I have to deal with the other side too. 17 00:01:18,740 --> 00:01:24,940 I think people who really understand this stuff understand that the sort of binary distinction is 18 00:01:24,940 --> 00:01:25,540 . . . 19 00:01:26,040 --> 00:01:27,120 A little bit simplistic. 20 00:01:27,540 --> 00:01:28,960 So my hat color is fuchsia. 21 00:01:32,060 --> 00:01:33,440 Something that I want to say here. 22 00:01:33,560 --> 00:01:39,080 I've talked to a lot of, especially in the past couple of days, a lot of people who develop exploits. 23 00:01:39,260 --> 00:01:42,420 A lot of really elite, really, really smart, really, really awesome people. 24 00:01:42,700 --> 00:01:43,920 I'm not one of those people. 25 00:01:45,080 --> 00:01:48,080 This is my attempt to understand this topic as a normal human. 26 00:01:49,620 --> 00:01:54,780 So the picture of me right there, actually, just to maybe help you out with that, 27 00:01:54,780 --> 00:01:57,160 is me running the New York Marathon. 28 00:01:57,340 --> 00:02:00,500 And I finished kind of somewhere in the bottom third. 29 00:02:00,820 --> 00:02:02,820 And this has been kind of a marathon too. 30 00:02:03,100 --> 00:02:04,840 Sort of my attempt to understand this stuff. 31 00:02:05,080 --> 00:02:07,900 And hopefully I'll kind of come a little closer to the middle of the pack. 32 00:02:08,040 --> 00:02:08,360 We'll see. 33 00:02:10,620 --> 00:02:11,160 So yeah. 34 00:02:11,260 --> 00:02:13,940 I mean, basically like right now with VISTA, 35 00:02:15,220 --> 00:02:22,060 we're really getting Mike Howard and these guys shouting from the rooftops that buffer overflow, zero days, 36 00:02:22,200 --> 00:02:24,520 that there's going to be a lot of new stuff. 37 00:02:24,520 --> 00:02:26,340 That's supposed to make this stuff a lot harder to do. 38 00:02:28,000 --> 00:02:32,300 For me, it seems like we're in kind of a flailing death loop in the security business 39 00:02:32,300 --> 00:02:36,120 of patches and signatures for sale on a subscription basis. 40 00:02:36,480 --> 00:02:38,420 And things never really seem to get any better. 41 00:02:39,040 --> 00:02:40,500 Did anybody go to Bruce Potter's talk? 42 00:02:41,200 --> 00:02:42,360 Has that been yet? 43 00:02:42,600 --> 00:02:43,040 Yeah. 44 00:02:43,100 --> 00:02:47,200 I mean, basically, to me, the security industry is kind of a racket. 45 00:02:48,000 --> 00:02:51,800 They really don't have an interest in making anything any better in the long term 46 00:02:51,800 --> 00:02:53,500 or really getting to the root of the problem. 47 00:02:53,500 --> 00:02:57,460 So this is kind of for one very specific kind of attack vector. 48 00:02:57,900 --> 00:03:00,380 This is kind of my attempt to understand kind of the root of the problem. 49 00:03:00,560 --> 00:03:07,280 So basically what we're talking about, I get asked by a lot of people, like, what's your talk on? 50 00:03:07,740 --> 00:03:08,740 And I'm like, oh, shit. 51 00:03:09,160 --> 00:03:14,540 ASLR, no exec stacks, pro police, canaries, access control models. 52 00:03:14,880 --> 00:03:19,240 And so it seems like the prevailing term that seems to make sense is exploit mitigation. 53 00:03:20,420 --> 00:03:23,480 That seems to be kind of pretty easy. 54 00:03:23,500 --> 00:03:24,760 It's a pretty easy way to describe what this stuff is. 55 00:03:25,480 --> 00:03:28,380 So it's a range of compiler, OS features, library features 56 00:03:28,980 --> 00:03:32,260 that intend to make successful compromise a little more difficult. 57 00:03:33,960 --> 00:03:38,780 One of the kind of the main aims and really that's kind of what a lot of this stuff is about 58 00:03:38,780 --> 00:03:41,660 is to make mass exploitation a little less difficult. 59 00:03:41,840 --> 00:03:46,740 It isn't necessarily something that's going to protect a concerted effort 60 00:03:46,740 --> 00:03:50,120 to go after a unique single system. 61 00:03:50,400 --> 00:03:52,620 But it does kind of make, 62 00:03:53,500 --> 00:03:55,600 things that are sort of reusable a little harder to do. 63 00:03:56,440 --> 00:04:00,740 And then, you know, sort of fundamentally a lot of this is about limiting our exposure 64 00:04:01,340 --> 00:04:03,760 from overall kind of memory corruption-based attacks, 65 00:04:03,960 --> 00:04:09,360 which is kind of a blanket term to describe, you know, stack-based overflows, heap overflows, 66 00:04:09,560 --> 00:04:11,540 return ellipses, all the, you know, kind of all this stuff. 67 00:04:13,160 --> 00:04:16,640 So, yeah, so we're pretty much talking about no exec stacks, ASLR, canaries, 68 00:04:17,680 --> 00:04:18,840 some compile time stuff. 69 00:04:18,920 --> 00:04:20,220 A lot of these things are compiler extensions. 70 00:04:21,140 --> 00:04:23,080 And I'm going to talk about a couple other 71 00:04:23,500 --> 00:04:24,280 containment models too. 72 00:04:25,780 --> 00:04:28,860 Yeah, so again, if you're elite, you're in the wrong room. 73 00:04:29,600 --> 00:04:30,620 Go somewhere else. 74 00:04:31,160 --> 00:04:33,520 Let the humans and the normals talk for a little bit, you know. 75 00:04:34,640 --> 00:04:38,440 This is basically just my attempt to understand this stuff 76 00:04:38,440 --> 00:04:41,720 and some of the implications, you know, that are out there. 77 00:04:42,580 --> 00:04:46,200 And, you know, like I say, this is something I kind of got interested in about six months ago. 78 00:04:47,960 --> 00:04:49,780 What got me kind of on it was, 79 00:04:50,380 --> 00:04:52,280 and I talk about this a little bit in the paper, 80 00:04:53,440 --> 00:04:55,280 was working a big yellow outbreak 81 00:04:57,380 --> 00:05:00,040 and looking at that and a couple other recent Windows exploits 82 00:05:00,040 --> 00:05:01,760 where it was like, well, wait a minute. 83 00:05:01,820 --> 00:05:03,940 Aren't they telling us that, you know, this is all fixed now? 84 00:05:04,140 --> 00:05:07,640 We've got the GS extensions to Visual Studio and all that 85 00:05:07,640 --> 00:05:10,200 and, you know, this is supposed to be solved. 86 00:05:10,360 --> 00:05:11,200 We've got depth, you know. 87 00:05:12,620 --> 00:05:13,920 So we're all supposed to be safe. 88 00:05:13,980 --> 00:05:14,940 It's all supposed to be so much better. 89 00:05:17,020 --> 00:05:19,100 So just to kind of like rewind way back, 90 00:05:19,280 --> 00:05:21,000 and this has been my attempt to understand this stuff. 91 00:05:21,000 --> 00:05:24,280 Okay, like ten people know who these guys are at least, right? 92 00:05:25,020 --> 00:05:25,380 Anyone? 93 00:05:26,120 --> 00:05:26,480 Bueller? 94 00:05:27,800 --> 00:05:28,160 No? 95 00:05:29,040 --> 00:05:30,580 All right, I'm just not cool enough to. 96 00:05:30,780 --> 00:05:31,660 Did somebody say it? 97 00:05:32,940 --> 00:05:35,840 Yeah, it's actually, I looked for KNR. 98 00:05:35,940 --> 00:05:37,240 I couldn't find a picture of KNR together. 99 00:05:37,380 --> 00:05:38,420 So this is Thompson and Ritchie. 100 00:05:39,720 --> 00:05:40,080 Sorry. 101 00:05:40,360 --> 00:05:41,580 But you're close. 102 00:05:41,760 --> 00:05:42,400 You get a cookie. 103 00:05:44,100 --> 00:05:47,140 Yeah, and I think Ritchie is the guy with the Phil Collins kind of hair, 104 00:05:47,240 --> 00:05:48,720 you know, with the bald on top deal. 105 00:05:49,500 --> 00:05:50,520 But, you know, I mean, 106 00:05:51,000 --> 00:05:53,500 I think something fundamentally to this whole kind of problem, 107 00:05:53,740 --> 00:05:54,760 and, you know, there's, 108 00:05:55,960 --> 00:05:58,320 if you read Joanna Rakowska's blog, 109 00:05:58,520 --> 00:06:01,740 there's an entry there talking about, you know, game over. 110 00:06:01,860 --> 00:06:04,980 Like how do you get past this stuff in a fundamental way? 111 00:06:05,180 --> 00:06:09,780 And I think kind of the prevailing thought is that we really need to change the computing model 112 00:06:09,780 --> 00:06:13,080 and kind of look at some new, like, different ways to approach this. 113 00:06:13,720 --> 00:06:16,520 But, you know, KNR, when they were designing this stuff, 114 00:06:17,280 --> 00:06:20,400 your adversary, your attacker, that's the guy at the other teletype, right? 115 00:06:21,000 --> 00:06:22,600 So you can elbow him and say, hey, cut it out, dude. 116 00:06:22,860 --> 00:06:25,900 You know, so now it's an entirely different model 117 00:06:25,900 --> 00:06:27,480 from what they ever expected things to be. 118 00:06:29,240 --> 00:06:32,260 And, you know, so fundamentally the class of bugs has been around, 119 00:06:32,380 --> 00:06:35,460 you know, longer than, you know, probably almost everyone in this room. 120 00:06:36,500 --> 00:06:39,060 You know, at least since the 1960s, 121 00:06:39,060 --> 00:06:42,780 we've kind of understood some of this stuff in terms of high-level languages 122 00:06:42,780 --> 00:06:44,320 and how they deal with things. 123 00:06:45,080 --> 00:06:49,280 It is something that's kind of intrinsic to the Von Neumann model. 124 00:06:49,380 --> 00:06:50,640 So Von Neumann, 125 00:06:51,140 --> 00:06:53,100 kind of created the data code abstraction. 126 00:06:53,440 --> 00:06:56,260 So when you are back in the early... 127 00:06:56,260 --> 00:06:57,860 He was a Manhattan Project guy 128 00:06:57,860 --> 00:07:01,000 and he was involved in, like, UNIVAC and some of these things. 129 00:07:01,140 --> 00:07:05,000 And on the early, early systems, to get new code, 130 00:07:05,080 --> 00:07:06,860 you had to re-solder, right? 131 00:07:06,960 --> 00:07:07,880 I mean, that's how it worked. 132 00:07:08,160 --> 00:07:10,480 And that was a less than elegant way to do things. 133 00:07:10,600 --> 00:07:12,860 So Von Neumann kind of came up with the data code abstraction. 134 00:07:13,140 --> 00:07:15,320 So you have, you know, code and you have instructions 135 00:07:15,320 --> 00:07:16,440 and then you have data. 136 00:07:17,440 --> 00:07:20,840 And it's the breaking of that membrane between the two. 137 00:07:21,000 --> 00:07:22,220 That is what a lot of this stuff is about. 138 00:07:24,000 --> 00:07:25,280 So, yeah, some of the cool... 139 00:07:25,280 --> 00:07:27,280 I always like Fandango on core. 140 00:07:27,440 --> 00:07:28,560 I don't know why they didn't take off. 141 00:07:28,860 --> 00:07:33,360 You know, like MSO 546 Fandango on core in ISS or IS, 142 00:07:33,840 --> 00:07:35,120 you know, would be kind of neat. 143 00:07:35,180 --> 00:07:37,180 But everybody kind of went for buffer overflows. 144 00:07:37,620 --> 00:07:39,040 And it's a less than perfect term. 145 00:07:39,160 --> 00:07:40,540 And if you talk to a lot of people, 146 00:07:40,900 --> 00:07:43,220 they'll talk about the specifics that it's, you know... 147 00:07:43,780 --> 00:07:45,100 It's not the best definition, 148 00:07:45,180 --> 00:07:47,160 but it seems to be what we all kind of use to refer to it. 149 00:07:49,620 --> 00:07:49,940 So... 150 00:07:49,940 --> 00:07:52,960 In trying to go back and, like, understand, like, 151 00:07:53,040 --> 00:07:54,420 how far back kind of this stuff goes, 152 00:07:54,540 --> 00:07:57,840 the Morris worm was... 153 00:07:58,520 --> 00:08:00,480 One of the vectors that Morris used to spread 154 00:08:00,480 --> 00:08:03,980 was a stack-based overflow in FingerD in the gets call. 155 00:08:04,800 --> 00:08:07,640 And it's actually bug ID number two on security focus. 156 00:08:08,420 --> 00:08:10,380 Bug ID one was sendmel debug, 157 00:08:10,540 --> 00:08:11,500 which was, like, the other vector. 158 00:08:11,560 --> 00:08:13,700 And it's like, yeah, okay, sendmel bug first one in bug track. 159 00:08:13,740 --> 00:08:14,800 Makes sense. Cool. Okay. 160 00:08:15,900 --> 00:08:17,040 And here's what's interesting. 161 00:08:17,040 --> 00:08:20,320 In Gene Spafford's analysis of it, 162 00:08:21,060 --> 00:08:22,980 he says that, you know, 163 00:08:22,980 --> 00:08:24,280 the lack of balance checking in C, 164 00:08:24,780 --> 00:08:26,360 the gets call and the scanf call, 165 00:08:27,300 --> 00:08:29,160 you know, and some of the other unsafe calls in C 166 00:08:29,160 --> 00:08:29,980 should be avoided. 167 00:08:30,400 --> 00:08:32,660 So the answer is, yeah, we've known about this 168 00:08:32,660 --> 00:08:34,200 for about 19 years at least, 169 00:08:34,220 --> 00:08:35,560 that somebody's quantified it and said, 170 00:08:35,600 --> 00:08:36,860 hey, fundamentally, this is a problem. 171 00:08:39,680 --> 00:08:41,480 So between Morris, 172 00:08:42,120 --> 00:08:45,360 there were a lot of system vulnerabilities back then 173 00:08:45,360 --> 00:08:46,600 that were not that complex. 174 00:08:47,040 --> 00:08:49,360 There were things like really bad coding, 175 00:08:49,580 --> 00:08:51,720 you know, stuff like, you know, 176 00:08:51,720 --> 00:08:53,300 entering bad input. 177 00:08:53,560 --> 00:08:54,720 I think there was, like, a VAX bug 178 00:08:54,720 --> 00:08:56,800 where it's, like, hitting enter a couple times 179 00:08:56,800 --> 00:08:58,480 or something drops you into a login. 180 00:08:58,660 --> 00:08:59,760 Like, silly stuff like that. 181 00:09:00,120 --> 00:09:03,200 So things got a little better on the basic stuff. 182 00:09:03,760 --> 00:09:04,740 In about 95, 183 00:09:05,060 --> 00:09:06,720 Thomas Lepatic found 184 00:09:06,720 --> 00:09:08,360 a stack-based overflow 185 00:09:08,960 --> 00:09:09,700 posted at the bug track 186 00:09:10,140 --> 00:09:12,160 in the NCSA HDBD. 187 00:09:12,420 --> 00:09:14,400 And what was kind of cool for me about it 188 00:09:14,400 --> 00:09:16,160 was he said, hey, this looks like the Morris worm bug. 189 00:09:17,040 --> 00:09:17,480 It's the same thing. 190 00:09:18,720 --> 00:09:20,920 And the thing I guess I would say about Lepatic 191 00:09:20,920 --> 00:09:23,280 was the reason that was so much more interesting, 192 00:09:23,380 --> 00:09:24,440 right, was that 193 00:09:24,440 --> 00:09:26,820 it was this, we were just starting to begin 194 00:09:26,820 --> 00:09:29,200 the commercial internet and all the interconnectivity 195 00:09:29,200 --> 00:09:31,100 and all these other connections between different networks 196 00:09:31,100 --> 00:09:32,140 and it was, like, 197 00:09:32,800 --> 00:09:34,720 a whole different problem then, right? 198 00:09:34,820 --> 00:09:35,880 And it's a problem where, you know, 199 00:09:35,880 --> 00:09:38,540 we're all sort of getting our brains around still, right? 200 00:09:38,840 --> 00:09:40,880 So Mudge wrote a paper 201 00:09:40,880 --> 00:09:43,240 in 95 that was kind of like one of the first ones. 202 00:09:43,380 --> 00:09:44,840 It actually does predate LF1. 203 00:09:45,820 --> 00:09:46,920 It's really, like, kind of like 204 00:09:47,040 --> 00:09:47,960 scratched on the back of a napkin. 205 00:09:48,140 --> 00:09:50,320 But, you know, he describes it as a note to himself, 206 00:09:50,440 --> 00:09:51,780 but it's how to write buffer overflows. 207 00:09:51,860 --> 00:09:53,280 You can find it out on, you know, 208 00:09:53,300 --> 00:09:55,620 if you're an antiquarian like I am, 209 00:09:55,660 --> 00:09:56,620 you can find it in a lot of places. 210 00:09:58,680 --> 00:09:59,780 So, and then LF1 211 00:10:01,900 --> 00:10:02,540 obviously has, 212 00:10:03,200 --> 00:10:04,840 well, I already asked the elite people to leave, 213 00:10:04,920 --> 00:10:06,980 but how many people here have read Smashing the Stack? 214 00:10:07,200 --> 00:10:08,740 Does it qualify as elite? 215 00:10:09,220 --> 00:10:10,020 Wow. Oh, shit. 216 00:10:11,080 --> 00:10:11,980 So, like I say, 217 00:10:12,360 --> 00:10:13,580 this is just my attempt to understand it. 218 00:10:13,740 --> 00:10:16,260 I read it, like, a long, long time ago 219 00:10:17,040 --> 00:10:17,460 and I kind of got into, 220 00:10:18,200 --> 00:10:19,720 like I say, I kind of talk about this in the paper, 221 00:10:19,920 --> 00:10:22,120 but I got into the security industry, 222 00:10:22,380 --> 00:10:23,960 you know, for good or bad. 223 00:10:25,260 --> 00:10:25,920 You know, so, 224 00:10:26,500 --> 00:10:28,640 honestly, like most people in that 225 00:10:28,640 --> 00:10:30,580 business, with the exception of the really cool, 226 00:10:30,640 --> 00:10:31,320 really elite people here, 227 00:10:33,160 --> 00:10:34,940 I'm not writing exploits. 228 00:10:34,980 --> 00:10:36,840 I kind of got my hand around it a little bit, 229 00:10:36,880 --> 00:10:38,040 kind of started to understand it, 230 00:10:38,140 --> 00:10:40,580 and then I circled back to it, like about six months ago, 231 00:10:40,620 --> 00:10:42,380 and I was like, okay, I've learned a little bit. 232 00:10:42,440 --> 00:10:43,620 I kind of understand it a little better now. 233 00:10:43,960 --> 00:10:46,160 But, you know, he talks about memory segments, 234 00:10:47,040 --> 00:10:48,320 stack, it's always a good place to start. 235 00:10:49,660 --> 00:10:51,020 And, you know, the data code abstraction, 236 00:10:52,500 --> 00:10:53,060 you know, 237 00:10:53,080 --> 00:10:54,820 kind of really started to fine-tune and describe, 238 00:10:54,960 --> 00:10:56,940 like, creating shell code, some of this kind of stuff. 239 00:10:58,340 --> 00:10:58,620 Then, 240 00:10:58,640 --> 00:11:00,880 Solar Designer, in 241 00:11:00,880 --> 00:11:02,860 97, just a little bit, you know, around the same time, 242 00:11:02,920 --> 00:11:04,960 there was a lot of activity in kind of understanding this problem 243 00:11:04,960 --> 00:11:06,800 around them. Talked about 244 00:11:07,100 --> 00:11:09,020 return to libc, because he had authored a 245 00:11:09,020 --> 00:11:10,640 patch, there was no exec patch 246 00:11:11,380 --> 00:11:12,100 for Linux kernel. 247 00:11:13,960 --> 00:11:14,980 And he said, hey, wait a minute, 248 00:11:15,080 --> 00:11:15,920 you know, I broke my own stuff. 249 00:11:17,040 --> 00:11:18,460 You know, here's a whole other kind of method, 250 00:11:18,540 --> 00:11:20,580 which is just basically preloaded functions, 251 00:11:20,740 --> 00:11:22,120 libraries, and things like that in memory. 252 00:11:23,960 --> 00:11:24,800 So, and then 253 00:11:25,360 --> 00:11:26,400 99, the woo-woo guys, 254 00:11:28,000 --> 00:11:28,740 you know, the 255 00:11:28,740 --> 00:11:30,780 woo-woo on heap overflows paper was kind of one of the 256 00:11:30,780 --> 00:11:32,540 first really detailed papers on heap overflows. 257 00:11:32,600 --> 00:11:34,880 There were some other ones around the 258 00:11:34,880 --> 00:11:36,880 same time, so if anybody wrote them, 259 00:11:37,000 --> 00:11:39,020 like, don't mean to not give credit. 260 00:11:40,080 --> 00:11:40,900 But, kind of the 261 00:11:40,900 --> 00:11:42,020 same thing, you know, talking about 262 00:11:42,840 --> 00:11:44,880 that the heap is another method, it's another area of 263 00:11:44,880 --> 00:11:46,660 memory, and so when you're talking about overriding memory 264 00:11:47,040 --> 00:11:48,780 corruption vulnerabilities, you know, 265 00:11:48,780 --> 00:11:49,840 there's basically kind of 266 00:11:50,940 --> 00:11:52,880 the, really the kind of the three main 267 00:11:52,880 --> 00:11:54,920 targets that you're talking about are preloaded 268 00:11:54,920 --> 00:11:56,880 functions, doing 269 00:11:56,880 --> 00:11:58,920 execution on the stack, or writing to the heap. 270 00:11:59,780 --> 00:12:00,220 So, 271 00:12:00,920 --> 00:12:03,020 okay, so I could talk about this the whole 272 00:12:03,020 --> 00:12:05,060 time, and maybe you'd 273 00:12:05,060 --> 00:12:06,960 all fall asleep. To me, it's kind of interesting 274 00:12:06,960 --> 00:12:08,540 stuff, kind of the history of all this. 275 00:12:09,620 --> 00:12:10,900 But, kind of the point 276 00:12:10,900 --> 00:12:12,880 is that the approaches 277 00:12:12,880 --> 00:12:14,980 kind of have evolved, and 278 00:12:14,980 --> 00:12:15,740 you know, 279 00:12:17,040 --> 00:12:18,920 there is a lot of, a lot more 280 00:12:18,920 --> 00:12:20,840 complexity to this, but sort of 281 00:12:20,840 --> 00:12:22,960 fundamentally, you've got two or three places that you're targeting, 282 00:12:23,100 --> 00:12:24,720 and that's kind of what this is about. The vectors, 283 00:12:26,300 --> 00:12:26,800 you know, 284 00:12:26,800 --> 00:12:28,760 kind of are the same for exploitation. 285 00:12:29,080 --> 00:12:30,640 So, this is 286 00:12:30,640 --> 00:12:32,920 National Vulnerability Database, remote buffer 287 00:12:32,920 --> 00:12:34,720 overflows. So just remote, no locals. 288 00:12:36,100 --> 00:12:36,740 Up to 289 00:12:36,740 --> 00:12:38,400 06, because that was kind of the end of the year. 290 00:12:39,120 --> 00:12:40,960 And there are some questions about the stats 291 00:12:40,960 --> 00:12:42,780 they use. You know, they count different 292 00:12:42,780 --> 00:12:44,780 Linux distributions separately, and all of that. 293 00:12:44,840 --> 00:12:46,940 But, you know, fundamentally, I mean, this has continued to be 294 00:12:47,040 --> 00:12:48,640 a problem. It's continued to be a bigger problem. 295 00:12:49,000 --> 00:12:51,020 You know, and I guess for me, 296 00:12:51,060 --> 00:12:52,800 you know, the reason I'm, you know, 297 00:12:52,820 --> 00:12:54,200 I really would like to see us 298 00:12:55,660 --> 00:12:57,000 start to concentrate on 299 00:12:57,000 --> 00:12:58,940 you know, some of the other problems 300 00:12:58,940 --> 00:13:00,940 out there, in terms of 301 00:13:00,940 --> 00:13:02,600 you know, end users, desktops, 302 00:13:03,520 --> 00:13:04,960 you know, the client end, and all these 303 00:13:04,960 --> 00:13:06,840 other areas. And it's like, we're still stuck in this, like, 304 00:13:06,860 --> 00:13:09,000 90s loop, you know. So, this is, 305 00:13:09,040 --> 00:13:10,900 you know, this is old stuff. And in fact, actually, like, 306 00:13:10,960 --> 00:13:12,920 I find when I talk to people that work 307 00:13:12,920 --> 00:13:14,900 on this stuff, it's kind of boring anymore. Like, oh, 308 00:13:14,940 --> 00:13:16,160 network, you know, network based, 309 00:13:17,040 --> 00:13:18,840 you know, overflows. That's dull. 310 00:13:19,020 --> 00:13:20,940 You know. But it still goes on. 311 00:13:21,060 --> 00:13:22,740 It's still a very common method of exploitation. 312 00:13:23,560 --> 00:13:24,920 And we still see lots of bugs 313 00:13:24,920 --> 00:13:25,680 in it. So. 314 00:13:27,860 --> 00:13:28,640 So, you know, 315 00:13:28,660 --> 00:13:30,560 at a very, very high level, and again, 316 00:13:30,640 --> 00:13:32,900 this is just my attempt to understand these things. 317 00:13:33,900 --> 00:13:34,860 What you've got is 318 00:13:34,860 --> 00:13:36,680 unexpected input and unchecked allocation 319 00:13:36,680 --> 00:13:39,120 of memory somewhere. You write to the stack, you write to the heap, 320 00:13:39,240 --> 00:13:40,900 you call preloaded functions, you move 321 00:13:40,900 --> 00:13:42,960 execution to that, and you end up with 322 00:13:42,960 --> 00:13:44,640 control execution flow. I mean, that's 323 00:13:44,640 --> 00:13:46,940 sort of fundamentally. And the best 324 00:13:47,040 --> 00:13:48,540 way I ever had it described to me, like, 325 00:13:49,880 --> 00:13:51,000 quite a while ago was, 326 00:13:51,060 --> 00:13:52,660 you know, ten pounds of crap in a five pound bag. 327 00:13:53,060 --> 00:13:55,020 You know. So, you've allocated to memory 328 00:13:55,020 --> 00:13:56,560 and then there's more input than was expected. 329 00:13:58,580 --> 00:14:00,700 So, kind of the first place that 330 00:14:00,700 --> 00:14:02,820 things went in terms of dealing with this stuff 331 00:14:03,860 --> 00:14:04,220 was, 332 00:14:04,820 --> 00:14:07,000 you know, the no exec stack stuff, 333 00:14:07,080 --> 00:14:08,780 which is sort of saying, back on like the 334 00:14:08,780 --> 00:14:10,260 Von Neumann stuff, there's a data layer, 335 00:14:10,640 --> 00:14:12,640 there's a code layer, there's data segments, code segments, 336 00:14:12,760 --> 00:14:14,400 you know. So, let's keep them separate. 337 00:14:15,240 --> 00:14:15,600 So, 338 00:14:17,580 --> 00:14:18,720 the, you know, basic 339 00:14:18,720 --> 00:14:20,760 kind of concept of a no exec stack 340 00:14:20,760 --> 00:14:22,740 implementation is that 341 00:14:22,740 --> 00:14:24,320 you have a data buffer 342 00:14:24,940 --> 00:14:27,080 where you take input from programs 343 00:14:27,080 --> 00:14:28,960 and allocated memory that you're using 344 00:14:28,960 --> 00:14:31,080 and you make 345 00:14:31,080 --> 00:14:32,220 that segment kind of read-write, 346 00:14:32,660 --> 00:14:35,060 and then you have code segments that are read-execute. 347 00:14:35,220 --> 00:14:37,000 So, just, you know, keep them separate. 348 00:14:39,160 --> 00:14:40,980 So, the Solaris 349 00:14:40,980 --> 00:14:42,580 stuff, and this is, 350 00:14:43,380 --> 00:14:44,960 you know, what's funny to me is I 351 00:14:44,960 --> 00:14:46,940 used to do a lot of Solaris hardening and Solaris 352 00:14:47,040 --> 00:14:48,700 work, like, a lot of years ago, and people used to say, 353 00:14:48,780 --> 00:14:50,740 oh, you know, we're so cool on Sun because 354 00:14:50,740 --> 00:14:52,420 we've got the no exec bit. 355 00:14:52,740 --> 00:14:53,680 You know, and 356 00:14:54,440 --> 00:14:56,620 the truth is that it really did 357 00:14:56,620 --> 00:14:58,880 almost no good. I mean, it's been described as a speed bump, 358 00:14:59,000 --> 00:15:00,620 you know, by itself. But, 359 00:15:00,700 --> 00:15:02,740 you know, that was kind of one of the first implementations. 360 00:15:03,140 --> 00:15:05,040 And then, you know, nowadays 361 00:15:05,040 --> 00:15:06,560 we kind of circle back to that 362 00:15:07,380 --> 00:15:08,160 on the 363 00:15:08,800 --> 00:15:10,200 AMD64 platform, and 364 00:15:11,260 --> 00:15:12,700 specifically, it actually is, it's 365 00:15:12,700 --> 00:15:14,880 page address extensions, which give you a 366 00:15:14,880 --> 00:15:16,820 more kind of granular paging model 367 00:15:17,040 --> 00:15:18,960 in memory. And there's 368 00:15:18,960 --> 00:15:20,400 a bit that's 369 00:15:20,400 --> 00:15:22,820 bit 63 that you set to 0 or 1 370 00:15:22,820 --> 00:15:24,780 for a given page, and that kind of sets the execute bit. 371 00:15:25,800 --> 00:15:26,680 Something that 372 00:15:27,860 --> 00:15:29,020 is pretty important, 373 00:15:29,180 --> 00:15:30,680 and we'll get to it here in a little bit, 374 00:15:30,800 --> 00:15:32,840 is that, by itself, 375 00:15:33,060 --> 00:15:34,380 the CPU is not doing anything. 376 00:15:34,880 --> 00:15:36,960 You have to have operating system hooks into 377 00:15:36,960 --> 00:15:38,900 it, and the implementation of how you hook into that 378 00:15:38,900 --> 00:15:41,020 is pretty important in terms of 379 00:15:41,020 --> 00:15:42,480 how sound it works as a 380 00:15:43,400 --> 00:15:44,720 protection mechanism. So, 381 00:15:44,780 --> 00:15:46,220 the CPU itself is not doing squat. 382 00:15:47,040 --> 00:15:48,160 If you don't have hooks into it, 383 00:15:48,740 --> 00:15:49,680 it's just sitting there. 384 00:15:51,100 --> 00:15:52,840 So, and then on the emulation software 385 00:15:52,840 --> 00:15:54,740 stuff, Solr, 386 00:15:54,800 --> 00:15:56,860 the no exec stack patch stuff, the stack 387 00:15:56,860 --> 00:15:58,360 patch for Linux was kind of the first stuff. 388 00:15:59,160 --> 00:16:00,840 OpenBSD's done the WXRX stuff. 389 00:16:02,100 --> 00:16:02,820 ExecShield is 390 00:16:02,820 --> 00:16:04,860 Red Hat's implementation packs, which is very 391 00:16:04,860 --> 00:16:06,780 cool. And then on Windows, 392 00:16:06,840 --> 00:16:08,320 you've got the dynamic execution 393 00:16:08,320 --> 00:16:10,780 prevention, right? And 394 00:16:10,780 --> 00:16:12,900 I guess on 64 versus 395 00:16:12,900 --> 00:16:14,960 32, you're really, typically on a 396 00:16:14,960 --> 00:16:17,020 32-bit platform, it's really just in the 397 00:16:17,040 --> 00:16:19,040 software. So, what you're 398 00:16:19,040 --> 00:16:20,880 really doing there is just kind of drawing a line in the sand 399 00:16:20,880 --> 00:16:22,860 and saying, this sort of section 400 00:16:22,860 --> 00:16:24,420 of memory, this segment, and 401 00:16:24,900 --> 00:16:26,780 divided, depending on the implementation, 402 00:16:27,000 --> 00:16:28,700 they divide it in different places, but it's saying, 403 00:16:28,780 --> 00:16:30,940 this area of memory is for data, this area 404 00:16:30,940 --> 00:16:31,420 is for code. 405 00:16:33,580 --> 00:16:34,620 One of the things about 406 00:16:34,620 --> 00:16:37,020 no exec stacks, and I have a friend who's a Java 407 00:16:37,020 --> 00:16:38,980 developer, and he always gets annoyed with me when I talk 408 00:16:38,980 --> 00:16:40,920 about this, and that I'm interested in it, 409 00:16:40,960 --> 00:16:43,020 because in Java, this is what you do all 410 00:16:43,020 --> 00:16:44,940 day long, is create code 411 00:16:44,940 --> 00:16:47,020 on the stack. And that's 412 00:16:47,040 --> 00:16:49,000 what a JIT compiler and things like 413 00:16:49,000 --> 00:16:50,580 that do, is they actually break the model. 414 00:16:50,860 --> 00:16:52,440 That's by definition, that's what you're doing. 415 00:16:53,220 --> 00:16:55,000 So, one of the things about that 416 00:16:55,000 --> 00:16:56,960 is that the different operating systems have had 417 00:16:56,960 --> 00:16:57,480 to have 418 00:16:58,640 --> 00:17:01,000 a mechanism somehow to exempt those things, 419 00:17:02,120 --> 00:17:02,880 and allow 420 00:17:02,880 --> 00:17:04,300 them to not sort of 421 00:17:04,820 --> 00:17:05,680 play by the rules. 422 00:17:07,880 --> 00:17:08,320 So, 423 00:17:09,220 --> 00:17:10,900 with the no exec stack, the vulnerability 424 00:17:10,900 --> 00:17:11,520 is still there, 425 00:17:13,240 --> 00:17:15,000 and we kind of talked about 426 00:17:15,000 --> 00:17:16,680 heap and return to libc and things like that. 427 00:17:17,240 --> 00:17:18,840 You just sort of reduce what's 428 00:17:18,840 --> 00:17:20,520 possible. So, probably the most important thing is 429 00:17:20,520 --> 00:17:21,060 return to libc. 430 00:17:23,000 --> 00:17:23,440 You 431 00:17:24,660 --> 00:17:26,780 basically call a pre-existing function to memory, 432 00:17:26,920 --> 00:17:28,780 something else is loaded. The reason 433 00:17:28,780 --> 00:17:30,880 it gets called return to libc is that libc 434 00:17:30,880 --> 00:17:32,880 includes a lot of common calls that will allow 435 00:17:32,880 --> 00:17:34,800 you to 436 00:17:34,800 --> 00:17:36,900 exec commands or things like that. 437 00:17:36,960 --> 00:17:38,780 System.insh was always the 438 00:17:38,780 --> 00:17:39,820 example in some of the early stuff. 439 00:17:42,000 --> 00:17:42,980 Most of the things 440 00:17:42,980 --> 00:17:44,820 that talk about breaking out of 441 00:17:44,820 --> 00:17:46,420 NX sort of come down to this. 442 00:17:47,960 --> 00:17:48,360 Another 443 00:17:49,060 --> 00:17:50,760 kind of method for this is to call the 444 00:17:50,760 --> 00:17:52,740 mprotect function, which allows you to say 445 00:17:52,740 --> 00:17:54,500 for this chunk of memory, don't make it 446 00:17:56,140 --> 00:17:57,020 don't sort of apply 447 00:17:57,020 --> 00:17:58,860 the protection, so you're exempting yourself out with 448 00:17:58,860 --> 00:17:59,240 mprotect. 449 00:18:00,860 --> 00:18:02,900 We'll talk about some testing tools later, but 450 00:18:03,820 --> 00:18:04,860 basically if you have 451 00:18:04,860 --> 00:18:06,600 the ability to call the virtual protect function, 452 00:18:06,960 --> 00:18:08,380 the mprotect function, these 453 00:18:08,840 --> 00:18:11,020 sort of allow you to 454 00:18:11,020 --> 00:18:12,620 exempt a given 455 00:18:13,280 --> 00:18:14,820 chunk of memory from all the 456 00:18:14,820 --> 00:18:15,240 restrictions. 457 00:18:17,040 --> 00:18:18,860 Return to libc does require you to have a known address. 458 00:18:18,980 --> 00:18:20,200 We'll talk about some of that later. 459 00:18:21,080 --> 00:18:21,980 Heat-based overflows. 460 00:18:23,100 --> 00:18:24,060 You know, the 461 00:18:24,060 --> 00:18:25,920 like I say, the 462 00:18:27,420 --> 00:18:28,420 libc is not the only 463 00:18:28,920 --> 00:18:30,580 target. Stack is not the only target. 464 00:18:31,360 --> 00:18:32,380 Heat-based stuff is 465 00:18:33,020 --> 00:18:34,820 kind of, seems like lately 466 00:18:34,820 --> 00:18:35,880 of more interest. 467 00:18:36,820 --> 00:18:38,320 Did anybody see Atlas' talk? 468 00:18:38,880 --> 00:18:39,900 The deal Malik talk? 469 00:18:40,900 --> 00:18:42,860 It's after me. Oh yeah, 470 00:18:42,960 --> 00:18:45,020 shit, okay. He's like way cooler 471 00:18:45,020 --> 00:18:46,740 so the elite people can come back then. 472 00:18:48,660 --> 00:18:50,140 So yeah, so stay here. 473 00:18:50,340 --> 00:18:50,900 Stay here. 474 00:18:51,620 --> 00:18:52,880 I actually want to ask him about 475 00:18:52,880 --> 00:18:54,540 something I'm going to get to here in a little bit 476 00:18:54,540 --> 00:18:55,620 in terms of heat-based stuff. 477 00:18:57,660 --> 00:18:58,500 Something else is 478 00:18:59,380 --> 00:18:59,780 mbody 479 00:19:01,180 --> 00:19:03,000 came up with what they sort of 480 00:19:03,000 --> 00:19:03,840 call multistage overflow. 481 00:19:04,260 --> 00:19:06,920 So the idea is, you know, when you do a noexec stack 482 00:19:06,920 --> 00:19:08,540 it's a very specific set of conditions 483 00:19:09,400 --> 00:19:10,560 that you're protecting against, 484 00:19:10,760 --> 00:19:12,980 which is basically like say sort of data jumping over to code. 485 00:19:13,380 --> 00:19:14,920 And so what you 486 00:19:14,920 --> 00:19:16,900 can do in the case of theirs is 487 00:19:17,040 --> 00:19:18,240 you overwrite a function pointer first 488 00:19:18,240 --> 00:19:20,420 and you point to an address and then you load 489 00:19:21,040 --> 00:19:22,580 shellcode at that predefined address later. 490 00:19:22,940 --> 00:19:24,560 And so you didn't 491 00:19:24,560 --> 00:19:25,800 break the model necessarily. 492 00:19:26,640 --> 00:19:28,940 So you didn't jump from data to code. 493 00:19:29,060 --> 00:19:30,840 So it's still a method 494 00:19:30,840 --> 00:19:31,820 to circumvent that. 495 00:19:33,580 --> 00:19:34,840 Escape and Skywing, and this is 496 00:19:34,840 --> 00:19:35,760 kind of interesting to me, 497 00:19:37,760 --> 00:19:38,620 have a paper, 498 00:19:38,720 --> 00:19:40,860 it's from maybe a couple 499 00:19:40,860 --> 00:19:43,000 years ago, talking about MS's 500 00:19:43,000 --> 00:19:45,000 dep protection. A lot of people 501 00:19:45,000 --> 00:19:46,420 were interested in that when it sort of first came out. 502 00:19:47,300 --> 00:19:48,820 Dep is configurable 503 00:19:48,820 --> 00:19:50,960 in the case of MS's stuff. 504 00:19:51,040 --> 00:19:52,720 Remember we were talking about how 505 00:19:52,720 --> 00:19:54,920 JIT compilers and things require the ability 506 00:19:54,920 --> 00:19:56,960 to construct code on the stack, so you have to find 507 00:19:57,700 --> 00:19:58,580 ways to 508 00:19:58,580 --> 00:20:00,000 exempt them out of the model. 509 00:20:00,360 --> 00:20:02,800 So what MS does is use process execute flags. 510 00:20:03,740 --> 00:20:04,180 Well, 511 00:20:04,860 --> 00:20:06,960 what Escape and Skywing found was that 512 00:20:06,960 --> 00:20:08,560 there's a value there, 513 00:20:09,180 --> 00:20:10,980 mem execute option enable disable. 514 00:20:11,860 --> 00:20:12,960 So if you 515 00:20:12,960 --> 00:20:15,160 flip that bit, you've just allowed yourself stack execution. 516 00:20:15,400 --> 00:20:16,480 And so then you can pop back in. 517 00:20:17,040 --> 00:20:18,960 So pop back through that and sort of opt out 518 00:20:18,960 --> 00:20:21,100 of that. So one of the things they talk about 519 00:20:21,100 --> 00:20:22,900 in there is setting the 520 00:20:22,900 --> 00:20:24,300 no execute bit as always on. 521 00:20:24,520 --> 00:20:26,880 In the boot I and I, it'll break a whole lot of stuff, unfortunately. 522 00:20:27,880 --> 00:20:28,400 But that 523 00:20:28,940 --> 00:20:30,580 on, especially on systems that don't have 524 00:20:30,580 --> 00:20:32,580 sort of all the other protections, so like 2003 525 00:20:32,580 --> 00:20:34,440 and XP, this is 526 00:20:34,440 --> 00:20:37,080 probably the best you can get, is to set it to always on. 527 00:20:37,180 --> 00:20:38,940 If it's set for opt out, or it's set for 528 00:20:38,940 --> 00:20:40,500 opt in, it's kind of moot. 529 00:20:41,200 --> 00:20:42,680 They're basically the same thing 530 00:20:43,240 --> 00:20:44,720 in terms of the fact that you can 531 00:20:44,720 --> 00:20:46,900 set that, set those bits and 532 00:20:47,040 --> 00:20:49,000 let's say jump out of the model. Doesn't matter. 533 00:20:50,340 --> 00:20:50,740 Pax 534 00:20:50,740 --> 00:20:52,360 uses an ELF header 535 00:20:52,900 --> 00:20:54,940 and lets you set bits on a file and 536 00:20:54,940 --> 00:20:57,080 say like this file is blessed to do this by itself. 537 00:20:57,340 --> 00:20:58,500 And I think 538 00:20:58,880 --> 00:21:00,860 maybe that might be a higher bar than sort of doing it 539 00:21:00,860 --> 00:21:02,180 in memory at load time. 540 00:21:04,020 --> 00:21:04,940 One of the probably 541 00:21:04,940 --> 00:21:06,740 biggest problems with all of this stuff, 542 00:21:06,880 --> 00:21:08,700 not just actually no exec stacks, 543 00:21:08,860 --> 00:21:10,960 but the whole thing is that this is an opt in, opt out 544 00:21:10,960 --> 00:21:12,800 model. You can 545 00:21:13,380 --> 00:21:14,620 pass flags to the compiler 546 00:21:14,620 --> 00:21:16,840 to opt out of it. You can 547 00:21:18,380 --> 00:21:19,140 find yourself 548 00:21:19,140 --> 00:21:20,780 disabling it when you set optimize 549 00:21:20,780 --> 00:21:23,000 flags and things like that. So you have 550 00:21:23,000 --> 00:21:24,880 to be really careful, read your compiler documentation 551 00:21:24,880 --> 00:21:26,820 and things like that and understand exactly 552 00:21:26,820 --> 00:21:28,780 what you're doing. It's 553 00:21:28,780 --> 00:21:30,900 pretty easy to turn this stuff off without 554 00:21:30,900 --> 00:21:32,260 realizing that's what you've done. 555 00:21:33,780 --> 00:21:35,120 And then there's other mechanisms 556 00:21:35,120 --> 00:21:36,320 that allow people to opt out. 557 00:21:38,400 --> 00:21:38,940 Skywing has 558 00:21:38,940 --> 00:21:40,820 on his site, if you check this out, the 559 00:21:40,820 --> 00:21:41,760 no exec hall of shame. 560 00:21:42,520 --> 00:21:44,920 It talks about a lot of apps that break whenever you have 561 00:21:44,920 --> 00:21:46,740 stack execution turned off 100%. 562 00:21:47,420 --> 00:21:48,640 Me personally, running 563 00:21:48,640 --> 00:21:50,820 that with that bit set, 564 00:21:51,120 --> 00:21:52,900 Firefox, Acrobat, Java, 565 00:21:53,180 --> 00:21:54,760 will just barf and they'll 566 00:21:54,760 --> 00:21:56,820 shut off and then you have to sort them 567 00:21:56,820 --> 00:21:57,120 back up. 568 00:21:59,080 --> 00:22:00,820 Something that I thought was kind of interesting, 569 00:22:00,900 --> 00:22:02,840 I used to use an app called SecureStack 570 00:22:02,840 --> 00:22:03,580 which is a 571 00:22:05,020 --> 00:22:06,820 no exec stack implementation 572 00:22:06,820 --> 00:22:08,600 a long time ago that actually ran on 573 00:22:09,220 --> 00:22:10,860 NT4 and Windows 574 00:22:10,860 --> 00:22:12,840 2000 before they had 575 00:22:12,840 --> 00:22:14,080 anything else for that. 576 00:22:15,380 --> 00:22:16,560 I was doing 577 00:22:16,560 --> 00:22:18,620 a large network that had a bunch of 578 00:22:18,620 --> 00:22:20,840 Veritas Backup Exec clients 579 00:22:20,840 --> 00:22:22,880 set up and this admin 580 00:22:22,880 --> 00:22:24,520 was pushing this update. 581 00:22:25,540 --> 00:22:27,040 They have some kind of ability 582 00:22:27,040 --> 00:22:28,040 to hot patch the 583 00:22:29,100 --> 00:22:30,800 drivers and the services that you can push 584 00:22:30,800 --> 00:22:32,800 update client now from the admin 585 00:22:32,800 --> 00:22:34,180 console and it pushes this out. 586 00:22:34,680 --> 00:22:36,860 Every time you ran that 587 00:22:36,860 --> 00:22:38,900 it would crash because SecureStack 588 00:22:38,900 --> 00:22:40,560 was saying no, you can't execute on the stack. 589 00:22:41,680 --> 00:22:42,640 A couple years 590 00:22:42,640 --> 00:22:44,740 later you had some 591 00:22:44,920 --> 00:22:46,840 stack based overflows in backup execs. 592 00:22:47,120 --> 00:22:49,000 Maybe it was shutting it off for a reason. 593 00:22:50,180 --> 00:22:50,700 Somebody 594 00:22:50,700 --> 00:22:52,780 more qualified than me could probably say that. 595 00:22:54,540 --> 00:22:56,720 The next step was 596 00:22:56,720 --> 00:22:58,900 to check for memory corruption 597 00:22:59,780 --> 00:23:00,740 around the same 598 00:23:00,740 --> 00:23:02,300 time that overflows and 599 00:23:02,720 --> 00:23:04,320 all of this stuff was kind of 600 00:23:04,320 --> 00:23:06,500 very common as 601 00:23:06,500 --> 00:23:08,160 an exploit vector. 602 00:23:08,700 --> 00:23:09,880 Around that same time, 603 00:23:09,980 --> 00:23:12,860 Chris McCowan, who has a talk tomorrow 604 00:23:12,860 --> 00:23:13,340 I think, 605 00:23:15,340 --> 00:23:16,600 the guys from 606 00:23:16,600 --> 00:23:18,740 Immunix developed 607 00:23:18,740 --> 00:23:20,360 StackGuard which was kind of an early 608 00:23:20,360 --> 00:23:22,460 implementation of the canary approach. 609 00:23:23,280 --> 00:23:24,860 Basically what you're doing is 610 00:23:24,860 --> 00:23:26,300 for the return address 611 00:23:26,700 --> 00:23:28,300 you're setting a canary value in the stack 612 00:23:28,840 --> 00:23:29,780 and if 613 00:23:30,600 --> 00:23:32,540 this value is changed that means that you've 614 00:23:32,540 --> 00:23:33,620 overwritten memory. 615 00:23:33,960 --> 00:23:36,520 In function prolog at startup you 616 00:23:36,520 --> 00:23:38,400 stamp it with this 617 00:23:38,820 --> 00:23:40,100 canary word and then 618 00:23:40,720 --> 00:23:42,040 at function epilog 619 00:23:42,040 --> 00:23:44,740 if that value is no longer there then you call exit 620 00:23:44,920 --> 00:23:45,700 and actually they called 621 00:23:46,240 --> 00:23:48,500 different calls through the different limitations of it 622 00:23:48,500 --> 00:23:50,740 but fundamentally you're shutting off if the canary value changed. 623 00:23:50,960 --> 00:23:52,900 So let's say it's kind of tripwire for your stack 624 00:23:52,900 --> 00:23:54,500 is the way I, sort of for me, 625 00:23:54,580 --> 00:23:55,120 understood it. 626 00:23:56,900 --> 00:23:58,700 Later versions of StackGuard kind of 627 00:23:58,700 --> 00:24:00,900 added different ways to do the canary stuff. 628 00:24:00,960 --> 00:24:02,660 There's been, there were a number of 629 00:24:02,660 --> 00:24:04,720 different papers that talked about problems in the way 630 00:24:04,720 --> 00:24:05,720 they did canaries so 631 00:24:07,180 --> 00:24:08,800 they tried a whole bunch of 632 00:24:08,800 --> 00:24:09,300 different approaches. 633 00:24:10,440 --> 00:24:12,300 We'll get to actually Propolis which is probably 634 00:24:12,300 --> 00:24:14,560 more interesting because it's more common these days 635 00:24:14,920 --> 00:24:16,820 and probably the most widely accepted approach 636 00:24:16,820 --> 00:24:17,160 for this. 637 00:24:18,420 --> 00:24:20,100 So yeah, Propolis is 638 00:24:20,740 --> 00:24:21,300 actually 639 00:24:22,660 --> 00:24:24,720 what was integrated into GCC 640 00:24:24,720 --> 00:24:26,600 4.1 pretty recently. 641 00:24:27,660 --> 00:24:28,780 The OpenBSD 642 00:24:28,780 --> 00:24:30,820 guys did a lot of work a few years ago 643 00:24:30,820 --> 00:24:32,800 backporting it for the 3x 644 00:24:32,800 --> 00:24:33,700 GCCs. 645 00:24:34,360 --> 00:24:36,800 It was embraced and extended by MS 646 00:24:36,800 --> 00:24:38,740 as the slash gs compiler flags. 647 00:24:38,920 --> 00:24:40,120 From what I understand 648 00:24:40,120 --> 00:24:42,660 the latest version of Visual Studio 649 00:24:42,660 --> 00:24:44,600 is a lot closer to a full blown Propolis 650 00:24:44,920 --> 00:24:46,460 implementation. The early stuff that they did 651 00:24:46,460 --> 00:24:48,040 was just kind of 652 00:24:49,240 --> 00:24:50,280 sort of a 653 00:24:50,280 --> 00:24:52,740 kind of, I don't want to say 654 00:24:52,740 --> 00:24:54,580 half-assed, kind of a 655 00:24:54,580 --> 00:24:56,020 step into implementing that. 656 00:24:57,560 --> 00:24:58,700 Like I said, the 657 00:24:58,700 --> 00:25:00,600 gs-cookie in Visual Studio 658 00:25:00,600 --> 00:25:02,300 is kind of the same thing as the Propolis guard value. 659 00:25:03,540 --> 00:25:04,980 Hiroki likes to call it guard values. 660 00:25:05,200 --> 00:25:05,980 StackGuard's canaries. 661 00:25:06,200 --> 00:25:08,780 He says it's a guard value and he wrote it 662 00:25:08,780 --> 00:25:09,800 so I'm going to take his word. 663 00:25:11,220 --> 00:25:12,400 It's an XOR 664 00:25:12,880 --> 00:25:14,780 of the pointer in a 665 00:25:14,920 --> 00:25:16,780 random value and then you store 666 00:25:16,780 --> 00:25:17,460 those somewhere off the stack. 667 00:25:18,940 --> 00:25:20,500 He moved beyond the return address 668 00:25:20,500 --> 00:25:22,700 so you have sort of all 669 00:25:22,700 --> 00:25:24,580 registers. We'll get to that in a minute about 670 00:25:25,000 --> 00:25:26,240 StackGuard but one of the things that it did 671 00:25:26,240 --> 00:25:28,700 especially initially was just protect the return address. 672 00:25:29,640 --> 00:25:30,700 Variables and arrays at the bottom, 673 00:25:30,760 --> 00:25:31,620 arguments at the top. 674 00:25:33,060 --> 00:25:34,440 Something that helped me understand 675 00:25:34,440 --> 00:25:35,180 Propolis is 676 00:25:37,940 --> 00:25:38,700 whether I'm 677 00:25:38,700 --> 00:25:40,560 an exploit writer or any of those things 678 00:25:40,560 --> 00:25:42,580 I consider myself a hacker so I don't like anything 679 00:25:42,580 --> 00:25:43,540 with police in it. 680 00:25:45,180 --> 00:25:46,740 It kind of made me cringe 681 00:25:46,740 --> 00:25:47,900 when I read the name of it 682 00:25:49,060 --> 00:25:50,560 but Propolis is 683 00:25:50,560 --> 00:25:52,080 actually what 684 00:25:53,320 --> 00:25:54,740 bees use to construct their 685 00:25:54,740 --> 00:25:56,840 hives and so it's the outside of the hives 686 00:25:56,840 --> 00:25:59,040 and so really what he was using 687 00:25:59,040 --> 00:26:00,580 in naming it that 688 00:26:00,580 --> 00:26:02,760 was describing sort of a well 689 00:26:02,760 --> 00:26:04,840 ordered stack and a well ordered 690 00:26:04,840 --> 00:26:06,820 address space in memory and so that helped me 691 00:26:06,820 --> 00:26:08,780 understand it a lot better and I felt more comfortable about the name. 692 00:26:09,660 --> 00:26:10,140 What 693 00:26:11,900 --> 00:26:12,620 Propolis does 694 00:26:12,620 --> 00:26:14,520 and this is totally ripped from 695 00:26:14,920 --> 00:26:16,940 a slide that Hiroki did at CanSecWest 696 00:26:16,940 --> 00:26:18,860 so if you go get his slides they're like way cooler than 697 00:26:18,860 --> 00:26:19,580 mine but 698 00:26:21,500 --> 00:26:22,380 you're taking 699 00:26:22,920 --> 00:26:25,080 some of the more commonly overflowed 700 00:26:25,080 --> 00:26:26,300 buffers so arguments 701 00:26:27,320 --> 00:26:28,800 are typically things that you're 702 00:26:28,800 --> 00:26:30,440 going to see arrays 703 00:26:31,920 --> 00:26:32,500 that are 704 00:26:32,500 --> 00:26:34,220 things that are pushed in 705 00:26:34,220 --> 00:26:36,560 and tend to be places where buffer overflows are 706 00:26:36,560 --> 00:26:38,700 where you're inserting data and 707 00:26:38,700 --> 00:26:40,840 he laid out the stack in sort of a cleaner 708 00:26:40,840 --> 00:26:42,160 way than what you would typically have so 709 00:26:43,220 --> 00:26:43,660 in 710 00:26:45,360 --> 00:26:46,320 inserting data 711 00:26:46,920 --> 00:26:47,560 into the stack 712 00:26:48,620 --> 00:26:50,680 and overwriting a memory segment typically what 713 00:26:51,460 --> 00:26:52,420 overflows do 714 00:26:52,420 --> 00:26:54,460 is to overwrite 715 00:26:54,460 --> 00:26:55,760 both the array 716 00:26:55,760 --> 00:26:58,380 the buffer and then the return address 717 00:26:58,380 --> 00:27:00,640 so you kind of have to in order to do that 718 00:27:00,640 --> 00:27:01,640 they have to be sort of adjacent 719 00:27:02,160 --> 00:27:04,640 so by laying it out in a better layout 720 00:27:04,640 --> 00:27:06,420 it makes it substantially more difficult to 721 00:27:06,420 --> 00:27:08,000 exploit stack based overflows 722 00:27:09,960 --> 00:27:12,260 so that was to me that was more important 723 00:27:12,260 --> 00:27:14,400 about Propolis than maybe the guard values 724 00:27:15,000 --> 00:27:16,680 you know that's why 725 00:27:16,680 --> 00:27:18,880 I think it developed 726 00:27:18,880 --> 00:27:20,280 a lot wider adoption than 727 00:27:20,920 --> 00:27:22,860 stack guard because it was a sort of 728 00:27:22,860 --> 00:27:24,600 a move to a whole kind of 729 00:27:24,600 --> 00:27:25,920 a better model a better approach 730 00:27:27,780 --> 00:27:28,280 so 731 00:27:28,770 --> 00:27:30,660 kind of an interlude to canaries which relates to 732 00:27:30,660 --> 00:27:32,440 Atlas so I'll try to maybe stick around for 733 00:27:32,440 --> 00:27:34,660 his stuff is something 734 00:27:34,660 --> 00:27:36,620 that is not too widely 735 00:27:36,620 --> 00:27:38,360 adopted that's out there is heap canaries 736 00:27:39,180 --> 00:27:40,760 there are a couple implementations 737 00:27:40,760 --> 00:27:42,480 for that contrapolis 738 00:27:42,480 --> 00:27:44,760 is one attempt the open 739 00:27:44,920 --> 00:27:46,100 SSD stuff has the G option 740 00:27:46,100 --> 00:27:48,740 to mallet conf and that's not 741 00:27:48,740 --> 00:27:50,720 enabled by default because it breaks a lot of stuff 742 00:27:50,720 --> 00:27:52,660 but what this does is apply 743 00:27:52,660 --> 00:27:54,820 the same thing to the heap so in talking 744 00:27:54,820 --> 00:27:56,760 about the heap as another vector 745 00:27:56,760 --> 00:27:58,620 for this stuff what they do is place 746 00:27:58,620 --> 00:28:00,380 kind of the same thing canary values 747 00:28:00,380 --> 00:28:02,740 guard values at sort of the beginning 748 00:28:02,740 --> 00:28:04,840 and the end of the memory allocation 749 00:28:05,500 --> 00:28:06,480 so and then 750 00:28:07,380 --> 00:28:09,160 WKR I wish I knew his initials 751 00:28:10,220 --> 00:28:10,620 but 752 00:28:10,620 --> 00:28:12,880 he has this is one of the guys from Shellfish 753 00:28:12,880 --> 00:28:14,140 a couple of years ago 754 00:28:14,920 --> 00:28:15,840 and he has a 755 00:28:16,940 --> 00:28:18,640 heap guard implementation for 756 00:28:18,640 --> 00:28:20,820 DLMalloc now the thing that he 757 00:28:20,820 --> 00:28:22,600 says on his site is that he's discontinued 758 00:28:22,600 --> 00:28:24,720 development because it's supposed to be integrated into 759 00:28:24,720 --> 00:28:26,860 DLMalloc so that's why I'm kind of curious 760 00:28:26,860 --> 00:28:28,020 about Atlas' stuff because 761 00:28:29,640 --> 00:28:30,800 from what I could tell it 762 00:28:30,800 --> 00:28:32,680 wasn't yet in DLMalloc 763 00:28:32,680 --> 00:28:34,520 so maybe 764 00:28:35,600 --> 00:28:36,880 maybe it's not actually 765 00:28:36,880 --> 00:28:38,660 out there yet or maybe it's totally 766 00:28:38,660 --> 00:28:40,620 irrelevant so that's why I'm going to stick around 767 00:28:40,620 --> 00:28:42,640 anyway so 768 00:28:43,340 --> 00:28:44,860 the main thing about canaries 769 00:28:44,920 --> 00:28:45,460 was that 770 00:28:46,440 --> 00:28:49,040 if the canary is the only element to protect 771 00:28:50,080 --> 00:28:50,600 against 772 00:28:50,600 --> 00:28:52,500 corruption in memory it's the defense 773 00:28:52,500 --> 00:28:54,880 simply becomes sort of as good as the canary value 774 00:28:54,880 --> 00:28:55,340 so 775 00:28:57,100 --> 00:28:58,800 Gerardo Richard this CoreSec guy 776 00:28:59,540 --> 00:29:01,040 he had a paper on 777 00:29:01,040 --> 00:29:02,980 a lot of different methods to defeat 778 00:29:03,520 --> 00:29:04,780 specifically stack guard 779 00:29:04,780 --> 00:29:06,400 and stack shield and some of these other things 780 00:29:06,400 --> 00:29:08,260 and basically what he was talking about is if 781 00:29:08,260 --> 00:29:10,940 other addresses aren't 782 00:29:10,940 --> 00:29:12,960 protected or if you can 783 00:29:12,960 --> 00:29:14,840 find ways to overwrite things like 784 00:29:14,920 --> 00:29:16,580 stack frame pointers other places in memory 785 00:29:17,560 --> 00:29:18,520 it becomes 786 00:29:18,520 --> 00:29:20,360 a way to defeat it 787 00:29:21,820 --> 00:29:23,040 BulbinKiller have a 788 00:29:23,040 --> 00:29:25,160 there's a FRAC paper from a while ago 789 00:29:25,160 --> 00:29:26,380 that was 790 00:29:27,700 --> 00:29:28,840 specifically pointing out 791 00:29:28,840 --> 00:29:30,900 probably the fatal flaw in stack guard which is that 792 00:29:30,900 --> 00:29:32,020 it just protects the return address 793 00:29:33,480 --> 00:29:34,440 so they 794 00:29:34,440 --> 00:29:36,200 found that because of that 795 00:29:36,200 --> 00:29:38,280 you could write pointers in other places 796 00:29:38,700 --> 00:29:41,000 you could write over other areas on the stack 797 00:29:41,000 --> 00:29:42,740 and you were just sort of doing 798 00:29:42,740 --> 00:29:44,500 what was the most common method to exploit 799 00:29:44,920 --> 00:29:46,440 stack based overflows which is to 800 00:29:46,440 --> 00:29:48,700 overwrite the RTA but it's not the only way 801 00:29:50,800 --> 00:29:51,240 so 802 00:29:51,240 --> 00:29:52,300 another thing is 803 00:29:52,900 --> 00:29:54,660 canary is somewhere in memory if you can read that 804 00:29:54,660 --> 00:29:56,600 canary value somehow that may be of value 805 00:29:57,760 --> 00:29:58,800 there are some methods 806 00:29:58,800 --> 00:30:00,780 to kind of keep it off stack 807 00:30:02,600 --> 00:30:03,040 and 808 00:30:03,040 --> 00:30:04,460 so things like formats from bugs 809 00:30:04,460 --> 00:30:05,940 and things these 810 00:30:05,940 --> 00:30:08,400 info leakage might give you a way to disclose that 811 00:30:10,640 --> 00:30:11,080 so 812 00:30:11,080 --> 00:30:11,940 and this is what 813 00:30:13,060 --> 00:30:14,840 especially Vista there's a lot of hype about 814 00:30:14,920 --> 00:30:16,660 there's a lot of discussion about with Vista 815 00:30:16,660 --> 00:30:17,780 is you know 816 00:30:17,780 --> 00:30:20,900 if you look at 817 00:30:20,900 --> 00:30:22,220 most exploits they target 818 00:30:22,220 --> 00:30:24,740 kind of known addresses so if you look at exploit code they'll have 819 00:30:24,740 --> 00:30:25,940 you know this is 820 00:30:26,500 --> 00:30:27,800 you know if you ever 821 00:30:28,960 --> 00:30:31,140 run exploits nobody does that around here 822 00:30:31,140 --> 00:30:31,940 and stuff 823 00:30:31,940 --> 00:30:34,800 you'll see this is the red hat version 824 00:30:34,800 --> 00:30:36,820 this is for Fedora core 5 825 00:30:36,820 --> 00:30:37,880 this is for whatever 826 00:30:37,880 --> 00:30:40,640 well it's pointing to specific addresses in memory 827 00:30:40,640 --> 00:30:41,840 so with 828 00:30:43,460 --> 00:30:44,900 address based layout randomization 829 00:30:44,920 --> 00:30:46,700 or ASLR what you're doing is 830 00:30:46,700 --> 00:30:47,680 you're randomizing that stuff 831 00:30:48,520 --> 00:30:49,160 PAX is 832 00:30:50,540 --> 00:30:52,920 really probably the first people to come up with this 833 00:30:52,920 --> 00:30:53,300 I think 834 00:30:53,300 --> 00:30:56,820 I think there's a little bit of finger pointing and stuff 835 00:30:56,820 --> 00:30:57,100 but 836 00:30:57,100 --> 00:31:00,820 they have probably the most robust implementation of 837 00:31:00,820 --> 00:31:02,100 ASLR out there 838 00:31:02,540 --> 00:31:04,400 so you randomize user land, case stack 839 00:31:04,920 --> 00:31:06,520 and map calls things like that 840 00:31:06,520 --> 00:31:08,880 something I like about PAX is it has a lot of tunable bits 841 00:31:08,880 --> 00:31:10,220 so you can flip things kind of on and off 842 00:31:11,280 --> 00:31:12,080 and also 843 00:31:12,660 --> 00:31:14,840 chpax or pax control lets you do that on per bind 844 00:31:14,920 --> 00:31:16,020 on a secondary basis so it's more tunable 845 00:31:17,140 --> 00:31:19,060 when you look at the stuff that OpenBSD does 846 00:31:19,520 --> 00:31:20,620 it's all kind of turned on 847 00:31:20,620 --> 00:31:21,640 and that's what you get 848 00:31:21,640 --> 00:31:24,220 so if it breaks things sorry 849 00:31:24,220 --> 00:31:26,960 there are some similar bits for NetBSD 850 00:31:26,960 --> 00:31:28,880 and FreeBSD and I actually got some slides on that later 851 00:31:28,880 --> 00:31:30,660 if you're interested in checking that out 852 00:31:30,660 --> 00:31:31,840 on other platforms 853 00:31:33,940 --> 00:31:34,820 exec shield is 854 00:31:34,820 --> 00:31:35,540 Red Hat's implementation 855 00:31:36,360 --> 00:31:38,600 it does some stack randomization things like that 856 00:31:38,600 --> 00:31:40,660 I don't know why they didn't just use PAX 857 00:31:41,600 --> 00:31:42,520 it was out there 858 00:31:42,520 --> 00:31:44,520 it was already pretty widely supported 859 00:31:44,920 --> 00:31:46,520 and instead they sort of 860 00:31:46,520 --> 00:31:47,840 decided to build their own thing 861 00:31:50,200 --> 00:31:50,780 so that 862 00:31:50,780 --> 00:31:51,840 it doesn't make a lot of sense to me 863 00:31:51,840 --> 00:31:53,880 I think it's one of the problems with the open source world sometimes 864 00:31:53,880 --> 00:31:56,820 especially the sort of corporatized open source 865 00:31:56,820 --> 00:31:59,120 is that even though there's things in the community 866 00:31:59,120 --> 00:32:00,800 people will still develop it open source 867 00:32:00,800 --> 00:32:01,960 but they'll still do their own thing 868 00:32:01,960 --> 00:32:04,760 so they can say this is controlled by a Red Hat developer 869 00:32:06,400 --> 00:32:06,800 so 870 00:32:07,380 --> 00:32:08,960 Vista adds a random 871 00:32:09,420 --> 00:32:10,580 XE and DLL loader 872 00:32:11,180 --> 00:32:12,660 varying degrees of entropy 873 00:32:12,660 --> 00:32:13,600 and randomization 874 00:32:15,440 --> 00:32:16,640 PAX, OpenBSD, some of these 875 00:32:16,640 --> 00:32:18,260 have a lot better randomization than Vista 876 00:32:19,320 --> 00:32:20,860 for apps to utilize this 877 00:32:20,860 --> 00:32:22,640 internally there are some compiler flags 878 00:32:22,640 --> 00:32:23,680 that have to be passed to it 879 00:32:23,680 --> 00:32:26,460 I was talking to a guy from MS 880 00:32:26,460 --> 00:32:28,860 a couple days ago 881 00:32:28,860 --> 00:32:30,180 and he was talking about how much he 882 00:32:30,180 --> 00:32:32,780 really hated the slash dynamic 883 00:32:32,780 --> 00:32:34,100 base flag because it makes 884 00:32:34,540 --> 00:32:36,280 crash dumps really hard for them to understand 885 00:32:36,280 --> 00:32:38,620 and I think there's some developer backlash about it 886 00:32:38,620 --> 00:32:40,200 but in order to 887 00:32:40,200 --> 00:32:41,840 really take advantage of this stuff 888 00:32:41,840 --> 00:32:43,760 you have to pass flags to the compiler 889 00:32:44,920 --> 00:32:46,560 Ollie Whitehouse did a talk a little while ago 890 00:32:47,120 --> 00:32:49,160 talking about some of the weaknesses on the heap 891 00:32:49,880 --> 00:32:50,700 heap addresses 892 00:32:50,700 --> 00:32:52,260 and the heap randomization in Vista 893 00:32:52,260 --> 00:32:53,980 is much more predictable 894 00:32:55,020 --> 00:32:56,400 than maybe it should be 895 00:32:56,770 --> 00:32:58,420 and I think there's some discussion that they're going to 896 00:32:58,420 --> 00:33:00,540 probably correct it in a couple revs 897 00:33:02,640 --> 00:33:04,760 so position independent executables 898 00:33:05,280 --> 00:33:05,780 are 899 00:33:05,780 --> 00:33:08,000 a way to 900 00:33:08,690 --> 00:33:10,660 take advantage of some of the ASLR stuff 901 00:33:11,200 --> 00:33:12,600 in a given XE 902 00:33:12,600 --> 00:33:14,220 and that's kind of required to really 903 00:33:14,920 --> 00:33:16,040 take advantage of ASLR fully 904 00:33:16,040 --> 00:33:18,460 so if DLLs 905 00:33:18,460 --> 00:33:20,500 and libraries are randomized that helps 906 00:33:20,500 --> 00:33:22,360 but it doesn't get you all the way there 907 00:33:22,360 --> 00:33:24,400 unless you're building things that are fully 908 00:33:24,830 --> 00:33:25,720 position independent themselves 909 00:33:25,720 --> 00:33:27,960 and so basically they find the global offset table 910 00:33:27,960 --> 00:33:29,040 they go somewhere random 911 00:33:29,040 --> 00:33:30,760 and so at each run 912 00:33:30,760 --> 00:33:33,900 a given XE it's sort of less predictable 913 00:33:35,120 --> 00:33:36,840 John Moser is a guy who's 914 00:33:36,840 --> 00:33:38,520 been trying to get a lot of this stuff integrated 915 00:33:38,520 --> 00:33:39,300 into Ubuntu 916 00:33:39,300 --> 00:33:40,900 he has made a little progress 917 00:33:40,900 --> 00:33:42,960 probably not as much as he would like 918 00:33:44,920 --> 00:33:46,320 but his guesstimate is that 919 00:33:46,320 --> 00:33:48,360 if you take stack random bits and mmet random bits 920 00:33:49,720 --> 00:33:50,160 it's a 921 00:33:50,640 --> 00:33:52,640 one and two to the power of that 922 00:33:52,640 --> 00:33:54,220 to predict and address 923 00:33:54,960 --> 00:33:56,380 you're relying on randomization 924 00:33:56,380 --> 00:33:57,980 to make these things a little tougher to exploit 925 00:33:59,860 --> 00:34:00,260 PicPy 926 00:34:01,360 --> 00:34:01,760 DynamicBase 927 00:34:02,380 --> 00:34:04,320 all of these things are kind of key to 928 00:34:04,320 --> 00:34:06,380 a full blown ASLR implementation 929 00:34:06,880 --> 00:34:07,660 if you don't have 930 00:34:09,780 --> 00:34:11,260 position independent executables 931 00:34:11,680 --> 00:34:12,360 ASLR by itself 932 00:34:12,780 --> 00:34:13,920 doesn't really do you a whole lot of good 933 00:34:14,920 --> 00:34:17,060 as it would with both bits 934 00:34:17,060 --> 00:34:17,780 so 935 00:34:19,080 --> 00:34:20,020 on ASLR 936 00:34:21,060 --> 00:34:21,900 basically what 937 00:34:22,440 --> 00:34:23,560 we ended up with was 938 00:34:25,520 --> 00:34:26,820 the randomization itself 939 00:34:26,820 --> 00:34:27,780 becomes kind of 940 00:34:27,780 --> 00:34:30,040 the key sort of factor 941 00:34:30,040 --> 00:34:31,820 so somebody that I thought was really interesting 942 00:34:31,820 --> 00:34:33,940 is a guy named 943 00:34:33,940 --> 00:34:36,900 and he's an Israeli 944 00:34:36,900 --> 00:34:37,520 cryptographer 945 00:34:37,520 --> 00:34:39,780 who looked at this stuff and said 946 00:34:39,780 --> 00:34:41,480 well hey wait a minute this is bad crypto right 947 00:34:41,480 --> 00:34:43,820 this is just kind of weak crypto 948 00:34:45,080 --> 00:34:46,880 he did a paper 949 00:34:46,880 --> 00:34:48,620 on packs on a 32 bit platform 950 00:34:48,620 --> 00:34:49,620 so this is a while ago 951 00:34:49,620 --> 00:34:51,980 but what he did was build 952 00:34:51,980 --> 00:34:54,380 an Apache that was vulnerable to 953 00:34:55,140 --> 00:34:56,680 a couple different things but 954 00:34:57,240 --> 00:34:58,740 what he did was attempt to do 955 00:34:58,740 --> 00:35:00,740 a return ellipsy on that 956 00:35:00,740 --> 00:35:02,980 and try to guess 957 00:35:02,980 --> 00:35:05,080 the offset of the system call 958 00:35:05,080 --> 00:35:06,840 and what he found is that 959 00:35:06,840 --> 00:35:08,800 an ASLR protected Apache 960 00:35:08,800 --> 00:35:11,280 he could exploit that in about 200 seconds 961 00:35:11,280 --> 00:35:12,820 the problem is that 962 00:35:12,820 --> 00:35:14,780 Apache restarts, respawns 963 00:35:14,920 --> 00:35:16,440 every time that it loads 964 00:35:17,060 --> 00:35:18,560 so if it crashes 965 00:35:18,560 --> 00:35:20,820 typically when you're taking advantage 966 00:35:20,820 --> 00:35:22,320 of buffer overflow 967 00:35:22,320 --> 00:35:23,320 you're crashing a service 968 00:35:23,320 --> 00:35:25,080 so if it restarts every time 969 00:35:25,080 --> 00:35:27,840 then you can continue to keep trying 970 00:35:27,840 --> 00:35:28,940 until you guess the correct address 971 00:35:29,860 --> 00:35:31,520 somebody tells me in Vista 972 00:35:31,520 --> 00:35:34,000 I think they do three failed 973 00:35:34,780 --> 00:35:36,420 three failed startups 974 00:35:36,420 --> 00:35:38,480 like service restarts three times 975 00:35:38,480 --> 00:35:39,140 and then it stops 976 00:35:40,200 --> 00:35:41,320 and GRSEC 977 00:35:41,320 --> 00:35:44,140 which is some other technology 978 00:35:44,920 --> 00:35:45,140 with packs 979 00:35:45,580 --> 00:35:46,940 they have some bits to do that 980 00:35:46,940 --> 00:35:48,040 to do the same kind of thing 981 00:35:48,040 --> 00:35:50,400 so if a service crashes in memory 982 00:35:50,400 --> 00:35:52,740 it'll restart X number of times 983 00:35:52,740 --> 00:35:53,580 and then after that you stop 984 00:35:53,580 --> 00:35:55,220 so that makes this a little more difficult 985 00:35:55,220 --> 00:35:56,720 and I think actually with GRSEC 986 00:35:56,720 --> 00:35:59,660 they pause X number of seconds again 987 00:35:59,660 --> 00:36:01,040 so that makes this a little harder 988 00:36:01,040 --> 00:36:01,480 to brute force 989 00:36:01,480 --> 00:36:04,200 I think what was neat about this guy 990 00:36:04,200 --> 00:36:07,660 he looked at this as a weak crypto system 991 00:36:08,200 --> 00:36:09,980 and pointed out some of the problems with it 992 00:36:10,640 --> 00:36:13,140 he has a paper that just came out 993 00:36:14,920 --> 00:36:15,240 that I wanted to point out 994 00:36:15,240 --> 00:36:16,320 because I thought it was pretty interesting 995 00:36:16,320 --> 00:36:20,380 it's a look at a way to do 996 00:36:20,880 --> 00:36:22,200 return to libc with no function calls 997 00:36:22,200 --> 00:36:23,780 so he has this 998 00:36:23,780 --> 00:36:25,900 if you go out just google for like 999 00:36:25,900 --> 00:36:27,100 I think it's 1000 00:36:27,100 --> 00:36:29,240 is his domain 1001 00:36:29,660 --> 00:36:31,340 he just published this a little while ago 1002 00:36:32,260 --> 00:36:33,540 what he does is he 1003 00:36:35,040 --> 00:36:35,940 I'll call you back 1004 00:36:36,600 --> 00:36:37,560 what he does is 1005 00:36:38,820 --> 00:36:39,620 scan through 1006 00:36:40,460 --> 00:36:41,260 loaded libraries 1007 00:36:41,900 --> 00:36:44,140 and come up with a series of what he calls gadgets 1008 00:36:44,920 --> 00:36:46,420 which are little bits of code 1009 00:36:46,420 --> 00:36:48,480 that do different things 1010 00:36:48,480 --> 00:36:50,220 and then kind of chains them all together 1011 00:36:50,220 --> 00:36:51,180 ties them all together 1012 00:36:51,180 --> 00:36:54,660 to end up doing execution without actually calling 1013 00:36:54,660 --> 00:36:55,380 like a function 1014 00:36:55,820 --> 00:36:57,900 and so he has a method to 1015 00:36:57,900 --> 00:36:59,720 scan memory for all these pieces 1016 00:37:00,700 --> 00:37:02,260 it's not really specific to stack protection 1017 00:37:02,260 --> 00:37:03,140 it's just kind of interesting 1018 00:37:03,140 --> 00:37:04,420 because I've never seen anybody 1019 00:37:05,540 --> 00:37:06,980 come up with an approach like that 1020 00:37:06,980 --> 00:37:08,960 and it's kind of a whole different problem 1021 00:37:08,960 --> 00:37:09,820 from some of this stuff 1022 00:37:11,040 --> 00:37:14,200 something else that just sort of occurred to me 1023 00:37:14,920 --> 00:37:16,460 is that Shackham 1024 00:37:16,460 --> 00:37:19,100 on the heap in Vista you have weak randomization 1025 00:37:19,780 --> 00:37:20,900 when you're looking at 1026 00:37:20,900 --> 00:37:22,200 something like a client site exploit 1027 00:37:22,200 --> 00:37:24,960 where potentially you can restart as many times as you want 1028 00:37:25,740 --> 00:37:26,860 something that's browser based 1029 00:37:26,860 --> 00:37:28,160 for example, you could just keep 1030 00:37:28,580 --> 00:37:29,560 starting over, starting over 1031 00:37:30,700 --> 00:37:32,280 in say something in JavaScript 1032 00:37:32,280 --> 00:37:33,560 that's in a browser 1033 00:37:36,080 --> 00:37:37,180 if you're looking at 1034 00:37:37,180 --> 00:37:38,960 say Vista having pretty weak 1035 00:37:38,960 --> 00:37:40,540 randomization on the heap it would seem like 1036 00:37:40,540 --> 00:37:41,160 maybe this would apply 1037 00:37:43,200 --> 00:37:44,820 Ben Hawkes did a talk 1038 00:37:44,920 --> 00:37:46,900 at Ruxcon a little while ago 1039 00:37:46,900 --> 00:37:48,280 and he 1040 00:37:48,820 --> 00:37:50,480 talked about a method called 1041 00:37:50,480 --> 00:37:51,600 code access brute forcing 1042 00:37:51,600 --> 00:37:54,840 so what he does is use a series of 1043 00:37:54,840 --> 00:37:55,980 sort of unsuccessful reads 1044 00:37:55,980 --> 00:37:58,440 so again in ASLR 1045 00:37:58,440 --> 00:38:00,480 being mostly a method to protect against 1046 00:38:00,480 --> 00:38:01,140 return ellipses 1047 00:38:02,300 --> 00:38:03,800 preloaded functions in memory 1048 00:38:03,800 --> 00:38:05,380 have sort of 1049 00:38:05,980 --> 00:38:07,880 you don't know where it starts and ends 1050 00:38:07,880 --> 00:38:09,620 but it's still the same size 1051 00:38:09,620 --> 00:38:11,640 like the system call is roughly the same size 1052 00:38:11,640 --> 00:38:14,200 on a given platform so if you can kind of 1053 00:38:14,920 --> 00:38:16,480 narrow it down eventually you can infer that address 1054 00:38:16,480 --> 00:38:18,860 so he actually did a bunch of work against 1055 00:38:19,420 --> 00:38:19,820 OpenBSD 1056 00:38:19,820 --> 00:38:22,060 and looked at that and also 1057 00:38:22,060 --> 00:38:24,260 things that pre-link will 1058 00:38:25,520 --> 00:38:26,800 potentially give you the ability 1059 00:38:26,800 --> 00:38:28,780 to guess some of those locations 1060 00:38:28,780 --> 00:38:29,260 as well 1061 00:38:31,740 --> 00:38:32,540 Ollie Whitehouse 1062 00:38:32,540 --> 00:38:34,280 I mentioned him a couple of times 1063 00:38:34,280 --> 00:38:36,340 he did a talk actually at Black Hat DC 1064 00:38:36,340 --> 00:38:38,640 and he did it 1065 00:38:38,640 --> 00:38:39,660 here in Vegas as well 1066 00:38:40,060 --> 00:38:42,440 it's out there because it was at Black Hat DC 1067 00:38:42,440 --> 00:38:43,980 you can get it on the site so it's out 1068 00:38:44,920 --> 00:38:45,000 there on the site 1069 00:38:45,000 --> 00:38:48,140 and he did a bunch of series of kind of 1070 00:38:48,140 --> 00:38:49,620 regression tests against Windows Vista 1071 00:38:49,620 --> 00:38:52,960 and looked at how efficient the randomization 1072 00:38:52,960 --> 00:38:54,240 is and he found 1073 00:38:54,240 --> 00:38:55,980 probably the most interesting thing that he found 1074 00:38:55,980 --> 00:38:58,340 was that when you use the standard C 1075 00:38:58,920 --> 00:38:59,640 and protect 1076 00:38:59,640 --> 00:39:01,280 sorry, Mmap 1077 00:39:02,800 --> 00:39:04,600 call, MS has like their own 1078 00:39:04,600 --> 00:39:06,580 and he found that when you use 1079 00:39:06,580 --> 00:39:08,340 the ANSI C one 1080 00:39:08,340 --> 00:39:10,840 it had better randomization than when you used MS's 1081 00:39:10,840 --> 00:39:12,500 own recommended call 1082 00:39:12,500 --> 00:39:14,200 so I thought that was kind of funny 1083 00:39:15,440 --> 00:39:16,320 what he 1084 00:39:16,320 --> 00:39:18,820 what he found was that the randomization 1085 00:39:18,820 --> 00:39:20,280 was substantially more predictable 1086 00:39:20,280 --> 00:39:22,420 and he's got these really neat visualizations of it 1087 00:39:22,420 --> 00:39:24,860 that make it really kind of easy to understand 1088 00:39:24,860 --> 00:39:26,140 because you can see this kind of 1089 00:39:26,140 --> 00:39:28,760 mostly flat line as he went through 1090 00:39:28,760 --> 00:39:30,760 and what he did was do 1091 00:39:30,760 --> 00:39:33,200 a series of like hundreds of reboots 1092 00:39:33,200 --> 00:39:34,880 on a Vista box and then look 1093 00:39:34,880 --> 00:39:36,260 at the addresses and then map them out 1094 00:39:36,860 --> 00:39:38,320 and so what he found is that 1095 00:39:38,320 --> 00:39:39,960 crypto there is not so great 1096 00:39:41,360 --> 00:39:42,720 so sort of exploit mitigation 1097 00:39:42,720 --> 00:39:43,340 cliff notes 1098 00:39:44,960 --> 00:39:45,780 let's say no exec 1099 00:39:45,780 --> 00:39:47,360 no exec stacks in NX 1100 00:39:47,840 --> 00:39:49,740 if they're configurable at run time they're pretty useless 1101 00:39:50,160 --> 00:39:51,320 there's lots of other ways 1102 00:39:51,700 --> 00:39:54,380 so in and of itself it's just about worthless 1103 00:39:54,960 --> 00:39:56,400 Dave Maynard called it a speed bump 1104 00:39:56,400 --> 00:39:58,080 a couple of years ago and I think that's pretty accurate 1105 00:39:59,840 --> 00:40:00,640 ASLR, bad crypto 1106 00:40:00,640 --> 00:40:01,840 is not a panacea by itself 1107 00:40:03,000 --> 00:40:04,760 memory leak bugs and things will allow you 1108 00:40:04,760 --> 00:40:05,660 to find other ways 1109 00:40:07,120 --> 00:40:08,940 again, canaries, bad crypto is not a panacea 1110 00:40:09,480 --> 00:40:09,840 so 1111 00:40:10,960 --> 00:40:12,760 all rights to memory space require protection 1112 00:40:12,760 --> 00:40:14,460 and I think that was the lesson from StackGuard 1113 00:40:14,920 --> 00:40:16,160 is that just a couple of addresses 1114 00:40:16,160 --> 00:40:17,180 doesn't do you that much good 1115 00:40:18,160 --> 00:40:19,900 the best practice today 1116 00:40:19,900 --> 00:40:22,460 so all these kind of have flaws 1117 00:40:22,460 --> 00:40:24,740 but basically what the consensus 1118 00:40:24,740 --> 00:40:25,420 seems to be 1119 00:40:26,760 --> 00:40:28,580 Schneier says security in depth 1120 00:40:28,580 --> 00:40:30,640 the aggregate 1121 00:40:30,640 --> 00:40:32,660 of a series of imperfect controls 1122 00:40:32,660 --> 00:40:33,900 is a better control 1123 00:40:34,820 --> 00:40:35,700 that's the hope 1124 00:40:35,700 --> 00:40:37,880 so the mesh model is another 1125 00:40:37,880 --> 00:40:39,480 expression of that 1126 00:40:40,240 --> 00:40:42,760 it's a combination of all kinds of 1127 00:40:42,760 --> 00:40:44,900 different features that maybe may not work 1128 00:40:44,920 --> 00:40:46,460 so great in and of themselves 1129 00:40:46,460 --> 00:40:48,700 but hopefully the aggregate of all these together 1130 00:40:49,120 --> 00:40:50,700 gives us some modicum of safety 1131 00:40:51,880 --> 00:40:53,220 and what I can say 1132 00:40:53,220 --> 00:40:53,840 again 1133 00:40:53,840 --> 00:40:56,640 this being just sort of my attempt to understand this stuff 1134 00:40:56,640 --> 00:40:58,720 is that a lot of really 1135 00:40:58,720 --> 00:40:59,360 smart guys 1136 00:41:00,600 --> 00:41:02,760 so go by the immunity booth 1137 00:41:02,760 --> 00:41:03,860 and talk to Dave Vytel 1138 00:41:03,860 --> 00:41:05,460 because they're really cool guys in general 1139 00:41:05,460 --> 00:41:08,500 and he says hey this stuff is pretty tough to hit 1140 00:41:09,680 --> 00:41:10,800 we'll actually get to this 1141 00:41:10,800 --> 00:41:11,280 in a little bit 1142 00:41:11,280 --> 00:41:13,300 like what seems to be the main problem now 1143 00:41:15,300 --> 00:41:15,700 is the ability 1144 00:41:15,700 --> 00:41:16,760 and sort of problems 1145 00:41:17,900 --> 00:41:19,580 that different pieces of software have 1146 00:41:19,580 --> 00:41:20,560 in implementing all these 1147 00:41:21,060 --> 00:41:23,320 and some of the ability to opt out of these things 1148 00:41:23,320 --> 00:41:24,740 but sort of the aggregate of all this stuff 1149 00:41:24,740 --> 00:41:25,980 so you've got address based randomization 1150 00:41:25,980 --> 00:41:28,460 you've got a pretty consistent no executable stack 1151 00:41:29,460 --> 00:41:32,080 and you've got some kind of canary method 1152 00:41:32,700 --> 00:41:34,160 to check for overwrites 1153 00:41:34,160 --> 00:41:35,160 and corruption in memory 1154 00:41:35,160 --> 00:41:36,380 like the aggregate of all this stuff 1155 00:41:36,380 --> 00:41:37,380 is you're in a pretty good spot 1156 00:41:38,480 --> 00:41:40,960 and like I say that seems to be the consensus 1157 00:41:40,960 --> 00:41:41,860 is that you have 1158 00:41:44,920 --> 00:41:45,820 all these things and they're turned on consistently 1159 00:41:45,820 --> 00:41:48,340 and it's turned on in all of your code 1160 00:41:48,340 --> 00:41:49,220 and it's all built that way 1161 00:41:49,960 --> 00:41:51,120 potentially what you'll get 1162 00:41:51,120 --> 00:41:52,220 this is the hope right 1163 00:41:52,220 --> 00:41:55,780 is that if you're running vulnerable code 1164 00:41:55,780 --> 00:41:56,900 and you don't know about it 1165 00:41:57,920 --> 00:41:58,840 because we don't 1166 00:41:58,840 --> 00:42:01,560 unless somebody else has a lot more time 1167 00:42:01,560 --> 00:42:02,280 than I do 1168 00:42:02,280 --> 00:42:05,320 we don't read every line of every single piece of code we run 1169 00:42:05,880 --> 00:42:06,900 it's not possible 1170 00:42:07,420 --> 00:42:08,760 unless you do one thing 1171 00:42:08,760 --> 00:42:11,240 or unless you sleep a lot less than I do 1172 00:42:11,240 --> 00:42:12,200 and I don't sleep a lot anyway 1173 00:42:14,920 --> 00:42:15,940 the intent of all this stuff 1174 00:42:15,940 --> 00:42:18,360 is that we'll have some level of protection 1175 00:42:18,360 --> 00:42:19,380 against these things 1176 00:42:19,380 --> 00:42:22,260 and give a way to kind of contain this stuff 1177 00:42:24,380 --> 00:42:24,820 so 1178 00:42:25,780 --> 00:42:26,680 19 years later 1179 00:42:26,680 --> 00:42:28,220 we're just kind of getting a handle on this 1180 00:42:28,220 --> 00:42:29,880 so what else can we do to raise the bar 1181 00:42:31,860 --> 00:42:32,880 static code analysis 1182 00:42:33,700 --> 00:42:34,460 something that 1183 00:42:34,460 --> 00:42:36,620 especially if you run open source stuff 1184 00:42:36,620 --> 00:42:38,040 something you probably ought to know about 1185 00:42:38,640 --> 00:42:40,240 is the fortify source 1186 00:42:40,680 --> 00:42:41,900 bits for GCC 1187 00:42:43,100 --> 00:42:44,660 dash d fortify source equals 1188 00:42:44,920 --> 00:42:46,140 two will actually 1189 00:42:46,140 --> 00:42:47,960 replace dangerous function calls 1190 00:42:47,960 --> 00:42:48,800 and things like that 1191 00:42:48,800 --> 00:42:51,100 and look for mistakes 1192 00:42:51,100 --> 00:42:52,520 and actually the one thing I found was 1193 00:42:53,280 --> 00:42:54,140 format string bugs 1194 00:42:54,740 --> 00:42:56,400 which are not that common anymore 1195 00:42:56,400 --> 00:42:57,280 from what I understand 1196 00:42:57,280 --> 00:42:59,840 but when they are out there 1197 00:42:59,840 --> 00:43:01,100 they're pretty ugly stuff 1198 00:43:01,800 --> 00:43:03,480 because they sort of allow arbitrary 1199 00:43:03,940 --> 00:43:04,940 reads and writes to memory 1200 00:43:04,940 --> 00:43:07,940 dash d fortify source equals two 1201 00:43:07,940 --> 00:43:09,080 will actually catch some of that stuff 1202 00:43:09,080 --> 00:43:10,780 in compile time so that's pretty cool 1203 00:43:14,920 --> 00:43:17,080 which was a project that was funded by 1204 00:43:17,080 --> 00:43:17,440 DHS 1205 00:43:18,760 --> 00:43:20,920 went through and did static 1206 00:43:20,920 --> 00:43:22,460 source analysis with obviously 1207 00:43:22,460 --> 00:43:24,480 Coverity's commercial 1208 00:43:24,480 --> 00:43:26,740 source code review product that they want to 1209 00:43:26,740 --> 00:43:27,580 you know promote 1210 00:43:27,580 --> 00:43:31,000 they got a contract with 1211 00:43:31,000 --> 00:43:32,860 department of homeland security to go through 1212 00:43:32,860 --> 00:43:35,160 and perform static code analysis 1213 00:43:35,160 --> 00:43:37,060 on sort of every major open source project 1214 00:43:37,060 --> 00:43:37,700 so they went through 1215 00:43:38,920 --> 00:43:40,120 Apache and 1216 00:43:40,120 --> 00:43:42,240 you know bind send mail 1217 00:43:42,240 --> 00:43:43,040 lots of other things 1218 00:43:45,120 --> 00:43:47,380 kind of that I thought was pretty sharp 1219 00:43:47,380 --> 00:43:48,820 was Ben 1220 00:43:48,820 --> 00:43:50,600 Laurie pointed out 1221 00:43:50,600 --> 00:43:52,960 that it's really nice of 1222 00:43:52,960 --> 00:43:54,540 the department of homeland security 1223 00:43:54,540 --> 00:43:56,380 to pay a commercial company to 1224 00:43:56,860 --> 00:43:58,040 find bugs in open source code 1225 00:43:58,040 --> 00:44:00,780 it would be even nicer if they paid open source developers 1226 00:44:00,780 --> 00:44:01,620 to fix them 1227 00:44:02,440 --> 00:44:04,880 so what you're finding is a lot of this stuff 1228 00:44:04,880 --> 00:44:06,680 and then they're not 1229 00:44:06,680 --> 00:44:08,180 disclosing it they're working with the 1230 00:44:08,800 --> 00:44:10,860 particular project teams to address it 1231 00:44:10,860 --> 00:44:12,680 but then they have to have their resources 1232 00:44:12,680 --> 00:44:14,100 to deal with all the bugs that are found 1233 00:44:16,140 --> 00:44:16,920 sort of 1234 00:44:16,920 --> 00:44:18,860 a limitation of static 1235 00:44:18,860 --> 00:44:20,440 code analysis obviously the 1236 00:44:20,440 --> 00:44:22,780 single best way to find any given 1237 00:44:22,780 --> 00:44:24,720 bug is to actually 1238 00:44:24,720 --> 00:44:26,740 do source code review by a human being 1239 00:44:26,740 --> 00:44:28,100 you know line by line 1240 00:44:28,100 --> 00:44:29,840 and yeah and there's of course 1241 00:44:29,840 --> 00:44:32,600 discussion about things like fuzzing all this other stuff 1242 00:44:32,600 --> 00:44:34,780 but you know Rice's theorem 1243 00:44:35,780 --> 00:44:36,680 says that 1244 00:44:36,680 --> 00:44:38,620 I guess for a given problem set 1245 00:44:38,620 --> 00:44:39,780 you know there's a 1246 00:44:39,780 --> 00:44:42,360 if it has X number of answers 1247 00:44:42,920 --> 00:44:44,060 it's not predictable 1248 00:44:44,920 --> 00:44:46,000 you can't fully 1249 00:44:46,000 --> 00:44:48,440 fully predict 1250 00:44:49,820 --> 00:44:50,180 the 1251 00:44:51,540 --> 00:44:52,260 yeah I 1252 00:44:52,780 --> 00:44:54,780 actually suck at Rice's theorem I'm gonna drop that 1253 00:44:55,480 --> 00:44:55,840 but 1254 00:44:56,760 --> 00:44:58,180 what made more sense to me 1255 00:44:58,180 --> 00:45:00,500 was what I call Rumsfeld's corollary 1256 00:45:00,500 --> 00:45:02,420 which is there's known knowns there's known unknowns 1257 00:45:02,420 --> 00:45:04,820 and there's unknown unknowns so we know what we know 1258 00:45:04,820 --> 00:45:06,260 we know what we don't know 1259 00:45:06,260 --> 00:45:08,000 but we don't know what we don't know we don't know 1260 00:45:08,000 --> 00:45:10,180 so you know and that's when you're doing 1261 00:45:10,600 --> 00:45:12,320 static code review and things that's kind of 1262 00:45:12,320 --> 00:45:14,900 the deal you hope that some of this stuff will find all these things 1263 00:45:14,920 --> 00:45:15,560 but you don't know for sure 1264 00:45:17,300 --> 00:45:18,840 one of the other things that 1265 00:45:18,840 --> 00:45:20,880 that sort of comes into this stuff is access control models 1266 00:45:23,260 --> 00:45:24,820 it's not really a method 1267 00:45:24,820 --> 00:45:26,980 to actually stop 1268 00:45:27,520 --> 00:45:28,620 memory corruption vulnerabilities 1269 00:45:28,620 --> 00:45:30,320 but it is a way to sort of do containment 1270 00:45:30,760 --> 00:45:32,940 so you have things like RSPAC, GR security 1271 00:45:32,940 --> 00:45:34,060 AppArm, RSC Linux 1272 00:45:34,060 --> 00:45:36,760 and there's a lot of contention in Linux about which is 1273 00:45:36,760 --> 00:45:38,800 the best and what access control 1274 00:45:38,800 --> 00:45:40,800 model everybody wants to do I'm just gonna 1275 00:45:40,800 --> 00:45:42,840 say and try to be agnostic and say they all 1276 00:45:42,840 --> 00:45:44,580 have varying degrees of 1277 00:45:44,580 --> 00:45:46,740 complexity and I won't mention which one is 1278 00:45:46,740 --> 00:45:48,560 the most complex I think other people 1279 00:45:48,560 --> 00:45:50,880 probably if you've touched any of this stuff you can guess 1280 00:45:52,480 --> 00:45:54,740 but there are lots of solutions out there that 1281 00:45:54,740 --> 00:45:55,660 allow you to contain 1282 00:45:56,700 --> 00:45:58,020 what applications can do 1283 00:45:59,240 --> 00:46:00,040 and contain 1284 00:46:00,780 --> 00:46:01,960 where they can read write 1285 00:46:02,740 --> 00:46:04,660 and sort of even if you have 1286 00:46:04,660 --> 00:46:06,740 exploitation or given vulnerability maybe you 1287 00:46:06,740 --> 00:46:08,780 can't kind of find access 1288 00:46:08,780 --> 00:46:10,360 to other areas of memory 1289 00:46:10,360 --> 00:46:12,600 or other areas of the file system things like that 1290 00:46:14,080 --> 00:46:14,840 MS has 1291 00:46:14,840 --> 00:46:16,200 an access control 1292 00:46:16,200 --> 00:46:18,320 what they call mandatory integrity control model 1293 00:46:18,320 --> 00:46:20,640 in Vista this is the thing you click allow 1294 00:46:20,640 --> 00:46:21,480 allow allow allow allow 1295 00:46:21,480 --> 00:46:23,120 when it pops up 1296 00:46:24,800 --> 00:46:26,800 so in Big Iron Unix 1297 00:46:26,800 --> 00:46:28,320 you have trusted Solaris 1298 00:46:28,320 --> 00:46:30,320 and HPEX has a C2 trusted mode these are 1299 00:46:30,320 --> 00:46:32,160 sort of other ways to kind of like say contain 1300 00:46:32,810 --> 00:46:34,540 execution based on I mean to contain 1301 00:46:34,540 --> 00:46:36,680 file permissions and things like that based on 1302 00:46:36,680 --> 00:46:37,000 user ID 1303 00:46:38,320 --> 00:46:39,700 and then Little Iron Unix 1304 00:46:40,200 --> 00:46:42,680 trusted BSD which is part of FreeBSD 1305 00:46:42,840 --> 00:46:44,220 from 5 up and then 1306 00:46:44,740 --> 00:46:46,420 I actually I guess should mention 1307 00:46:46,420 --> 00:46:47,920 that OpenBSD has the 1308 00:46:47,920 --> 00:46:50,660 SysTrace stuff which is some other ways to 1309 00:46:50,660 --> 00:46:51,880 to control 1310 00:46:52,540 --> 00:46:54,240 what applications can and can't do 1311 00:46:56,040 --> 00:46:56,800 Mac has 1312 00:46:56,800 --> 00:46:58,680 Mac now apparently 1313 00:46:58,680 --> 00:47:00,280 it's actually part of Leopard 1314 00:47:00,880 --> 00:47:02,680 it was I didn't find a lot of 1315 00:47:02,680 --> 00:47:04,240 docs on it it was announced at the 1316 00:47:05,380 --> 00:47:06,760 WWDC that it was 1317 00:47:06,760 --> 00:47:08,100 going to be integrated and 1318 00:47:08,660 --> 00:47:10,680 then there's if you check on Apple's site 1319 00:47:10,680 --> 00:47:12,040 there's like no docs so if anybody's 1320 00:47:12,840 --> 00:47:14,420 got docs on how to do this stuff in Leopard 1321 00:47:15,200 --> 00:47:16,360 you know let me know 1322 00:47:16,980 --> 00:47:18,700 there's some of that was an offshoot of a 1323 00:47:18,700 --> 00:47:20,740 project called SE Darwin which is an attempt 1324 00:47:20,740 --> 00:47:22,360 to kind of 1325 00:47:22,360 --> 00:47:24,360 include some of the SE Linux features and the 1326 00:47:25,120 --> 00:47:26,620 trusted BSD features into 1327 00:47:27,460 --> 00:47:28,260 into Darwin 1328 00:47:30,700 --> 00:47:32,500 OpenBSD is as I think 1329 00:47:32,500 --> 00:47:34,520 probably most people know done a lot of work with 1330 00:47:34,520 --> 00:47:36,040 ProPolice, WXRX 1331 00:47:36,920 --> 00:47:38,300 they've got a lot of other things 1332 00:47:38,300 --> 00:47:40,260 one of the things that the OpenBSD guys 1333 00:47:41,100 --> 00:47:42,640 ran into a lot of debate with 1334 00:47:42,840 --> 00:47:44,460 the Pax people about is 1335 00:47:45,000 --> 00:47:46,200 the mprotect function call 1336 00:47:46,940 --> 00:47:48,720 which like I say allows you to kind of 1337 00:47:48,720 --> 00:47:50,800 say this check of memory sort of opts 1338 00:47:50,800 --> 00:47:51,780 out of the model 1339 00:47:53,200 --> 00:47:54,620 their belief is that breaks 1340 00:47:54,620 --> 00:47:55,660 positive compliance 1341 00:47:56,380 --> 00:47:58,500 and that's all well and good but I like the fact 1342 00:47:59,460 --> 00:48:00,620 that with Pax and 1343 00:48:00,620 --> 00:48:01,780 GRSec I can turn it off 1344 00:48:02,660 --> 00:48:04,480 I'd like the option to say no I don't want that 1345 00:48:04,480 --> 00:48:05,720 even if it breaks some of my stuff 1346 00:48:07,680 --> 00:48:08,440 kernel randomization 1347 00:48:09,360 --> 00:48:10,600 is from what I understand 1348 00:48:10,600 --> 00:48:12,340 out there if somebody wants to tell me wrong 1349 00:48:12,840 --> 00:48:12,980 I'll go for it 1350 00:48:15,160 --> 00:48:16,700 but recently you've seen 1351 00:48:16,700 --> 00:48:18,780 a lot of kernel based vulnerabilities in OpenBSD 1352 00:48:18,780 --> 00:48:19,960 and I think that's probably a factor 1353 00:48:20,660 --> 00:48:21,900 Pax does do 1354 00:48:22,700 --> 00:48:24,360 some randomization of the kernel stack 1355 00:48:25,540 --> 00:48:26,060 FreeBSD 1356 00:48:26,060 --> 00:48:28,340 there are some ports of some of the 1357 00:48:28,340 --> 00:48:30,000 OpenBSD stuff to FreeBSD so 1358 00:48:30,000 --> 00:48:31,440 just google for like 1359 00:48:32,280 --> 00:48:33,320 SSP FreeBSD 1360 00:48:34,140 --> 00:48:35,820 and there's this guy 1361 00:48:35,820 --> 00:48:38,600 his URL is out there I'll have the slides out 1362 00:48:39,340 --> 00:48:40,140 pretty soon 1363 00:48:40,140 --> 00:48:41,020 sorry they're not on the CD 1364 00:48:42,840 --> 00:48:44,920 but this guy's ported some of the stuff to FreeBSD 1365 00:48:44,920 --> 00:48:46,300 if you're not doing that 1366 00:48:46,300 --> 00:48:47,920 and you're running FreeBSD all you're getting is 1367 00:48:47,920 --> 00:48:50,040 sort of very rudimentary no exec stack 1368 00:48:50,040 --> 00:48:52,760 the NetBSD guys have been pretty 1369 00:48:52,760 --> 00:48:54,460 active on some of this and they really have been 1370 00:48:54,460 --> 00:48:56,320 looking at Pax and trying to kind of 1371 00:48:56,320 --> 00:48:58,020 add some of these features into NetBSD 1372 00:48:59,720 --> 00:49:00,200 so 1373 00:49:00,820 --> 00:49:01,520 with Linux 1374 00:49:02,400 --> 00:49:04,460 you know with the integration of 1375 00:49:04,460 --> 00:49:06,740 Propolis into GCC 4.1 1376 00:49:06,740 --> 00:49:08,860 kind of everybody has some bits of this 1377 00:49:09,820 --> 00:49:10,840 the Ubuntu guys 1378 00:49:11,820 --> 00:49:12,400 there's a 1379 00:49:13,200 --> 00:49:14,800 offshoot of Ubuntu called Ubuntu Hard 1380 00:49:14,800 --> 00:49:16,480 and there have been a couple different Linux 1381 00:49:16,480 --> 00:49:18,420 distributions that have been centered on some of this stuff 1382 00:49:20,060 --> 00:49:20,460 the 1383 00:49:20,460 --> 00:49:21,480 Emunix guys 1384 00:49:22,460 --> 00:49:22,860 the 1385 00:49:25,860 --> 00:49:26,660 Adamantix guys 1386 00:49:26,660 --> 00:49:28,560 that were working on some of these bits for 1387 00:49:29,360 --> 00:49:29,760 Debian 1388 00:49:29,760 --> 00:49:32,720 but the two that are most active that are actually 1389 00:49:32,720 --> 00:49:33,860 doing a lot of this stuff 1390 00:49:34,560 --> 00:49:36,160 are the Harden Gen 2 project 1391 00:49:37,360 --> 00:49:38,960 and let's say Ubuntu Harden 1392 00:49:39,700 --> 00:49:40,920 they've been sort of 1393 00:49:40,920 --> 00:49:42,780 trying to move some of this stuff and you go out to the 1394 00:49:42,840 --> 00:49:44,620 Ubuntu site they have something called the Ubuntu Security 1395 00:49:44,620 --> 00:49:46,960 Roadmap that talks a lot about this stuff 1396 00:49:46,960 --> 00:49:48,580 and actually for me 1397 00:49:48,580 --> 00:49:50,220 that's probably where I got most interested 1398 00:49:50,220 --> 00:49:52,040 in this was just kind of reading through 1399 00:49:52,040 --> 00:49:54,780 a guy named John Richard Moser who's thinking about 1400 00:49:54,780 --> 00:49:55,660 a lot of this stuff for Ubuntu 1401 00:49:56,780 --> 00:49:58,660 like say in GCC everybody 1402 00:49:58,660 --> 00:50:00,800 has at least the Propolis stuff 1403 00:50:00,800 --> 00:50:01,740 but if you look through 1404 00:50:02,660 --> 00:50:04,380 the bug reports for 1405 00:50:04,380 --> 00:50:06,760 most of the Linux distributions you'll see a lot of 1406 00:50:06,760 --> 00:50:08,440 stuff about hey this broke my code so I did 1407 00:50:08,440 --> 00:50:09,740 fno stack protector all 1408 00:50:10,180 --> 00:50:12,640 so I just turned it off because you know something 1409 00:50:12,840 --> 00:50:13,880 broke so 1410 00:50:14,720 --> 00:50:16,380 actually what I will say is that 1411 00:50:16,380 --> 00:50:17,660 that is one thing that the 1412 00:50:18,480 --> 00:50:20,160 OpenBSD guys are pretty 1413 00:50:21,160 --> 00:50:22,820 impressive to me about is they've kind of said 1414 00:50:22,820 --> 00:50:24,640 you know no we're going to make 1415 00:50:24,640 --> 00:50:26,680 this work sorry so you know 1416 00:50:26,680 --> 00:50:27,480 it's pretty cool 1417 00:50:30,040 --> 00:50:30,520 Vista 1418 00:50:30,520 --> 00:50:32,780 the least explosive Ford Pinto 1419 00:50:32,780 --> 00:50:33,100 ever 1420 00:50:35,300 --> 00:50:36,360 so you know 1421 00:50:36,360 --> 00:50:38,340 they've made a lot of progress 1422 00:50:39,620 --> 00:50:40,540 you know I 1423 00:50:40,540 --> 00:50:42,460 guess what I would say is they sit where 1424 00:50:42,840 --> 00:50:44,660 some of the security centric 1425 00:50:44,660 --> 00:50:46,740 open source projects were about 1426 00:50:46,740 --> 00:50:48,740 02 you know so that 1427 00:50:48,740 --> 00:50:50,860 I mean that's really that's pretty cool 1428 00:50:50,860 --> 00:50:52,780 when you consider that they're a commodity 1429 00:50:52,780 --> 00:50:54,180 operating system that everybody 1430 00:50:54,180 --> 00:50:56,360 you know they have to support thousands of different 1431 00:50:56,360 --> 00:50:58,720 closed source applications that run on their platforms 1432 00:50:58,720 --> 00:50:59,040 right 1433 00:51:00,260 --> 00:51:02,460 so they have ASLR 1434 00:51:02,460 --> 00:51:04,420 they have some basic position independent 1435 00:51:04,420 --> 00:51:05,500 executable stuff 1436 00:51:06,620 --> 00:51:08,780 the biggest problem they seem to 1437 00:51:08,780 --> 00:51:10,660 have is the consistency 1438 00:51:10,660 --> 00:51:12,600 so there have been a number of Windows based vulnerabilities 1439 00:51:12,840 --> 00:51:13,120 where 1440 00:51:14,560 --> 00:51:16,760 you've seen things where people went through 1441 00:51:16,760 --> 00:51:18,260 and said well wait a minute why didn't this 1442 00:51:18,740 --> 00:51:19,940 get taken care of and 1443 00:51:20,880 --> 00:51:21,840 it's been because 1444 00:51:22,880 --> 00:51:24,560 it was compiled with different versions 1445 00:51:24,560 --> 00:51:26,680 of Visual Studio that didn't have all the same 1446 00:51:26,680 --> 00:51:27,880 bits or you know 1447 00:51:29,660 --> 00:51:30,460 the also 1448 00:51:30,460 --> 00:51:32,740 like I say the ability on a sort of software basis 1449 00:51:32,740 --> 00:51:34,580 to opt out of some of this stuff to me I think 1450 00:51:34,580 --> 00:51:35,280 is part of their problem 1451 00:51:37,100 --> 00:51:38,700 something you may want to check out 1452 00:51:38,700 --> 00:51:39,920 if you're interested in this stuff is 1453 00:51:39,920 --> 00:51:41,060 these guys Wayness 1454 00:51:42,840 --> 00:51:43,340 I think an app 1455 00:51:43,340 --> 00:51:46,020 in a series of sort of binary 1456 00:51:47,180 --> 00:51:48,220 drivers that 1457 00:51:48,840 --> 00:51:49,760 allow you to have 1458 00:51:49,760 --> 00:51:52,120 some ASLR for 1459 00:51:52,120 --> 00:51:53,120 2003 and XP 1460 00:51:53,860 --> 00:51:55,320 which is not something you really get 1461 00:51:55,320 --> 00:51:57,920 basically 2003 and XP basically just got kind of 1462 00:51:57,920 --> 00:51:59,060 some of the GS stuff 1463 00:51:59,060 --> 00:52:01,500 and a rudimentary sort of no exec stat 1464 00:52:03,660 --> 00:52:04,380 OS X 1465 00:52:04,380 --> 00:52:06,260 I think obscurity 1466 00:52:07,140 --> 00:52:07,660 so 1467 00:52:07,660 --> 00:52:10,280 3% of the market share means that we're 1468 00:52:10,700 --> 00:52:12,520 absolutely rock solid and unbreakable 1469 00:52:13,100 --> 00:52:13,840 it's true 1470 00:52:15,180 --> 00:52:16,700 you get a no exec stack 1471 00:52:16,700 --> 00:52:18,060 in the kernel because they deal 1472 00:52:18,060 --> 00:52:20,320 a lot of their stuff kind of ties into FreeBSD stuff 1473 00:52:20,320 --> 00:52:22,220 and Darwin is coming for some of that 1474 00:52:22,220 --> 00:52:24,180 so you have basic no exec stack 1475 00:52:24,180 --> 00:52:25,800 that said no ASLR 1476 00:52:26,620 --> 00:52:27,600 no pic no pi 1477 00:52:29,000 --> 00:52:30,520 you know I think 1478 00:52:30,520 --> 00:52:32,900 that Apple is going to continue 1479 00:52:32,900 --> 00:52:34,640 to have a problem with this until they really 1480 00:52:34,640 --> 00:52:36,400 sort of take this stuff seriously 1481 00:52:36,960 --> 00:52:38,420 right now I say 1482 00:52:38,420 --> 00:52:40,340 it's more about not being a very visible target 1483 00:52:40,340 --> 00:52:42,720 I think that is why they can say 1484 00:52:42,840 --> 00:52:43,420 they're so rock solid 1485 00:52:47,620 --> 00:52:48,100 so 1486 00:52:49,420 --> 00:52:50,380 belts, suspenders 1487 00:52:50,880 --> 00:52:52,400 you know kind of both 1488 00:52:53,520 --> 00:52:54,820 every defensive measure 1489 00:52:54,820 --> 00:52:56,720 can be defeated in a vacuum 1490 00:52:57,220 --> 00:52:57,700 basically 1491 00:52:58,780 --> 00:53:00,800 the reason that I got interested in this 1492 00:53:00,800 --> 00:53:02,740 was that all the material 1493 00:53:02,740 --> 00:53:04,480 that I could find was either written by somebody who 1494 00:53:04,480 --> 00:53:06,900 and actually let me say with one exception 1495 00:53:06,900 --> 00:53:08,020 if you go to the PAC site 1496 00:53:08,660 --> 00:53:11,000 those guys have this stuff very well documented 1497 00:53:11,900 --> 00:53:12,820 there's a lot of 1498 00:53:12,840 --> 00:53:14,040 really great docs out there 1499 00:53:14,040 --> 00:53:16,140 of just going through how this stuff works 1500 00:53:16,140 --> 00:53:18,400 and so if you want to start somewhere to understand it 1501 00:53:18,400 --> 00:53:20,080 whether you run PACs or don't 1502 00:53:20,080 --> 00:53:21,900 go check that out because it's pretty cool 1503 00:53:21,900 --> 00:53:24,800 but you know 1504 00:53:24,800 --> 00:53:26,620 most of the things that I found 1505 00:53:26,620 --> 00:53:28,640 either were written by somebody who wrote a defensive 1506 00:53:28,640 --> 00:53:30,300 mechanism and said how unbreakable it was 1507 00:53:30,300 --> 00:53:32,880 or somebody who wrote or came up with a method 1508 00:53:32,880 --> 00:53:34,160 to defeat that mechanism and said 1509 00:53:34,160 --> 00:53:36,420 how there was no way around what they came up with 1510 00:53:36,420 --> 00:53:38,560 so this is kind of trying to look at both sides 1511 00:53:40,000 --> 00:53:40,560 you know 1512 00:53:40,560 --> 00:53:41,940 volmprog.c will always get on 1513 00:53:43,020 --> 00:53:43,900 one other 1514 00:53:44,340 --> 00:53:46,100 piece that you should check out is 1515 00:53:46,960 --> 00:53:48,480 PACsTest and Vistaprobe 1516 00:53:48,480 --> 00:53:49,560 they're available for 1517 00:53:50,640 --> 00:53:52,780 PACsTest for example is probably built on just about every platform 1518 00:53:52,780 --> 00:53:54,340 you can run this and kind of look at 1519 00:53:54,340 --> 00:53:56,600 on your box what do you have turned on 1520 00:53:56,600 --> 00:53:58,360 and how much of this stuff is there 1521 00:54:00,160 --> 00:54:02,420 and then Vistaprobe actually was written for 1522 00:54:02,420 --> 00:54:04,200 Vista to look at some of this stuff 1523 00:54:04,200 --> 00:54:06,640 and it basically runs through some simulated 1524 00:54:07,860 --> 00:54:08,300 exploits 1525 00:54:08,300 --> 00:54:09,840 to kind of gauge your 1526 00:54:10,560 --> 00:54:12,220 how effective the different measures are 1527 00:54:12,220 --> 00:54:14,620 so like stack execution with and protect 1528 00:54:14,620 --> 00:54:14,940 without 1529 00:54:15,880 --> 00:54:18,300 stuff like that and then it tries to predict how many bits of 1530 00:54:18,300 --> 00:54:19,920 randomization you have for your libraries 1531 00:54:19,920 --> 00:54:21,020 and executables 1532 00:54:21,840 --> 00:54:24,080 so it'll tell you sort of where you sit 1533 00:54:25,040 --> 00:54:26,080 and like I say 1534 00:54:26,080 --> 00:54:27,120 same for PACsTest 1535 00:54:28,040 --> 00:54:29,780 there's some debate about PACsTest on 1536 00:54:31,240 --> 00:54:31,680 other 1537 00:54:32,720 --> 00:54:33,600 security platforms 1538 00:54:34,220 --> 00:54:36,220 is it sort of centric 1539 00:54:36,220 --> 00:54:36,920 on PACs but 1540 00:54:36,920 --> 00:54:40,400 it is about the only thing 1541 00:54:40,560 --> 00:54:42,280 out there that you can sort of as an average person run 1542 00:54:42,280 --> 00:54:44,300 and get some idea of where you sit 1543 00:54:44,300 --> 00:54:47,340 I have five minutes 1544 00:54:47,340 --> 00:54:50,180 let me say just 1545 00:54:50,180 --> 00:54:51,920 real briefly the 1546 00:54:51,920 --> 00:54:52,940 own the box 1547 00:54:53,720 --> 00:54:54,240 thing 1548 00:54:55,940 --> 00:54:58,360 you know where that came from 1549 00:54:58,360 --> 00:55:00,540 was that I actually 1550 00:55:00,540 --> 00:55:02,440 sort of wanted to find out 1551 00:55:02,440 --> 00:55:03,460 not knowing 1552 00:55:04,000 --> 00:55:06,100 how effective sort of 1553 00:55:06,100 --> 00:55:08,260 really being able to say unequivocally myself 1554 00:55:09,080 --> 00:55:10,540 you know how good is this stuff 1555 00:55:11,180 --> 00:55:11,560 what 1556 00:55:12,480 --> 00:55:14,340 sort of I proposed originally 1557 00:55:14,340 --> 00:55:16,600 to the DEF CON folks was that I was going to bring a box 1558 00:55:16,600 --> 00:55:17,700 plug it in the network 1559 00:55:18,480 --> 00:55:19,560 and build it with 1560 00:55:20,000 --> 00:55:22,600 in my case like Jenjoo Harden and all the PACsBits 1561 00:55:23,180 --> 00:55:23,560 and 1562 00:55:25,440 --> 00:55:26,660 put some services 1563 00:55:26,660 --> 00:55:28,280 some apps on there 1564 00:55:28,280 --> 00:55:29,560 that are sort of old versions 1565 00:55:30,300 --> 00:55:32,320 and then when they 1566 00:55:32,320 --> 00:55:34,500 decided that that was something they would want to 1567 00:55:34,500 --> 00:55:36,300 promote I decided 1568 00:55:36,300 --> 00:55:38,160 I didn't really want to make it about just me 1569 00:55:38,160 --> 00:55:40,540 so I sort of asked lots of other random people to do this 1570 00:55:40,560 --> 00:55:40,920 same thing 1571 00:55:42,320 --> 00:55:44,280 and so it actually I guess 1572 00:55:44,280 --> 00:55:46,400 I would say if you've had any 1573 00:55:46,400 --> 00:55:48,020 involvement with any of the people that have 1574 00:55:48,500 --> 00:55:50,500 sort of glommed together and are working on it 1575 00:55:50,500 --> 00:55:52,040 it's kind of become more like the 1576 00:55:52,040 --> 00:55:53,440 own the anti-cardware project 1577 00:55:53,440 --> 00:55:56,220 so not a lot of people wanted to bring boxes to get owned at DEF CON 1578 00:55:57,500 --> 00:55:58,420 I thought it was 1579 00:55:58,420 --> 00:55:59,180 a good idea I don't know 1580 00:55:59,180 --> 00:56:02,120 so if you're interested in like old 1581 00:56:02,120 --> 00:56:03,920 Sun IPXs and like an old NexBox 1582 00:56:03,920 --> 00:56:06,100 and things and you have some stuff that will work on that 1583 00:56:06,100 --> 00:56:07,640 you know it's sitting out there 1584 00:56:08,280 --> 00:56:10,500 what I will say about my stuff is that 1585 00:56:10,560 --> 00:56:11,840 I brought 1586 00:56:11,840 --> 00:56:13,960 actually a pretty nice piece of hardware 1587 00:56:15,120 --> 00:56:15,760 running 1588 00:56:15,760 --> 00:56:17,560 in my case like 1589 00:56:18,400 --> 00:56:20,680 1.3.37 of Apache 1590 00:56:20,680 --> 00:56:22,400 that should be vulnerable 1591 00:56:22,400 --> 00:56:23,940 to the mod rewrite 1592 00:56:24,640 --> 00:56:25,900 overflow and 1593 00:56:26,440 --> 00:56:28,220 open SSH some other things 1594 00:56:28,220 --> 00:56:30,480 I think 1595 00:56:30,480 --> 00:56:32,420 really the reality is that people 1596 00:56:32,420 --> 00:56:33,860 that are sharp enough to 1597 00:56:34,560 --> 00:56:36,580 to actually look at 1598 00:56:36,580 --> 00:56:38,400 some other ways to get around some of the things that 1599 00:56:38,400 --> 00:56:40,160 I have turned on 1600 00:56:40,560 --> 00:56:41,960 probably not really interested in my 1601 00:56:41,960 --> 00:56:43,220 like shitty $500 server 1602 00:56:43,220 --> 00:56:45,480 but if anybody 1603 00:56:45,480 --> 00:56:47,700 wants to talk about some of this stuff 1604 00:56:47,700 --> 00:56:48,600 and tell me why I'm wrong 1605 00:56:49,240 --> 00:56:49,820 that's cool 1606 00:56:51,860 --> 00:56:52,640 that's about it 1607 00:56:52,640 --> 00:56:54,700 thanks guys thanks for sitting through this 1608 00:56:54,700 --> 00:56:55,460 waiting for Atlas