1 00:00:00,000 --> 00:00:03,120 So anyway, we're going to talk about something that's totally not video game related. 2 00:00:03,280 --> 00:00:05,020 Also, I have a slamming head cold. 3 00:00:06,080 --> 00:00:10,140 Of all the years I've been going to cons, the only two times I've ever gotten sick 4 00:00:10,140 --> 00:00:15,300 were once previous at DEFCON, I went to like a Vietnamese place and apparently it tried to kill me. 5 00:00:15,920 --> 00:00:19,260 And I spent the entire weekend at the Alexis Park on the bed, which is not, 6 00:00:19,900 --> 00:00:23,260 say what you will about the RIV, but being the AP in bed all weekend really sucked. 7 00:00:24,200 --> 00:00:25,700 And now I have a head cold. 8 00:00:25,700 --> 00:00:28,440 So, this is Logan. He will be assisting. 9 00:00:28,780 --> 00:00:29,000 Howdy. 10 00:00:29,320 --> 00:00:30,300 Howdy, as needed. 11 00:00:30,820 --> 00:00:33,300 And maybe we'll be dragging other people on stage here too. 12 00:00:33,420 --> 00:00:35,560 This may turn into a giant dance of random people. 13 00:00:35,820 --> 00:00:38,640 First of all, that really is the title of the talk. 14 00:00:38,780 --> 00:00:41,300 Not a statement about what we needed to do to the title. 15 00:00:42,000 --> 00:00:46,140 So people asked, it looks like they screwed up your title and they didn't have the final one in there. 16 00:00:46,240 --> 00:00:47,900 I'm like, no really, that's the fucking title. 17 00:00:49,100 --> 00:00:50,520 Apparently it's the worst title ever. 18 00:00:50,700 --> 00:00:54,620 And I assume nobody was actually going to be here for this talk, so I think you're all in the wrong room. 19 00:00:54,820 --> 00:00:55,180 Um. 20 00:00:55,820 --> 00:00:57,440 You're probably looking for the Android talk. 21 00:00:57,640 --> 00:00:58,360 I think it's in track one. 22 00:01:01,660 --> 00:01:03,340 Oh, that's goons in the hallway talking. 23 00:01:03,540 --> 00:01:05,160 Did they leave the doors open the entire time now? 24 00:01:06,180 --> 00:01:06,540 Yup. 25 00:01:06,620 --> 00:01:06,820 Yup. 26 00:01:07,360 --> 00:01:08,540 Wow, that's awesome. 27 00:01:08,740 --> 00:01:10,380 How lucky for you in the back. 28 00:01:10,600 --> 00:01:14,380 If you want to have a separate conversation in the back of the room, you are welcome to do it because we won't hear you up here. 29 00:01:15,980 --> 00:01:20,260 Also, just to be clear, Logan, when he joined the shmoo group, did not choose his handle. 30 00:01:20,460 --> 00:01:23,240 He refused to come up with a name for himself, so we chose one for him. 31 00:01:23,720 --> 00:01:25,680 Just to be clear, it's pronounced Logan. 32 00:01:25,680 --> 00:01:30,380 It's not Lolo, but it's actually L0L0 because it's really difficult to tell on screen. 33 00:01:30,620 --> 00:01:32,760 So if you want to send an email, that's how you get a hold of him. 34 00:01:33,560 --> 00:01:35,300 That's why it's always a good idea to pick a handle. 35 00:01:35,580 --> 00:01:37,880 Yeah, you always, always, always want to pick your own handle. 36 00:01:37,940 --> 00:01:39,560 When they give an option, what do you want the username to be? 37 00:01:39,720 --> 00:01:41,180 You pick the fucking username, okay? 38 00:01:41,240 --> 00:01:45,220 You don't let them decide because it will be like, you know, the worst thing imaginable. 39 00:01:45,360 --> 00:01:46,280 That's actually not that bad. 40 00:01:46,400 --> 00:01:49,500 It doesn't involve expletives or any discussion of the sexual prowess. 41 00:01:50,000 --> 00:01:50,040 Um. 42 00:01:51,940 --> 00:01:54,020 Today is the trade deadline in what? 43 00:01:54,200 --> 00:01:55,420 50 minutes to an hour? 44 00:01:55,680 --> 00:01:59,320 For MLB, for like the eight Major League Baseball fans that attend DEFCON. 45 00:01:59,640 --> 00:02:00,920 Not a large overlap. 46 00:02:01,960 --> 00:02:03,960 They're all in here actually, it turns out. 47 00:02:04,200 --> 00:02:05,720 All eight baseball fans. 48 00:02:05,880 --> 00:02:09,520 If someone could tell me if Adam Dunn gets traded, I am the one Nationals fan in the country. 49 00:02:10,180 --> 00:02:10,300 So. 50 00:02:11,840 --> 00:02:14,640 If you go to the Nationals website, it's actually personalized. 51 00:02:14,760 --> 00:02:15,700 Hey Bruce, welcome back. 52 00:02:17,960 --> 00:02:20,520 We'd really appreciate it if you bought a couple thousand more season tickets. 53 00:02:22,000 --> 00:02:22,440 Anyway. 54 00:02:24,160 --> 00:02:24,680 Hasn't yet. 55 00:02:24,840 --> 00:02:25,240 Thank you. 56 00:02:25,680 --> 00:02:29,700 If we get like a ticker going, if you want to hack this VGA monitor and put a ticker on the bottom like, 57 00:02:29,780 --> 00:02:30,720 Has Adam Dunn been traded? 58 00:02:30,820 --> 00:02:31,540 Does this talk suck? 59 00:02:32,340 --> 00:02:32,380 Um. 60 00:02:33,980 --> 00:02:34,820 First things first. 61 00:02:35,080 --> 00:02:36,260 What's the only thing you should believe? 62 00:02:37,360 --> 00:02:37,720 Nothing. 63 00:02:37,860 --> 00:02:38,220 Nothing. 64 00:02:38,340 --> 00:02:38,460 Well. 65 00:02:39,040 --> 00:02:39,620 Source code. 66 00:02:39,720 --> 00:02:40,340 Who said source code? 67 00:02:41,060 --> 00:02:41,660 Yeah, bingo. 68 00:02:41,780 --> 00:02:43,060 That's exactly what I was going for. 69 00:02:43,120 --> 00:02:43,560 Holy shit. 70 00:02:43,720 --> 00:02:44,680 Like, congratulations, sir. 71 00:02:44,720 --> 00:02:45,320 You get a gold star. 72 00:02:45,680 --> 00:02:46,040 Woohoo! 73 00:02:47,480 --> 00:02:48,200 Come on now. 74 00:02:48,320 --> 00:02:48,620 Woohoo! 75 00:02:49,940 --> 00:02:50,660 There we go. 76 00:02:50,760 --> 00:02:51,180 Thank you. 77 00:02:51,740 --> 00:02:54,460 It's really easy to get people to yell at DEFCON. 78 00:02:54,800 --> 00:02:55,160 Um. 79 00:02:56,260 --> 00:02:58,940 So the first thing you shouldn't believe is the speakers. 80 00:03:00,080 --> 00:03:01,860 And usually that's my opening slide. 81 00:03:02,100 --> 00:03:03,220 And I'm just still going to say it verbally. 82 00:03:03,860 --> 00:03:06,080 Years and years and years ago, I remember coming to DEFCON. 83 00:03:06,300 --> 00:03:08,080 And I was really excited about the partying. 84 00:03:08,180 --> 00:03:09,260 And the partying was pretty good. 85 00:03:09,480 --> 00:03:10,920 But some of the talks kind of sucked. 86 00:03:12,080 --> 00:03:16,760 And even when I went to other conferences that were more expensive and a couple days before DEFCON. 87 00:03:16,940 --> 00:03:20,380 And I would go to those conferences. 88 00:03:20,560 --> 00:03:23,680 And people would get up on stage and they would say shit like one and one is three. 89 00:03:23,680 --> 00:03:26,580 And like reporters would then report on the fact that one and one is now three. 90 00:03:26,660 --> 00:03:28,640 Because some random asshole on stage said it. 91 00:03:28,720 --> 00:03:30,520 And you're like, oh, that's amazingly stupid. 92 00:03:30,860 --> 00:03:34,620 So I encourage you when you come to DEFCON, you know, this is an industry filled with 93 00:03:34,620 --> 00:03:35,160 cynical people. 94 00:03:35,420 --> 00:03:36,640 And we get paid to be cynical. 95 00:03:36,800 --> 00:03:39,940 And we get paid not to believe what people are telling us and what computers tell us. 96 00:03:40,060 --> 00:03:43,620 So when you walk into here and you stand in line, don't check your brain at the door. 97 00:03:43,820 --> 00:03:45,020 You know, continue to think. 98 00:03:45,520 --> 00:03:49,680 This project that we're going to show today is the results of many late nights in the 99 00:03:49,680 --> 00:03:53,160 last two weeks in proper DEFCON form. 100 00:03:53,160 --> 00:03:55,740 But it's really just kind of our view of the world. 101 00:03:55,860 --> 00:03:57,660 And if you disagree, feel free to stand up. 102 00:03:57,920 --> 00:04:01,520 We'll even, I'll arm you with microphones if you want to be that guy and hijack it. 103 00:04:01,580 --> 00:04:02,240 I mean, we can go that. 104 00:04:02,340 --> 00:04:03,120 We can play that game. 105 00:04:03,240 --> 00:04:04,560 Because we're pretty good at doing that, too. 106 00:04:04,680 --> 00:04:06,400 So we can hijack around and talk back. 107 00:04:08,300 --> 00:04:11,380 Anyway, so what did we do here? 108 00:04:13,200 --> 00:04:17,880 What we really felt like doing with this project was trying to dig through source code and 109 00:04:17,880 --> 00:04:19,140 not look at the code at all. 110 00:04:20,040 --> 00:04:23,140 And what we really wanted to look at was the metadata associated with it. 111 00:04:23,160 --> 00:04:26,580 And primarily, comments associated with the code and the commit statements. 112 00:04:27,160 --> 00:04:27,220 Okay? 113 00:04:27,400 --> 00:04:29,800 I mean, how many people in here are software developers? 114 00:04:30,500 --> 00:04:30,940 Yay. 115 00:04:30,980 --> 00:04:32,760 How many people in here are software developers that don't suck? 116 00:04:34,900 --> 00:04:36,020 You all lie. 117 00:04:39,560 --> 00:04:43,800 We've all enraged at the end of a long night of coding, checked in something like this 118 00:04:43,800 --> 00:04:45,400 is the biggest ass-hattery ever. 119 00:04:46,420 --> 00:04:48,080 Fuck you and fuck your mother. 120 00:04:48,320 --> 00:04:48,920 Fuck this. 121 00:04:48,980 --> 00:04:49,360 I'm done. 122 00:04:49,520 --> 00:04:50,700 Fuck, fuck, fuck, fuck, fuck. 123 00:04:51,640 --> 00:04:52,600 Shift ZZ out. 124 00:04:54,780 --> 00:04:55,140 Right? 125 00:04:55,780 --> 00:04:56,560 We've all done it. 126 00:04:56,680 --> 00:04:59,960 And so, you know, there's, honestly, I've been curious about this for a long time, of, 127 00:05:00,200 --> 00:05:02,740 you know, what do people, what do other people write? 128 00:05:02,840 --> 00:05:03,800 Because I know that's what I write. 129 00:05:03,920 --> 00:05:07,140 Like, I write stuff and commit statements just to see if anyone reads them. 130 00:05:08,220 --> 00:05:12,900 I put things in things, it was actually in one of the Shrew Group internal lists, like, 131 00:05:12,960 --> 00:05:15,860 years ago I was doing a project and I put something way down in some documentation. 132 00:05:16,140 --> 00:05:19,820 I'm like, if anyone ever reads this, post to the list, purple monkey, robot chicken. 133 00:05:20,320 --> 00:05:20,680 And I'm like, okay. 134 00:05:20,680 --> 00:05:23,880 And, like, two years later, someone just, like, posted one-liners, like, purple monkey, 135 00:05:23,980 --> 00:05:24,340 robot chicken. 136 00:05:24,460 --> 00:05:25,260 I'm like, son of a bitch! 137 00:05:25,500 --> 00:05:28,360 Like, holy crap, you read it! 138 00:05:29,860 --> 00:05:30,960 How many people have done that? 139 00:05:31,080 --> 00:05:31,500 Like, randomly? 140 00:05:31,780 --> 00:05:32,740 No one ever reads this? 141 00:05:32,820 --> 00:05:33,740 I don't know why the hell I even try? 142 00:05:33,900 --> 00:05:34,320 Yeah, right. 143 00:05:35,700 --> 00:05:40,100 So, what we wanted to do is go through and look for, first of all, just amusement factor. 144 00:05:40,380 --> 00:05:43,320 You know, we're going to build a ginormous database and spend hundreds of hours doing 145 00:05:43,320 --> 00:05:43,980 this just for amusement. 146 00:05:44,120 --> 00:05:47,920 But also, because we think there's actually security-specific information, where people 147 00:05:47,920 --> 00:05:50,660 say things like, hey, we need to go back and fix this later. 148 00:05:50,660 --> 00:05:52,920 Because it's a big vulnerability, dot, dot, dot. 149 00:05:53,100 --> 00:05:55,000 You know, did that code ever get checked again? 150 00:05:55,200 --> 00:05:56,440 You know, did that ever get modified? 151 00:05:56,740 --> 00:05:57,220 I don't know. 152 00:05:57,360 --> 00:05:58,280 Let's go find out. 153 00:05:58,720 --> 00:06:03,900 And so the purpose of this project was really to provide an analytical tool to allow us 154 00:06:03,900 --> 00:06:08,080 to do that kind of analysis, to find where people have said things in the metadata associated 155 00:06:08,080 --> 00:06:12,540 with code, you know, we plan on going back and doing this or this is a problem and using 156 00:06:12,540 --> 00:06:13,720 that to do static analysis. 157 00:06:14,000 --> 00:06:16,820 Because it turns out that real static analysis is hard. 158 00:06:17,040 --> 00:06:18,620 And we didn't want to do anything difficult. 159 00:06:19,220 --> 00:06:19,620 Okay. 160 00:06:20,380 --> 00:06:23,800 But as we'll talk about later, it turns out TurboGears is almost as difficult as static 161 00:06:23,800 --> 00:06:24,880 analysis of source code. 162 00:06:25,780 --> 00:06:28,740 So but apparently no one is actually trying to use TurboGears in here. 163 00:06:29,880 --> 00:06:33,660 There are a bunch of static analysis tools out there that look at source code, that do 164 00:06:33,660 --> 00:06:34,180 a good job. 165 00:06:34,420 --> 00:06:37,500 There's a bunch of different philosophies on how to look at source code, and that totally 166 00:06:37,500 --> 00:06:38,200 wasn't our point. 167 00:06:38,380 --> 00:06:41,120 You know, we weren't trying to go actually look at the code itself. 168 00:06:41,700 --> 00:06:45,820 We figured we're just going to let the developers tell us what's wrong. 169 00:06:46,060 --> 00:06:49,120 And honestly, there are a number of instances where they just outright say, hey, this is 170 00:06:49,120 --> 00:06:49,440 a vulnerability. 171 00:06:49,820 --> 00:06:50,540 Oh, thank you. 172 00:06:52,180 --> 00:06:52,620 Sweet. 173 00:06:52,920 --> 00:06:54,040 I can use grep. 174 00:06:56,220 --> 00:06:57,960 Also, there's some pretty seriously funny shit. 175 00:06:58,140 --> 00:07:03,440 So the first thing we're going to do is have a primer on code repositories. 176 00:07:03,560 --> 00:07:08,680 But then I realized when I wrote the word primer on a slide, everyone would say, what 177 00:07:08,680 --> 00:07:09,480 the fuck's a primer? 178 00:07:09,720 --> 00:07:11,220 Because I always say primer. 179 00:07:12,140 --> 00:07:14,700 Primer is the shit that you put on the walls before you paint. 180 00:07:15,900 --> 00:07:16,340 Right? 181 00:07:16,500 --> 00:07:17,160 A primer. 182 00:07:17,360 --> 00:07:19,040 If you want to be like all OED. 183 00:07:19,040 --> 00:07:23,620 About this is actually this description of elementary issues for a given topic kind 184 00:07:23,620 --> 00:07:24,060 of concept. 185 00:07:24,240 --> 00:07:25,680 This is, hey, you don't know anything about this? 186 00:07:25,760 --> 00:07:26,460 Let me give you a primer. 187 00:07:26,600 --> 00:07:29,480 Let me give you the little bits of information you need to understand it. 188 00:07:29,820 --> 00:07:34,960 Probably the best example of that is Jody Foster in contact, which I happen to have 189 00:07:36,600 --> 00:07:37,400 right here. 190 00:07:37,660 --> 00:07:38,700 Let's see if I can do this. 191 00:07:39,160 --> 00:07:41,080 How long will it take to decode it? 192 00:07:42,180 --> 00:07:43,620 It could take forever. 193 00:07:43,800 --> 00:07:45,220 We really need a primer up. 194 00:07:45,360 --> 00:07:47,700 We need to get the best decryption people we have. 195 00:07:47,700 --> 00:07:51,060 She is the world's most famous linguist, so I recommend we follow her lead. 196 00:07:52,900 --> 00:07:53,260 Anyway. 197 00:07:53,420 --> 00:07:57,540 So honestly, that's just one of those, if you can't tell, I have little rants I get 198 00:07:57,540 --> 00:08:01,100 into for those that maybe see me talk, and the primer thing was one that kind of bugged 199 00:08:01,100 --> 00:08:01,780 me for a long time. 200 00:08:01,940 --> 00:08:09,160 And plus Jody Foster, like I said, taxi driver, taxi driver fans, yeah, what a great fucking 201 00:08:09,160 --> 00:08:10,860 movie that was for a wide variety of reasons. 202 00:08:13,400 --> 00:08:14,820 Anyway, back to the repositories. 203 00:08:16,080 --> 00:08:17,480 I'm going to turn it over to you in just a second. 204 00:08:17,600 --> 00:08:17,680 Okay. 205 00:08:17,680 --> 00:08:18,060 Yeah. 206 00:08:19,340 --> 00:08:21,800 So mostly because I'm going to curl up underneath the table and take a nap. 207 00:08:22,520 --> 00:08:27,440 There are three major repository suites as far as we're concerned, CVS, Subversion, and 208 00:08:27,440 --> 00:08:27,700 Git. 209 00:08:28,080 --> 00:08:29,300 They're all pretty different. 210 00:08:29,440 --> 00:08:31,740 What's interesting is Git is really easy to use. 211 00:08:32,600 --> 00:08:38,220 Like it's one of those, I equate it to the Church of Python, you know, when you use Python, 212 00:08:38,440 --> 00:08:41,720 like you read the Python documentation and like the Python.org web page is like this 213 00:08:41,720 --> 00:08:44,340 is the best programming language ever, that's all you ever need to know. 214 00:08:45,720 --> 00:08:46,240 That's it. 215 00:08:46,240 --> 00:08:47,940 There's nothing else on the page. 216 00:08:48,480 --> 00:08:51,220 At least that's the way it's portrayed by people that write Python. 217 00:08:51,480 --> 00:08:52,500 I mean, it is a hell of a language. 218 00:08:52,600 --> 00:08:53,400 I didn't believe it for years. 219 00:08:53,680 --> 00:08:56,860 And then the first time I wrote something in Python, I kind of squandered over the 220 00:08:56,860 --> 00:08:57,860 toilet and popped out some Python. 221 00:08:58,000 --> 00:08:59,780 I was like, oh, hey, it works. 222 00:09:00,160 --> 00:09:00,520 Cool. 223 00:09:00,840 --> 00:09:03,060 Even there's database integration in there. 224 00:09:05,520 --> 00:09:07,080 And Git was kind of the same way. 225 00:09:07,220 --> 00:09:09,520 Like I mean, I'm a really bad developer. 226 00:09:09,780 --> 00:09:15,120 I think the actual pinnacle of my development patheticness was we were writing some code, 227 00:09:15,960 --> 00:09:16,220 you know, code. 228 00:09:16,240 --> 00:09:18,960 And I sent it for one of the shmoo projects we were doing years ago. 229 00:09:19,220 --> 00:09:20,520 And I sent it to another shmoo. 230 00:09:20,600 --> 00:09:23,120 And I'm like, man, I keep having these weird error conditions where sometimes it just doesn't 231 00:09:23,120 --> 00:09:23,340 work. 232 00:09:23,620 --> 00:09:25,240 Like it just kind of cores and flakes out. 233 00:09:25,340 --> 00:09:26,280 I really don't know what's going on. 234 00:09:26,480 --> 00:09:31,160 And the guy writes me back and says, you know, you declared a function inside a conditional. 235 00:09:32,960 --> 00:09:35,200 So sometimes the function just didn't exist. 236 00:09:35,540 --> 00:09:37,480 And I'm like, oh, I shouldn't do that. 237 00:09:42,260 --> 00:09:44,820 So I dropped out of college when I was a CS major. 238 00:09:46,040 --> 00:09:48,260 Took data structures and algorithms three times. 239 00:09:48,560 --> 00:09:50,580 I shit you not, failed all three times. 240 00:09:51,900 --> 00:09:54,760 So subversion in CVS is about like rocket science to me. 241 00:09:54,860 --> 00:09:58,920 So I was really happy that we could use something like Git because you can just Git clone and 242 00:09:58,920 --> 00:10:01,760 you get the entire frickin' repository like since the dawn of time. 243 00:10:01,920 --> 00:10:05,360 And then Git log and get all the logs associated with all the commit statements. 244 00:10:05,500 --> 00:10:06,260 Really easy. 245 00:10:06,820 --> 00:10:08,060 So we focused on those. 246 00:10:08,220 --> 00:10:11,940 If you believe there to be others, like there's probably some RCS people still left in the 247 00:10:11,940 --> 00:10:12,180 room. 248 00:10:12,380 --> 00:10:12,640 Oh. 249 00:10:13,380 --> 00:10:15,500 Big gray beards on them, they got stuff in them. 250 00:10:17,440 --> 00:10:21,680 You're welcome to debate the finer points of code repositories, but we focused on the 251 00:10:21,680 --> 00:10:22,620 ones that we were comfortable with. 252 00:10:23,120 --> 00:10:27,580 And really just to be clear, because I really wanted to do some PowerPoint graphics, you 253 00:10:27,580 --> 00:10:29,740 have Python and Git, and they are the awesome. 254 00:10:32,260 --> 00:10:33,360 What are those on top? 255 00:10:35,080 --> 00:10:35,480 Crowns. 256 00:10:35,480 --> 00:10:35,760 Thank you. 257 00:10:35,800 --> 00:10:36,140 I'm glad. 258 00:10:36,600 --> 00:10:39,800 I worked on that on the airplane flying here and people were looking at me. 259 00:10:39,940 --> 00:10:40,700 Like walking by. 260 00:10:40,840 --> 00:10:40,960 Like. 261 00:10:42,640 --> 00:10:43,880 That guy is making porn, I think. 262 00:10:45,180 --> 00:10:46,200 Like 8-bit porn. 263 00:10:48,040 --> 00:10:50,740 The next slide they start going at it, but I won't show you that. 264 00:10:52,560 --> 00:10:53,820 Here, I'm going to turn it over to Logan now. 265 00:10:53,860 --> 00:10:54,420 You want to chat? 266 00:10:54,720 --> 00:10:54,880 Yeah. 267 00:10:55,000 --> 00:10:55,280 Yay. 268 00:10:55,420 --> 00:10:56,000 I get to sit down. 269 00:10:57,940 --> 00:10:58,480 All right. 270 00:10:58,560 --> 00:10:59,100 Take the mic. 271 00:10:59,340 --> 00:10:59,780 There you go. 272 00:11:08,260 --> 00:11:09,460 You don't want to hold the mic? 273 00:11:10,480 --> 00:11:10,800 No. 274 00:11:10,820 --> 00:11:11,100 No. 275 00:11:11,100 --> 00:11:11,980 Just hands in your pockets. 276 00:11:12,160 --> 00:11:12,620 Hands in my pockets. 277 00:11:12,640 --> 00:11:12,800 All right. 278 00:11:12,860 --> 00:11:13,060 We're on. 279 00:11:14,200 --> 00:11:15,800 I'm going to be a complete jerk to him. 280 00:11:15,940 --> 00:11:18,000 So if you want to help out, just say stuff. 281 00:11:18,380 --> 00:11:18,860 All right. 282 00:11:18,920 --> 00:11:21,720 So that slide is mostly true. 283 00:11:22,460 --> 00:11:24,960 Actually, we only crawled GitHub. 284 00:11:28,100 --> 00:11:28,500 Yeah. 285 00:11:29,240 --> 00:11:30,000 Pretty much it. 286 00:11:30,960 --> 00:11:35,540 Primarily the languages we saw were Python, Ruby, and C and C++. 287 00:11:35,980 --> 00:11:36,800 A little bit of pro. 288 00:11:37,040 --> 00:11:41,620 So just to be clear, when you submit a talk to a conference, most conferences, they require 289 00:11:41,620 --> 00:11:43,740 the slides in advance for some reason. 290 00:11:45,160 --> 00:11:48,040 I think it's more actually to hold people accountable to actually determine that they've 291 00:11:48,040 --> 00:11:48,780 actually done some work. 292 00:11:49,120 --> 00:11:52,340 They claim it's to burn it to the CD, but has anyone looked at the DEF CON CD yet? 293 00:11:52,640 --> 00:11:52,800 Yeah. 294 00:11:53,800 --> 00:11:54,120 Really? 295 00:11:54,640 --> 00:11:55,480 Is your box owned? 296 00:11:56,660 --> 00:11:56,980 No. 297 00:11:57,740 --> 00:11:58,060 No. 298 00:11:58,060 --> 00:11:59,060 Not that you know of. 299 00:12:00,420 --> 00:12:04,600 But we had to make these forward looking statements a month ago about what we had done, quote, 300 00:12:04,640 --> 00:12:04,800 unquote. 301 00:12:05,280 --> 00:12:07,020 It was really more what we thought we would do. 302 00:12:07,140 --> 00:12:10,560 And so we put in things like, oh, we're going to go get all of GitHub and SourceForge and 303 00:12:10,560 --> 00:12:11,440 then any other repository. 304 00:12:11,820 --> 00:12:15,560 And as Logan pointed out, we focused on GitHub because we were lazy. 305 00:12:17,960 --> 00:12:18,440 All right. 306 00:12:18,480 --> 00:12:21,300 So the name of the app that we put together is called CodeGleam. 307 00:12:21,860 --> 00:12:24,180 First had some jokes lined up for that. 308 00:12:24,340 --> 00:12:24,680 I'm not sure. 309 00:12:24,680 --> 00:12:25,660 I didn't actually. 310 00:12:25,800 --> 00:12:28,980 The first thing he had was source scrape, which sounded like a disease that you needed 311 00:12:30,100 --> 00:12:30,620 penicillin for. 312 00:12:30,840 --> 00:12:32,820 And CodeGleam was a moderate step up. 313 00:12:32,920 --> 00:12:33,640 So I give it two stars. 314 00:12:33,840 --> 00:12:35,520 You can dance to it, but the beat's a little off. 315 00:12:35,760 --> 00:12:36,120 All right. 316 00:12:36,160 --> 00:12:41,140 So it's still a prototype, alpha, beta, whatever you want to call it, but it's not ready for 317 00:12:41,140 --> 00:12:41,680 production. 318 00:12:42,720 --> 00:12:45,500 Mostly used in house by us to do analysis. 319 00:12:46,440 --> 00:12:47,760 There are five parts of it. 320 00:12:48,020 --> 00:12:51,300 Like Bruce said, Python is great, so we used Python. 321 00:12:51,860 --> 00:12:53,640 The first part is the crawler. 322 00:12:54,120 --> 00:13:02,080 That is basically just our piece that goes out and will crawl GitHub right now and look 323 00:13:02,080 --> 00:13:04,980 for repos that we tell it to look for and pull that down. 324 00:13:05,760 --> 00:13:10,160 It does support subversion, but other pieces of CodeGleam don't support subversion, so 325 00:13:10,160 --> 00:13:12,540 we didn't actually crawl any of those yet. 326 00:13:14,140 --> 00:13:18,300 Once the crawler is done, it pushes off a task to the file store. 327 00:13:18,560 --> 00:13:23,100 The file store essentially stores the repository on disk. 328 00:13:23,400 --> 00:13:31,620 So this is semi-complicated because, as it turns out, OSs don't like large directory 329 00:13:31,620 --> 00:13:32,860 structures that are flat. 330 00:13:33,120 --> 00:13:36,620 It makes functions like stat really, really, really slow. 331 00:13:37,100 --> 00:13:39,260 So what we did to counteract that. 332 00:13:40,160 --> 00:13:41,920 Is based on some input from some other people. 333 00:13:42,140 --> 00:13:45,220 And as I found out later, this is actually how Git stores its data, too. 334 00:13:45,900 --> 00:13:53,500 We hash each file in the repository and then store a ‑‑ create a directory structure 335 00:13:53,500 --> 00:13:57,260 based on that hash and store the file ‑‑ store the actual file at the bottom of that 336 00:13:57,260 --> 00:13:59,500 hash and create a symboling pointing to that file. 337 00:13:59,820 --> 00:14:05,360 So it essentially creates a nice tree structure that the OS actually can handle in large ‑‑ 338 00:14:05,360 --> 00:14:06,540 with large amounts of files. 339 00:14:09,780 --> 00:14:10,900 All right. 340 00:14:10,980 --> 00:14:12,160 And then the parser comes in. 341 00:14:12,260 --> 00:14:18,940 The parser basically, its entire function is to parse the code for comments and commit 342 00:14:18,940 --> 00:14:19,300 statements. 343 00:14:19,660 --> 00:14:21,020 The whole goal of this, right? 344 00:14:21,660 --> 00:14:28,760 To do this, we created essentially a base parser that is capable of ‑‑ that uses a 345 00:14:29,560 --> 00:14:31,080 library called PyVCS. 346 00:14:31,860 --> 00:14:36,520 PyVCS is a nice little library module ‑‑ or Python module that will ‑‑ that will 347 00:14:36,540 --> 00:14:42,200 abstract interfaces to certain submersion repositories like Git, Subversion, Mercurial, 348 00:14:42,220 --> 00:14:42,680 and Bizarre. 349 00:14:43,060 --> 00:14:44,540 There's other ones. 350 00:14:44,700 --> 00:14:45,640 I've never heard of the other two. 351 00:14:46,000 --> 00:14:46,580 Like, holy shit. 352 00:14:46,780 --> 00:14:47,720 You made those up. 353 00:14:48,180 --> 00:14:48,620 Maybe. 354 00:14:48,920 --> 00:14:49,800 Anyone use Bizarre? 355 00:14:50,820 --> 00:14:51,260 Yeah. 356 00:14:51,380 --> 00:14:52,260 Anyone use Mercurial? 357 00:14:52,500 --> 00:14:52,940 Yeah. 358 00:14:53,040 --> 00:14:54,160 Anyone know Mercurial? 359 00:14:54,280 --> 00:14:55,320 The guy on Twitter? 360 00:14:58,100 --> 00:14:58,540 Sorry. 361 00:14:59,740 --> 00:15:01,460 Jokes are really slow today, guys. 362 00:15:01,540 --> 00:15:03,180 I mean, like, I got snot running out of my nose. 363 00:15:03,300 --> 00:15:04,400 It's not pretty up here. 364 00:15:05,340 --> 00:15:06,520 No one even laughed at that. 365 00:15:06,540 --> 00:15:06,740 See? 366 00:15:06,860 --> 00:15:07,640 That's how bad it is. 367 00:15:08,600 --> 00:15:08,960 Ugh. 368 00:15:09,280 --> 00:15:10,400 That's just gross, really. 369 00:15:14,400 --> 00:15:15,120 Thank you. 370 00:15:15,360 --> 00:15:15,600 Hey. 371 00:15:16,160 --> 00:15:17,300 Someone imported one. 372 00:15:17,400 --> 00:15:18,440 Where was that from, sir? 373 00:15:19,260 --> 00:15:19,980 Not you. 374 00:15:20,140 --> 00:15:20,500 Yourself. 375 00:15:20,520 --> 00:15:20,740 Oh. 376 00:15:20,840 --> 00:15:21,200 You. 377 00:15:21,380 --> 00:15:21,740 Yourself. 378 00:15:21,800 --> 00:15:22,420 I don't know who you are. 379 00:15:22,660 --> 00:15:22,980 All right. 380 00:15:23,020 --> 00:15:23,980 Anyone else bring anything to throw? 381 00:15:24,080 --> 00:15:24,920 You can just get it out of the way now. 382 00:15:25,920 --> 00:15:26,280 No. 383 00:15:26,480 --> 00:15:27,980 Anyone know why he threw that? 384 00:15:29,120 --> 00:15:29,840 All right. 385 00:15:29,960 --> 00:15:30,100 Hey. 386 00:15:30,160 --> 00:15:32,800 If you don't know what a shmoo ball is or aren't familiar with the physical manifestation 387 00:15:32,800 --> 00:15:35,880 of the bullshit flag ‑‑ who's giving out the bullshit flags, by the way? 388 00:15:36,160 --> 00:15:36,520 Okay. 389 00:15:36,540 --> 00:15:37,140 Have people seen those? 390 00:15:37,460 --> 00:15:37,860 Yeah. 391 00:15:37,940 --> 00:15:38,940 Where are those coming from? 392 00:15:42,880 --> 00:15:43,820 Can you understand that? 393 00:15:44,120 --> 00:15:44,600 What's that? 394 00:15:44,720 --> 00:15:45,200 What did they say? 395 00:15:45,380 --> 00:15:45,800 No idea. 396 00:15:46,140 --> 00:15:46,540 Feds. 397 00:15:46,640 --> 00:15:47,040 Feds. 398 00:15:47,320 --> 00:15:48,220 The Feds. 399 00:15:48,280 --> 00:15:48,540 Yes. 400 00:15:48,680 --> 00:15:50,660 The Feds are supplying the bullshit flags? 401 00:15:52,260 --> 00:15:53,740 That seems a little strange. 402 00:15:57,840 --> 00:16:00,400 Is that ‑‑ so that's how Feds are being tagged this year? 403 00:16:00,880 --> 00:16:01,960 With a little bullshit flag? 404 00:16:02,020 --> 00:16:02,920 You need to explain this. 405 00:16:02,980 --> 00:16:03,840 I'm asking a question. 406 00:16:04,360 --> 00:16:05,520 This is not helpful. 407 00:16:06,100 --> 00:16:06,420 What? 408 00:16:06,900 --> 00:16:08,600 They have a surplus of bullshit. 409 00:16:08,720 --> 00:16:09,780 They have a surplus of bullshit. 410 00:16:09,840 --> 00:16:11,260 So who's giving them the bullshit flags? 411 00:16:11,360 --> 00:16:14,000 I'm trying to find out the source of the bullshit flag, not the source of the bullshit 412 00:16:14,000 --> 00:16:14,260 itself. 413 00:16:17,740 --> 00:16:18,060 They. 414 00:16:18,660 --> 00:16:19,780 You just keep using pronouns. 415 00:16:20,000 --> 00:16:20,260 All right. 416 00:16:20,280 --> 00:16:20,560 We're done. 417 00:16:20,640 --> 00:16:21,240 I don't even care. 418 00:16:23,100 --> 00:16:25,440 The Feds were calling bullshit and putting bullshits on themselves. 419 00:16:26,200 --> 00:16:26,520 Yes. 420 00:16:27,660 --> 00:16:27,960 Yes. 421 00:16:28,380 --> 00:16:29,180 Oh, my God. 422 00:16:29,240 --> 00:16:29,480 All right. 423 00:16:29,500 --> 00:16:29,760 We're done. 424 00:16:29,880 --> 00:16:30,360 Go ahead. 425 00:16:31,700 --> 00:16:32,340 Mystery solved. 426 00:16:32,700 --> 00:16:32,900 Yeah. 427 00:16:33,840 --> 00:16:34,160 Yeah. 428 00:16:34,300 --> 00:16:34,420 Yeah. 429 00:16:35,180 --> 00:16:35,500 Yeah. 430 00:16:35,500 --> 00:16:35,940 All right. 431 00:16:37,700 --> 00:16:42,140 So after the parser is done, it basically shoves all that data that it just parsed into 432 00:16:42,140 --> 00:16:42,580 the database. 433 00:16:45,520 --> 00:16:48,080 Pretty standard MySQL database, right? 434 00:16:49,700 --> 00:16:52,820 These are essentially the tables that we use for this. 435 00:16:53,020 --> 00:16:54,920 Barely normalized is a really technical term. 436 00:16:55,040 --> 00:16:58,560 Unlike, say, third normal order, which is really loose if you don't really understand 437 00:16:58,560 --> 00:16:59,540 it for the database wings. 438 00:17:01,120 --> 00:17:05,300 I didn't want to say it was actually in third normal form because you would have tried to 439 00:17:05,300 --> 00:17:05,860 call me out on that. 440 00:17:05,900 --> 00:17:05,980 Yeah. 441 00:17:06,000 --> 00:17:07,040 I would have tried to call you out. 442 00:17:07,180 --> 00:17:09,440 Like, made you prove it with, like, diagrams, which would have gotten ugly. 443 00:17:12,100 --> 00:17:12,580 All right. 444 00:17:12,760 --> 00:17:15,840 And from there, we built the TurboGears front end on it. 445 00:17:17,400 --> 00:17:21,020 This was the source of many long nights of coding. 446 00:17:22,640 --> 00:17:28,220 TurboGears is supposed to be easy, but when you start adding Ajax and you try and do things 447 00:17:28,220 --> 00:17:32,360 with jQuery, it's like trying to solve a mystery as to how that thing works. 448 00:17:33,100 --> 00:17:34,820 But in the end, it came out really well. 449 00:17:35,800 --> 00:17:36,880 Pretty happy with it. 450 00:17:37,240 --> 00:17:38,020 Well, he is now. 451 00:17:38,160 --> 00:17:39,980 When he wasn't sleeping, he wasn't happy. 452 00:17:41,400 --> 00:17:45,100 He was a little grumpy for a few days because of, like, going to bed at 4.30 in the morning 453 00:17:45,100 --> 00:17:46,260 and getting up at 7 to go to work. 454 00:17:46,440 --> 00:17:47,700 There was one phone call in particular. 455 00:17:49,500 --> 00:17:50,480 Probably shouldn't have had. 456 00:17:52,380 --> 00:17:52,860 So, yeah. 457 00:17:52,940 --> 00:17:57,640 And from here on out, you know, as we develop this more, we want to add just essentially 458 00:17:59,740 --> 00:18:02,140 code to just tie this all together very well. 459 00:18:02,320 --> 00:18:02,540 So. 460 00:18:02,540 --> 00:18:04,480 And more repos, of course. 461 00:18:07,520 --> 00:18:07,900 All right. 462 00:18:08,280 --> 00:18:08,600 Sweet. 463 00:18:10,560 --> 00:18:13,420 So the end result of all that is a Web site that you can't get to right now. 464 00:18:15,480 --> 00:18:16,980 That is proper DEF CON form. 465 00:18:17,780 --> 00:18:21,240 Just in case you're wondering if you're going to submit a talk to DEF CON, the proper form 466 00:18:21,240 --> 00:18:22,100 is, well, we did the work. 467 00:18:22,180 --> 00:18:22,840 Here's most of the results. 468 00:18:22,940 --> 00:18:23,800 We still have to finish it up. 469 00:18:23,900 --> 00:18:25,020 So it's not ready yet. 470 00:18:25,080 --> 00:18:25,680 You can't download it. 471 00:18:28,400 --> 00:18:31,940 Or you just get up really drunk and rant and have some woman in, like, a bikini next to 472 00:18:32,020 --> 00:18:32,980 No one pays attention, apparently. 473 00:18:35,820 --> 00:18:36,180 Anyway. 474 00:18:36,500 --> 00:18:40,580 So Parcel Flat Fires commits blah, blah, blah, blah, blah, blah, blah. 475 00:18:40,740 --> 00:18:40,960 Okay. 476 00:18:41,020 --> 00:18:44,820 So we went for dirty words, first of all, because we're like little kids and you want 477 00:18:44,820 --> 00:18:47,860 to see how often people say fuck, fuck, fuck, fuck, fuck, fuck. 478 00:18:49,180 --> 00:18:53,580 First before we get on to that, actually, moving on to more physical grammatical analysis 479 00:18:53,580 --> 00:18:55,460 where we use things that have spaces in it. 480 00:18:57,940 --> 00:18:58,300 REGEX. 481 00:18:58,560 --> 00:18:58,920 REGEX. 482 00:18:59,120 --> 00:19:01,480 So we actually do have some REGEX stuff implemented. 483 00:19:01,940 --> 00:19:03,500 And you'll be able to use once we get it online. 484 00:19:04,340 --> 00:19:07,100 Mostly that's what we're worried about right now because we don't want you all ponying 485 00:19:07,100 --> 00:19:07,560 our server. 486 00:19:08,400 --> 00:19:11,220 You know, we start asking people, oh, enter REGEX and we're going to go throw it into 487 00:19:11,220 --> 00:19:12,560 my SQL database and hope for the best. 488 00:19:15,420 --> 00:19:18,780 We already had some instances where people in the commit statements, and I'll challenge 489 00:19:18,780 --> 00:19:20,360 you, I'll just put this challenge out there. 490 00:19:20,540 --> 00:19:24,560 The commit statements then when they get returned to the screen will get not really escaped 491 00:19:24,560 --> 00:19:24,940 properly. 492 00:19:25,220 --> 00:19:28,200 And so there was actually, like, markup language inside the commit statements. 493 00:19:28,280 --> 00:19:31,260 So I was reading one and there was a text input box right in the middle of the screen. 494 00:19:32,680 --> 00:19:35,840 I was like, huh, that doesn't bode well. 495 00:19:37,880 --> 00:19:42,980 So just to be clear, once we do light this critter up, I would challenge you, if you 496 00:19:42,980 --> 00:19:47,240 know what things we're tracking, try to get yourself on to that task, on to that project, 497 00:19:47,520 --> 00:19:50,160 then put in a malicious commit statement just to see if we get owned. 498 00:19:50,920 --> 00:19:54,620 This is a whole new attack vector, owning assholes by commit statements. 499 00:19:55,160 --> 00:20:00,320 So we were going to do a demo, but the inner tubes suck. 500 00:20:00,460 --> 00:20:01,240 So instead we're going to do a demo. 501 00:20:01,260 --> 00:20:03,120 We're just going to show you, it is a web page. 502 00:20:03,340 --> 00:20:03,880 There's a browser. 503 00:20:04,020 --> 00:20:04,520 It's called Safari. 504 00:20:04,780 --> 00:20:05,320 And we took a picture. 505 00:20:05,420 --> 00:20:07,120 And it's not Photoshopped, I swear to God. 506 00:20:08,320 --> 00:20:12,080 Before we get to this, does anyone, can anyone tell me the seven dirty words? 507 00:20:18,520 --> 00:20:19,240 Everyone's just mumbling. 508 00:20:19,340 --> 00:20:20,040 It's like Tourette's now. 509 00:20:22,040 --> 00:20:23,400 Fuck, fuck, fuck, fuck, fuck, fuck. 510 00:20:24,680 --> 00:20:25,540 There's a shit in there. 511 00:20:26,000 --> 00:20:29,540 Motherfucker and fucker, or motherfucker and fuck were separate words in George Carlin's 512 00:20:29,540 --> 00:20:30,120 seven dirty words. 513 00:20:30,120 --> 00:20:32,980 Which, as a purist, you think that's just a derivative, right? 514 00:20:33,100 --> 00:20:37,900 Like, you just, you know, you derive the first order like a motherfucker and you get fuck 515 00:20:37,900 --> 00:20:39,940 and you derive it again and it's null and all right. 516 00:20:42,120 --> 00:20:45,300 Calculus humor for someone that hasn't taken calculus in 12 years or probably wasn't even 517 00:20:45,300 --> 00:20:45,520 using it. 518 00:20:45,680 --> 00:20:47,460 He's like, it's an integral, you jackass. 519 00:20:47,600 --> 00:20:48,240 You did it backwards. 520 00:20:50,100 --> 00:20:54,740 Anyway, so we took the seven dirty words and we made a histogram out of it in numbers not 521 00:20:54,740 --> 00:20:55,060 Excel. 522 00:20:55,380 --> 00:20:55,680 Woohoo! 523 00:20:56,060 --> 00:20:57,060 Steve Jobs forever. 524 00:20:57,420 --> 00:20:57,780 Woohoo! 525 00:20:58,460 --> 00:20:58,580 Woohoo! 526 00:20:59,220 --> 00:21:07,540 It turns out that out of 546 freaking repositories that we grabbed including things like TCD 527 00:21:07,540 --> 00:21:11,480 dump in Apache, people only said fuck in the comments 15 times. 528 00:21:12,580 --> 00:21:12,980 Boo! 529 00:21:13,080 --> 00:21:14,100 Boo is right people! 530 00:21:14,400 --> 00:21:17,640 Like, if you're part of an open source project, please swear more because this got really 531 00:21:17,640 --> 00:21:18,040 boring. 532 00:21:18,260 --> 00:21:20,540 We were hearing the results and we're like, ah, crap. 533 00:21:21,580 --> 00:21:23,380 We're going to have to put some in just to make it exciting. 534 00:21:23,920 --> 00:21:25,980 And the lower order ones. 535 00:21:26,220 --> 00:21:28,100 The ones at the bottom. 536 00:21:28,200 --> 00:21:28,560 Like, fuck. 537 00:21:28,580 --> 00:21:34,500 tits, motherfucker. Those never made the list. There's a lot of comments. Not once. If you're 538 00:21:34,500 --> 00:21:38,520 swearing and angry, typing motherfucker is a lot of work. You're going to type it two or three 539 00:21:38,520 --> 00:21:49,080 times and screw it. There, we're done. Look at that. I derived motherfucker. Exactly. So 540 00:21:49,080 --> 00:21:54,400 here now we look for, we created our own slightly more generic dirty words. Willing to say 541 00:21:54,400 --> 00:22:00,240 hell a bit more. This is still a fantastically small number of swear words. People giggling at 542 00:22:00,240 --> 00:22:05,820 the last one for the ones that get that. No one committed that either. So as long as you're 543 00:22:05,820 --> 00:22:08,860 going after trying to pwn us through commit statements and comments, you might as well go and 544 00:22:08,860 --> 00:22:15,920 drop some Liggett bombs in there, too. Liggett bomb, that's right. I said it. In commits we got 545 00:22:15,920 --> 00:22:20,100 a little more aggressive. We said fuck a little bit more. Still not like at least in every 546 00:22:20,100 --> 00:22:24,380 project. But, you know, four or five times more, shit came out a lot more. And that's 547 00:22:24,400 --> 00:22:28,880 what we did. And then the other ones, hell. What the hell is this? Hell, hell, hell, hell. 548 00:22:28,980 --> 00:22:33,080 It's like a Bart Simpsons episode. Hell, hell, hell, hell, hell, hell. You all seen that clip 549 00:22:33,080 --> 00:22:37,080 when, you know, how the hell can I talk about hell without saying hell? Yeah, it's like 550 00:22:37,080 --> 00:22:40,000 Simpsons season two. You got to be kind of old and gray hair and shit to remember that. 551 00:22:41,260 --> 00:22:46,740 Anyway, it's still not that interesting. So we started to look at code quality comments. How 552 00:22:46,740 --> 00:22:50,940 often did people say this code sucks or this is quite a hack? Well, on average, at least once 553 00:22:50,940 --> 00:22:54,380 per every project someone said hack. Some of them had it a lot. It was like hack, hack, 554 00:22:54,380 --> 00:22:59,320 hack, hack, hack. And stupid and blah and work and suck. These are areas that we started to 555 00:22:59,320 --> 00:23:03,140 focus on. When people actually said this is a hack, hey, guess what? We're going to go look at 556 00:23:03,140 --> 00:23:10,400 that. Commit statements, people became even more, I guess, pointed. Hack wasn't used as much as 557 00:23:10,400 --> 00:23:16,780 stupid. Which I think is a little more aggressive terminology. People started to call things 558 00:23:16,780 --> 00:23:21,820 stupid in commit statements. And we went back and we read a lot of the results here. And what 559 00:23:21,820 --> 00:23:24,360 we found is developers are more likely to call things stupid than commit statements. And 560 00:23:24,360 --> 00:23:27,860 more likely to make emotional comments in the commit statements. Presumably because they assume 561 00:23:28,240 --> 00:23:33,440 commit statements don't get up, put it in your .tar.gz and shipped. Right? The commit statements 562 00:23:33,440 --> 00:23:37,020 just kind of stay in a database somewhere and you presume no one is going to read them. And 563 00:23:37,020 --> 00:23:43,200 that's why we took our flashlight out and tried to, it helps if you make the noise. Big fan of 564 00:23:43,200 --> 00:23:46,200 making noise because then later on it ends up on YouTube. Hey, look what this jackass did on 565 00:23:46,200 --> 00:23:53,180 stage. Thank you. Hey. Is anyone wearing that shirt right now? Because that will punch you in 566 00:23:53,180 --> 00:23:53,500 the face. 567 00:23:55,940 --> 00:23:59,700 Trying to be polite about it. It's DEFCON. We stand in line before we punch people in 568 00:23:59,700 --> 00:24:07,480 faces. So there was some randomly funny stuff. All caps always is a win. So, you know, fuck you 569 00:24:07,480 --> 00:24:11,140 for supporting that stupid behavior. You got two of our dirty words in one sentence. I thought 570 00:24:11,140 --> 00:24:16,860 that was nice. Killed two birds with one stone. Somebody blaming the cold meds. The CGI IRC, 571 00:24:17,680 --> 00:24:22,520 which should scare you in its own right as a program. It's an IRC that's written in CGI. 572 00:24:24,580 --> 00:24:30,240 Pwning boxes through IRC to messages, right? Go find a bug in this thing and then just type the 573 00:24:30,240 --> 00:24:34,740 right command in the IRC channel and watch the guys boxing the web server get pwned. That's a fun 574 00:24:34,740 --> 00:24:40,280 attack vector. But he had things like nasty hack to make the angry smiley work. Then there was 575 00:24:40,280 --> 00:24:44,820 another hack to make another type of smiley work. Like this guy had a problem making smileys work 576 00:24:45,460 --> 00:24:54,340 in an IRC program. I thought you just displayed colon, preface. Is it an IRC? It's an IRC. It's 577 00:24:54,340 --> 00:24:58,020 way more complicated than that. Also, one person was kind enough to point out that moose were 578 00:24:58,020 --> 00:25:05,660 better than ponies. Woo! That was saying moose not booing, right, sir? Okay, good. Because if it 579 00:25:05,660 --> 00:25:12,180 was a boo, there was going to be a problem. We are big moose fans, as it turns out. Not so 580 00:25:12,180 --> 00:25:17,680 much with the ponies. Ponies are nice. Moose, they're for real people. Anyway, do you guys know 581 00:25:17,680 --> 00:25:24,320 why you get Outlook messages from Outlook users that have J's in them for smileys? It's because 582 00:25:27,900 --> 00:25:33,940 freaking Outlook converts the smiley to the wingding smiley, which is the letter J in the 583 00:25:33,940 --> 00:25:38,980 wingding's alphabet. And when it gets sent out and you don't have the wingdings loaded, the 584 00:25:38,980 --> 00:25:45,180 wingdings like the inner tubes, then you get a J because that apparently is that character that 585 00:25:45,180 --> 00:25:54,320 they used. So it's really annoying. Unicode, the bane of my existence. Again, the guy that 586 00:25:54,340 --> 00:26:01,400 flunked out of computer science. Holy shit. All right. So people are angrily doing drunken 587 00:26:01,400 --> 00:26:04,520 things. People are leaving the room. Goodbye, sir. Oh, there's an AV guy leaving the room, I 588 00:26:04,520 --> 00:26:12,340 think, isn't there? Hey, he's done. He's like, I'm out. This is bullshit. I broke the 589 00:26:12,340 --> 00:26:16,640 microphone. So we found our first result in the first five minutes, which was lucky. Because 590 00:26:16,640 --> 00:26:20,040 again, when you unload Pandora's box on this, when you say we're going to do all this stuff and 591 00:26:20,040 --> 00:26:24,260 do this, have this ready for DEF CON, and it's three days before DEF CON, we're like, huh, we're 592 00:26:24,260 --> 00:26:26,640 not going to have a completed code yet, but I guess I'm going to start digging through the 593 00:26:26,640 --> 00:26:29,980 database and see if we can find anything. I was a little worried that we wouldn't find 594 00:26:29,980 --> 00:26:37,240 anything. So we did. What we found off the bat here was looking for the word lame. And we 595 00:26:37,240 --> 00:26:41,540 found this phrase that said, this is kind of lame, but only exploitable by people who could log 596 00:26:41,540 --> 00:26:53,140 in. How serious could that be? What was interesting about this bug is not only did we find it in one 597 00:26:53,140 --> 00:26:54,240 project, we found it in a bunch of other projects. We found it in a bunch of other projects. We 598 00:26:54,240 --> 00:26:59,640 found it in six different projects. And what happened was there's a bunch of Ruby developers 599 00:26:59,640 --> 00:27:04,060 working on these social networking projects trying to make the next Facebook, Twitter, you 600 00:27:04,060 --> 00:27:09,840 know, chat roulette is my asshole kind of thing. And someone was running chat roulette in a 601 00:27:09,840 --> 00:27:15,940 room today at 10 a.m.? Was anyone there? I saw references to it online. Was there anything 602 00:27:15,940 --> 00:27:23,880 disturbing? Yeah. Like that just seems like a lawsuit. Showing porn to a room of people like 603 00:27:23,880 --> 00:27:26,720 that. You just don't know what you're going to get. Oh, I didn't know gerbils would do that. 604 00:27:28,100 --> 00:27:34,780 Not appropriate. Ever. Let alone at 10 a.m. in the morning on a Saturday. So anyway, so these guys 605 00:27:34,780 --> 00:27:37,840 are all working on these social networking projects. And what they did is they just shared the 606 00:27:37,840 --> 00:27:42,420 code and it wasn't like they created a common library. Like, I mean, I flunked out of CS again, 607 00:27:42,520 --> 00:27:45,640 but I can see the value in libraries because you can update them and they get updated 608 00:27:45,640 --> 00:27:51,120 independently of the freaking software. No, they just cut and pasted. Cut and paste. That looks 609 00:27:51,120 --> 00:27:59,740 good. Including the comment that says, kind of exploitable. And so what we found was this and 610 00:27:59,740 --> 00:28:06,360 even more verbose. So only exploitable people could log in anyway. So presumably not too big of a 611 00:28:06,360 --> 00:28:11,720 security hole. It allowed you as long as you had an account and you were using HTTP off to get in, 612 00:28:11,860 --> 00:28:15,340 you could look at anything that anyone had protected anywhere in their social networking sites 613 00:28:15,340 --> 00:28:20,840 that they built with Ruby on Rails. Which, again, I mean, come on. We've seen Facebook do it. So 614 00:28:20,840 --> 00:28:24,100 everybody, the cool kids have to do it when they start the new projects. And like I can appreciate 615 00:28:24,100 --> 00:28:31,820 that. But it's ridiculous. Absolutely ridiculous. What we found, and this is part of the tool, is 616 00:28:31,820 --> 00:28:37,340 we track what versions of the pieces of software that contain the comments and contain the commit 617 00:28:37,340 --> 00:28:41,660 statements or at least eventually the commit statements. Commit statements are a little bit 618 00:28:41,660 --> 00:28:45,900 harder to tie to specific versions at the moment. But the comments. And so we can go through and 619 00:28:45,900 --> 00:28:50,740 say, hey, where does this comment still exist? And the number of the projects out of the six we've 620 00:28:50,740 --> 00:28:53,480 found a couple of them had nuked the file all together but there 621 00:28:53,480 --> 00:28:56,180 are still a few projects out there that today have this junk 622 00:28:56,180 --> 00:28:59,360 of code in their live production systems. So, you know, we found 623 00:28:59,360 --> 00:29:01,480 a bug, we found a security vulnerability, drop an ODAY at 624 00:29:01,480 --> 00:29:07,960 DEF CON old school style. Come on, guys. You don't get to see 625 00:29:07,960 --> 00:29:11,400 ODAY. This is really lame ODAY. It's not Charlie Miller ODAY but 626 00:29:11,400 --> 00:29:15,440 it's ODAY. Come on. Yeah, let's ODAY themselves. That's the 627 00:29:15,440 --> 00:29:18,860 finer point, right? Is it ODAY if you said, hey, look, it's a 628 00:29:18,860 --> 00:29:21,980 security vulnerability? Like all we did was grep but we're 629 00:29:21,980 --> 00:29:28,140 calling it ODAY. We're bad like that. What else did we find? So 630 00:29:28,140 --> 00:29:31,600 we found, so this is a pop up framework for automated admin 631 00:29:31,600 --> 00:29:34,840 tasks. So this one is interesting because they fixed 632 00:29:34,840 --> 00:29:38,340 it. But again, presumably not everyone deploys the latest 633 00:29:38,340 --> 00:29:40,980 version and part of the purpose here is to be able to determine 634 00:29:40,980 --> 00:29:44,180 specific versions of software that maybe you don't have easy 635 00:29:44,180 --> 00:29:47,140 access to right now but we want to go find other issues with, 636 00:29:47,240 --> 00:29:48,840 you know, I'm at some client site in the right place and 637 00:29:48,840 --> 00:29:51,560 running an old version of puppet. In this case, they had 638 00:29:51,560 --> 00:29:56,580 just migrated to REST from XML RPC. So REST is a same kind of, 639 00:29:56,640 --> 00:29:59,880 it's like an RPC thing but a lot fuzzier. It's not as heavily 640 00:30:00,600 --> 00:30:04,200 restrained as XML RPC is. And they realized that you could just 641 00:30:04,200 --> 00:30:06,160 send unauthenticated REST requests and they would be 642 00:30:06,160 --> 00:30:08,880 obeyed. So I don't see anything wrong with this. This admin 643 00:30:08,880 --> 00:30:14,340 framework that will accept unauthenticated RPC commands. You 644 00:30:14,340 --> 00:30:16,680 know, have control of your entire enterprise. I don't know. 645 00:30:16,800 --> 00:30:18,820 I mean, it seems like an okay bug to me. But, you know, it's a 646 00:30:18,840 --> 00:30:22,680 good thing. Anyway, so, again, this was patched a while ago but 647 00:30:22,680 --> 00:30:27,580 we were able to dig it up pretty quickly. This next one is very 648 00:30:27,580 --> 00:30:31,140 special to me. I'll read it because I realize in the back of 649 00:30:31,140 --> 00:30:34,260 the room you probably can't read this. But basically this guy is 650 00:30:34,260 --> 00:30:37,340 talking about using a site key which is an extra bit of 651 00:30:37,340 --> 00:30:41,220 information that gets hashed into this database password in 652 00:30:41,220 --> 00:30:45,260 order to make it so that if the person who's snagging the broken 653 00:30:45,260 --> 00:30:48,380 in your box, snags your config information, also needs to go 654 00:30:48,380 --> 00:30:51,060 snag the database so that they can run an offline dictionary 655 00:30:51,060 --> 00:30:53,580 attack as opposed to just connect your database. So it's 656 00:30:53,580 --> 00:30:55,920 basically there's a secret stored somewhere else in the 657 00:30:55,920 --> 00:30:58,540 file system and they wouldn't have grabbed it and then they 658 00:30:58,540 --> 00:31:01,540 wouldn't be able to access your, quote, stupid user's 659 00:31:01,540 --> 00:31:06,120 passwords. And, you know, it's a hell of a comment. It's a big 660 00:31:06,120 --> 00:31:08,320 commit statement. The guy's got lots of URLs in there. He's 661 00:31:08,320 --> 00:31:10,400 pointing to, like, a visual guide to cryptography to 662 00:31:10,400 --> 00:31:13,700 explain hacking. I mean, this is one of the most verbose and 663 00:31:13,700 --> 00:31:18,280 explained commit statements ever, including needless to 664 00:31:18,380 --> 00:31:21,120 say, if you upload this to GitHub or the YouTubes or 665 00:31:21,120 --> 00:31:23,840 otherwise place it in public view, you kind of defeat the 666 00:31:23,840 --> 00:31:28,240 whole point. Just to be clear, we downloaded this off of 667 00:31:28,240 --> 00:31:34,360 GitHub, not the YouTubes. So it did kind of defeat the whole 668 00:31:34,360 --> 00:31:37,940 point. Anyway, there were also some dead ends that we 669 00:31:37,940 --> 00:31:41,640 encountered when we were doing this. Looking for the word 670 00:31:41,640 --> 00:31:44,020 security. Again, this is just basically an Uber grep at the 671 00:31:44,020 --> 00:31:48,360 moment. And it said the phrase add in security. And I'm like, I 672 00:31:51,460 --> 00:31:54,580 wonder how complicated a commit that was. My eyes got really 673 00:31:54,580 --> 00:31:58,840 big. And admittedly, this was yesterday. So we're doing the 674 00:31:58,840 --> 00:32:02,740 actual analysis for this yesterday in our room. And it 675 00:32:02,740 --> 00:32:08,260 turns out that Logan doesn't have a laptop because, yeah, my 676 00:32:08,260 --> 00:32:12,080 fault. I haven't bought him one yet. Logan works for me. And I 677 00:32:12,080 --> 00:32:14,100 haven't bought him a laptop. He kindly reminded me when I said, 678 00:32:14,180 --> 00:32:16,300 hey, take your laptop out so it can work. He's like, screw you, 679 00:32:16,360 --> 00:32:18,360 buddy. You don't want me one. I'm like, God, this is a 680 00:32:18,360 --> 00:32:21,680 son of a dick. So I give him my laptop and I rip out, oh, here's 681 00:32:21,680 --> 00:32:24,460 the douche bag thing I'm about to say. I rip out my iPad and 682 00:32:27,980 --> 00:32:31,580 yeah. One of two iPads. One of two iPads in the room. Yeah. 683 00:32:31,760 --> 00:32:35,480 Yeah. Real. You just hate me now. It's cool. I'm down with 684 00:32:35,480 --> 00:32:39,780 that. Anyway, I take out my iPad. And the connection on the 685 00:32:39,780 --> 00:32:43,340 laptop is working okay. But the 3G service on the iPad is 686 00:32:43,340 --> 00:32:45,680 literally like about five minutes after the hour it's working 687 00:32:45,680 --> 00:32:47,980 okay, it's working okay, working okay. About quarter to the hour 688 00:32:48,360 --> 00:32:50,240 I can't get any data through. Start sucking, sucking, sucking. 689 00:32:50,360 --> 00:32:52,860 Five minutes after the hour, works good again. Quarter to the 690 00:32:52,860 --> 00:32:55,040 hour, suck, suck, suck, suck, suck. So you get this 20 minutes 691 00:32:55,040 --> 00:32:57,860 of basically I can't do anything on the 3G service at all. I 692 00:32:57,860 --> 00:33:00,740 realize, oh, talks are letting out. And everyone's walking 693 00:33:00,740 --> 00:33:07,260 around assuming the DEF CON pose, which is. Oh, dude, ran 694 00:33:07,260 --> 00:33:12,280 into some dude. Okay. And it kills the AT&T network here. So 695 00:33:12,980 --> 00:33:16,260 we were digging through and so I would execute a query and I'd 696 00:33:16,260 --> 00:33:18,340 wait like five minutes for it to come back. And then I would do a 697 00:33:18,360 --> 00:33:20,600 check, not because my server sucks but because the AT&T 698 00:33:20,600 --> 00:33:23,160 network sucks. So I see this and I have to wait for like five more 699 00:33:23,160 --> 00:33:28,760 minutes to uncover how cool this is going to be. It's three-day 700 00:33:28,760 --> 00:33:32,600 old code from a project that he just started that no one uses. 701 00:33:32,940 --> 00:33:41,080 It's like, shit. Even said, now you have to log in. Yay. I was 702 00:33:41,080 --> 00:33:43,840 really not happy because we really needed something to say. 703 00:33:46,380 --> 00:33:48,340 Anyway. So honestly, I don't know. I don't know how long 704 00:33:49,200 --> 00:33:51,100 this is going to take. We're really at the point where we now 705 00:33:51,100 --> 00:33:54,820 have a functional tool. We will have the website up here in a 706 00:33:54,820 --> 00:33:57,480 little bit. We have GitHub announced the other day they 707 00:33:57,480 --> 00:34:01,680 reached 1 million repositories in GitHub. I don't know how big 708 00:34:01,680 --> 00:34:05,520 SourceForge is. Between the two of them, they represent a mammoth 709 00:34:05,520 --> 00:34:08,740 amount of open source software. And our goal is to find a way 710 00:34:08,740 --> 00:34:12,080 around their terms and conditions and get them all. It 711 00:34:12,080 --> 00:34:14,060 turns out when you download a lot of them all at once, they 712 00:34:14,060 --> 00:34:17,600 cut your ass off. Four and a half gigs was the cutoff point. 713 00:34:17,720 --> 00:34:18,340 Yeah. Four and a half gigs was the cutoff point. Four and a half 714 00:34:18,360 --> 00:34:22,220 gigs, 476 projects was our first cutoff, I think. 715 00:34:22,460 --> 00:34:25,800 It was a temporary ban on the IP and then we went back later 716 00:34:25,800 --> 00:34:29,540 slowly and got a couple more. Yeah. Just slow and steady. 717 00:34:29,680 --> 00:34:31,600 Like a 70s porno, you know, you just kind of got to work your way 718 00:34:31,600 --> 00:34:35,180 into it. It's okay, GitHub. This won't hurt very much at the end. 719 00:34:36,540 --> 00:34:41,420 Carrot instead of a cucumber. Whoa! Holy wow. 720 00:34:41,680 --> 00:34:45,360 Vegetable reference. Thank God you were close enough for the 721 00:34:45,360 --> 00:34:46,300 mic for that to be recorded. 722 00:34:48,740 --> 00:34:50,840 So we changed the schema a number of times. Honestly, 723 00:34:50,960 --> 00:34:54,160 importing the data isn't that hard right now. Takes a little 724 00:34:54,160 --> 00:34:57,100 time. But what we want to do in the long term is tie this 725 00:34:57,100 --> 00:34:59,760 directly to the repository so we can get changes as they 726 00:34:59,760 --> 00:35:02,240 happen. Git, ha, ha, ha. I cannot help but think that's a 727 00:35:02,240 --> 00:35:05,880 pun every time I say it. We want to get more data in there. 728 00:35:06,020 --> 00:35:09,680 We want to get more aggressive analytical capability. And 729 00:35:09,680 --> 00:35:12,180 honestly, we want to be able to quickly drill down and facilitate 730 00:35:12,180 --> 00:35:14,120 the analysis. Because right now when we find something, I still 731 00:35:14,120 --> 00:35:15,860 have to go to the Git repository and look at the code 732 00:35:15,860 --> 00:35:18,320 manually and see what's going on and then go back to the 733 00:35:18,360 --> 00:35:21,940 search engine we wrote. One thing I forgot to talk 734 00:35:21,940 --> 00:35:25,480 about when I was describing CodeGlame, it actually, we're 735 00:35:25,480 --> 00:35:28,920 tracking all the file diffs between versions. So at some 736 00:35:28,920 --> 00:35:32,420 point we'll be able to correlate essentially what files change 737 00:35:32,420 --> 00:35:35,440 between each version and determine, you know, when these 738 00:35:35,440 --> 00:35:38,220 source comments are put in and taken out and moved around and 739 00:35:38,220 --> 00:35:45,000 stuff like that. So really in conclusion, this is a pretty 740 00:35:45,000 --> 00:35:48,280 trivial analysis. But I think that there's a lot of hope here. 741 00:35:48,360 --> 00:35:52,960 Both from a just kind of high comedic value. But also from a 742 00:35:52,960 --> 00:35:56,220 security perspective. As we get more and more and more projects 743 00:35:56,220 --> 00:35:58,560 in here, we have to hope to have more results. And honestly, we 744 00:35:58,560 --> 00:36:01,440 want to have more advanced analysis so people understand. 745 00:36:01,660 --> 00:36:03,620 I mean, there's a lot to be said about the quality of your 746 00:36:03,620 --> 00:36:05,640 comments and the quality of the commit statements in open source 747 00:36:05,640 --> 00:36:07,900 software. It speaks about the development process that people 748 00:36:07,900 --> 00:36:10,980 are using, how good it is. And I think it would be nice to be 749 00:36:10,980 --> 00:36:13,980 able to, you know, figure out how good the open source 750 00:36:13,980 --> 00:36:16,180 community is doing over the years. You know, are we doing a 751 00:36:16,180 --> 00:36:18,340 good job of documenting our code and making people understand the 752 00:36:18,360 --> 00:36:21,200 data? Or is it really just a bunch of jackasses saying fuck, 753 00:36:21,240 --> 00:36:24,680 fuck, fuck, fuck, fuck, fuck, fuck. So we'll be up at 754 00:36:24,680 --> 00:36:28,700 CodeGleam.Pontesac.com. You can follow Pontesac on Twitter. We're 755 00:36:28,700 --> 00:36:30,660 not trying to be Twitter horrors. And just honestly, if you want 756 00:36:30,660 --> 00:36:33,260 an announcement, I'm not going to mail you all individually. You 757 00:36:33,260 --> 00:36:36,280 can just follow us and we'll tell you when it's ready. Thanks to 758 00:36:36,280 --> 00:36:38,020 Brian Denny for last minute support. Brian, are you here? 759 00:36:39,120 --> 00:36:43,220 Brian. There he is. Brian, yay, thanks, Brian. I call Brian up at 760 00:36:43,220 --> 00:36:46,480 like 9 o'clock on Tuesday. I'm like, hey, man, what you doing? 761 00:36:47,780 --> 00:36:48,100 What? 762 00:36:48,360 --> 00:36:52,700 Hi. We've got a big database and no website. Can you help us 763 00:36:52,700 --> 00:36:56,240 out? Shit. You knew we shouldn't have answered the phone. Anyway, 764 00:36:56,300 --> 00:37:00,720 that's all we got. I think any questions, comments? Mass 765 00:37:00,720 --> 00:37:04,920 exoduses is plural. All right. We're done. Thanks very much. 766 00:37:04,960 --> 00:37:05,460 Have fun, guys.