00:00:00.067 --> 00:00:06.240 >> Good morning everybody how are we feeling today? Good thank 00:00:06.240 --> 00:00:11.845 you all for coming. These guys are unfair advantage because 00:00:11.845 --> 00:00:17.451 everybody come in yesterday morning and said what in the 00:00:17.451 --> 00:00:24.157 world is that thing. It looks like the pro motion worked. So 00:00:24.157 --> 00:00:30.330 let's learn about how machines are going to replace us all. 00:00:30.330 --> 00:00:38.171 Let's give these guys a big hand [ applause ] >> Hello Defcon. So 00:00:38.171 --> 00:00:44.878 thank you for the intro. Yes, we did put a high performance 00:00:44.878 --> 00:00:51.051 machine this year. My name is mike walker I'm the program 00:00:51.051 --> 00:00:57.224 manager about researcher agency darpa. >> Hi everybody I want to 00:00:57.224 --> 00:01:05.065 put out the url on the left front stage, if we are going to 00:01:05.065 --> 00:01:12.339 talk about capture the flag we should let you guys play one. If 00:01:12.339 --> 00:01:18.512 you go there, you might want a laptop, there's binary, source 00:01:18.512 --> 00:01:22.416 information. Connection information. Have at it. We 00:01:22.416 --> 00:01:29.690 might have to give you hints later on. And one a little bit 00:01:29.690 --> 00:01:37.531 advice if you connect to it, try not a long session, you will see 00:01:37.531 --> 00:01:44.805 why later. >> Hopefully some of you can hack it and capture the 00:01:44.805 --> 00:01:53.213 flag. In the meantime, I want to talk to you a little bit why we 00:01:53.213 --> 00:01:59.920 are here. When I walk around Defcon and I'm around darpa. We 00:01:59.920 --> 00:02:06.093 are also known for our history of challenges. Starting in 2004d 00:02:06.093 --> 00:02:09.997 arpa started opening global competitions. First in 00:02:09.997 --> 00:02:15.602 self-driving cars. We gave a million dollars to the first 00:02:15.602 --> 00:02:21.208 team that can drive an autonomous car and another in 00:02:21.208 --> 00:02:25.679 city traffic. Again, global open competition developed technology 00:02:25.679 --> 00:02:32.386 that doesn't really exist yet. We are here today to talk about 00:02:32.386 --> 00:02:38.558 bringing autonomy to the sport of hackers to capture the flag 00:02:38.558 --> 00:02:45.832 and we will take this room and knock down the air walls next 00:02:45.832 --> 00:02:51.438 year and have three times bigger realtime, with sports casting 00:02:51.438 --> 00:02:57.611 and imagine an events where all the contestants are machines. We 00:02:57.611 --> 00:03:05.452 will talk about how it works and why it's so important. So if we 00:03:05.452 --> 00:03:11.625 are going to talk about computer security and autonomy, we need 00:03:11.625 --> 00:03:16.096 to recognition that computer security is adversarial contest 00:03:16.096 --> 00:03:23.937 of the mind. Bruce and Dan talk about a field that is defined by 00:03:23.937 --> 00:03:28.975 an intelligent opponent. And computers have been playing the 00:03:28.975 --> 00:03:35.682 adversarial contest of the mind for a while. We will start with 00:03:35.682 --> 00:03:42.389 checker. It's a solved game. We are able to write every single 00:03:42.389 --> 00:03:49.096 position in a database all ten to the 20th position. Solve for 00:03:49.096 --> 00:03:55.802 what perfect play looks like. It turns out once the checker was 00:03:55.802 --> 00:04:01.408 solve the conclusion with perfect play the winning move is 00:04:01.408 --> 00:04:09.249 not to play. But the big play is chess. Chess was proposed as a 00:04:09.249 --> 00:04:14.287 grand challenge for machine. Father of information gear. And 00:04:14.287 --> 00:04:21.561 the idea of the computer that can be the very best people at 00:04:21.561 --> 00:04:27.734 chess took 46 years. It wasn't until years later where deep 00:04:27.734 --> 00:04:33.340 bluetooth became the chess champion. In 1970 acm created an 00:04:33.340 --> 00:04:38.945 all computer chess league just so computers can play each 00:04:38.945 --> 00:04:44.551 other. At prototype competition in 1977 one of those competition 00:04:44.551 --> 00:04:50.724 computers beet the grand master for the first time. It was 00:04:50.724 --> 00:04:55.762 foreshadowing things to come. That's chess. Let's talk about 00:04:55.762 --> 00:05:00.801 harder game. This is go. Recently go computers have 00:05:00.801 --> 00:05:06.973 started to be competitive. Very best master at go. This board 00:05:06.973 --> 00:05:13.680 which is a beginner board. This is not the board that master 00:05:13.680 --> 00:05:20.954 play on. They play on this. 10 to the 7th 6th power position. 00:05:20.954 --> 00:05:27.661 10 to the 86th power number of atoms in the known universe. 00:05:27.661 --> 00:05:33.833 That is not infinite but not possible to reason about. When 00:05:33.833 --> 00:05:40.540 it comes to boards computer don't have a chance with the go 00:05:40.540 --> 00:05:45.579 players. So when we start talking search spaces, machine 00:05:45.579 --> 00:05:51.751 starts to breakdown when they start to play against us. But 00:05:51.751 --> 00:05:57.924 the game I've talk about is actually a very simple game. 00:05:57.924 --> 00:06:04.631 Let's talk about a real game. We appeared locked up. I'm just 00:06:04.631 --> 00:06:10.804 going to keep talking. Let's talk about poker. Poker is very 00:06:10.804 --> 00:06:16.977 difficult game for machines to play. And it's difficult for a 00:06:16.977 --> 00:06:23.149 variety of reasons. The first is this is multi opponent. You 00:06:23.149 --> 00:06:30.991 don't have a single opponent in poker. If I'm at a table and I'm 00:06:30.991 --> 00:06:38.265 playing poker and I'm a little fish and at the table is another 00:06:38.265 --> 00:06:45.538 little fish and big fish. It behooves me to get the big fish 00:06:45.538 --> 00:06:52.245 to eat the other guys, which means I need to mold player 00:06:52.245 --> 00:06:57.851 versus player interactions that are not my own. Thank you. 00:06:57.851 --> 00:07:04.024 Additionally, keep the mic? All right. I'll keep the mic. Oh, 00:07:04.024 --> 00:07:11.298 yeah. We can switch that back to the slides. We'll do it. This 00:07:11.298 --> 00:07:19.706 game is none zero sum. So what does that mean? It's if I play 9 00:07:19.706 --> 00:07:28.114 games of chess and I win except the 11th. If you win 10 games of 00:07:28.114 --> 00:07:34.287 chess and win every one but loses the 11th game, I'm 00:07:34.287 --> 00:07:42.128 winning. If you win 10 games for a $1 and lose a million dollars 00:07:42.128 --> 00:07:48.835 at the 11th, you are not winning. Poker is a game of 00:07:48.835 --> 00:07:55.008 incomplete information. I can see my pieces and you can see 00:07:55.008 --> 00:08:01.715 mine. Poker everything is a secret. As a player you have to 00:08:01.715 --> 00:08:07.320 keep a statistical probability model what your opponent has and 00:08:07.320 --> 00:08:12.926 move throughout the game. So how are computers doing against 00:08:12.926 --> 00:08:19.099 human with poker? This year four versus 4, 7 hundred thousand 00:08:19.099 --> 00:08:25.805 chips. Do not reproduce. So since we are not just in Las 00:08:25.805 --> 00:08:31.978 Vegas we are Defcon. Let's talk about a really hard game. 00:08:31.978 --> 00:08:38.151 Capture the flag. It's being played right now in the valley 00:08:38.151 --> 00:08:45.992 with about 15. You can tell from the get go that this is multi 00:08:45.992 --> 00:08:51.031 opponent. This is the live network exercise. Big team 00:08:51.031 --> 00:08:57.203 sport. Let's talk about what the teams are doing. Imagine you 00:08:57.203 --> 00:09:05.044 have a friend who is not a c coder. And he's written a whole 00:09:05.044 --> 00:09:12.318 bunch of new services and he's giving you a new one and said 00:09:12.318 --> 00:09:18.491 plug into a server with best ones in the world. That's 00:09:18.491 --> 00:09:23.530 capture the world. First you have to defend information. 00:09:23.530 --> 00:09:30.236 Capture the flag. Flag is data. And code you have never seen. 00:09:30.236 --> 00:09:38.077 You want to keep flag so you are protecting data. All as fast as 00:09:38.077 --> 00:09:44.784 you can. Second you want to take your opponent's flag. You want 00:09:44.784 --> 00:09:52.625 to feel the patch and take as many flags as you can in the 00:09:52.625 --> 00:09:58.231 short amount of time as possible. If somebody hands you 00:09:58.231 --> 00:10:03.837 that server please plug it into this hardware, the clever 00:10:03.837 --> 00:10:11.678 amongst you will say I know how to win this game. I will turn 00:10:11.678 --> 00:10:17.283 everything off. This is a network exercise. I'm going to 00:10:17.283 --> 00:10:23.456 talk about what that referee is doing. It's a gigantic cinder 00:10:23.456 --> 00:10:30.163 all the data in the game. The game changes over time. The 00:10:30.163 --> 00:10:36.870 upshot of this you don't know who the sender is and the 00:10:36.870 --> 00:10:41.908 referee the game organizer talking to every piece of 00:10:41.908 --> 00:10:48.081 software and making sure that it still work, they are connecting 00:10:48.081 --> 00:10:54.787 to it and e-mail server they send you e-mail and make sure 00:10:54.787 --> 00:11:01.494 it's work agree correctly. And web server to make sure all the 00:11:01.494 --> 00:11:08.201 content is there and up and running and running as it needs 00:11:08.201 --> 00:11:14.908 to be. So if you slow the software down, damage it you 00:11:14.908 --> 00:11:22.181 lose points. If you turn it off you lose all your points. Keep 00:11:22.181 --> 00:11:28.888 your data, take other os data and don't break any of the 00:11:28.888 --> 00:11:35.061 software you are trying to defend. This is obviously a game 00:11:35.061 --> 00:11:40.099 of incomplete information. The flaws your o-popes have. So 00:11:40.099 --> 00:11:46.272 sounds hard. Let's continue. How is it that teams play this 00:11:46.272 --> 00:11:51.311 exercise. If you play live network defense contest. It's 00:11:51.311 --> 00:11:58.585 simple and I'm going to sit down with wireshark and get to work 00:11:58.585 --> 00:12:04.190 and, wireshark will decode single pack of data. And the 00:12:04.190 --> 00:12:09.796 reason for that is it's running all new protocol, software. 00:12:09.796 --> 00:12:14.267 Nexus don't have a single vulnerability signature that 00:12:14.267 --> 00:12:19.872 works. You have to do binary reverse engineering the entire 00:12:19.872 --> 00:12:26.045 time. You have to, you are given binary code, no documentation. 00:12:26.045 --> 00:12:34.454 And the only way to know how it works is to reverse it. To write 00:12:34.454 --> 00:12:41.160 your own vulnerability scanner and do it as fast as you can 00:12:41.160 --> 00:12:47.867 while your opponents are trying to do the same thing to you. 00:12:47.867 --> 00:12:54.040 Research space. The number of atoms in the universe and size 00:12:54.040 --> 00:13:01.314 of the go board. Big numbers. It turns out when you want to 00:13:01.314 --> 00:13:06.919 reason about the number of inputs into arbitrary un examine 00:13:06.919 --> 00:13:13.626 software we have a good proof that says we don't know anything 00:13:13.626 --> 00:13:19.799 about software in the general case. We don't know when it's 00:13:19.799 --> 00:13:25.972 going to halt let alone input it has. Research software is 00:13:25.972 --> 00:13:32.679 infinite and it gets harder from there. If you want to explore 00:13:32.679 --> 00:13:39.385 space and software and it's none trivial. You need to learn how 00:13:39.385 --> 00:13:46.659 to have a conversation with it. If I'm an e-mail client and I'm 00:13:46.659 --> 00:13:52.832 calling a brand new e-mail server and I say hello. And 00:13:52.832 --> 00:14:00.106 hello your sequence number is 50. I don't know what to do next 00:14:00.106 --> 00:14:07.947 unless I reverse out. Maybe I need to add 51 or maybe I need 00:14:07.947 --> 00:14:15.788 to hash it or add a match. Even to explore the state pace and 00:14:15.788 --> 00:14:21.961 know how many position there are, I think to synthesize in 00:14:21.961 --> 00:14:28.134 order to talk to the software. You have multiple opponent. None 00:14:28.134 --> 00:14:33.172 zero sum game with incomplete information. If machines can't 00:14:33.172 --> 00:14:41.013 win at go and win at poker do machine have a chance of doing 00:14:41.013 --> 00:14:47.720 this at all? And that's exactly what we are talking about doing. 00:14:47.720 --> 00:14:54.427 Taking the team away from ctf table and let the machine. But 00:14:54.427 --> 00:15:02.268 any machine but this one over here. We will fire it up for you 00:15:02.268 --> 00:15:08.975 guys [applause] so this year we brought one of these. Next year 00:15:08.975 --> 00:15:16.816 we are bringing 15 racks. But that one is 1300, 16 tb of ram. 00:15:16.816 --> 00:15:23.523 The whole computer outlay is a half megawatt. And we are going 00:15:23.523 --> 00:15:30.797 to run it and all that heat as the Las Vegas summer. Machines 00:15:30.797 --> 00:15:36.402 is not enough. This contest is about automation and software 00:15:36.402 --> 00:15:42.575 about the system that's going to solve this challenge. Let's talk 00:15:42.575 --> 00:15:48.748 a little bit why this is feasible. For the last year 00:15:48.748 --> 00:15:53.786 we've been running the qualifying round. The result of 00:15:53.786 --> 00:15:59.392 that qualification are free and open and available and download 00:15:59.392 --> 00:16:04.430 them. That's everything the machine did in our qualifiers. 00:16:04.430 --> 00:16:08.334 Every binary that patch themselves every vulnerability 00:16:08.334 --> 00:16:15.041 they built. How many capture the flag we let the machine played? 00:16:15.041 --> 00:16:21.747 In scale, Defcon capture the flag, team up to 80 people have 00:16:21.747 --> 00:16:27.353 to solve 10 challenges in 48 hours. Ten difficult reverse 00:16:27.353 --> 00:16:32.391 engineering binary challenges. Machine 131 in 24 hours. The 00:16:32.391 --> 00:16:37.997 machine skill capture the flag. They were able to synthesize 00:16:37.997 --> 00:16:44.170 vulnerability in 75% of the software we released. When I say 00:16:44.170 --> 00:16:50.343 they prove vulnerability I don't mean they binary code and spit 00:16:50.343 --> 00:16:56.515 out we need there's an integer over flow here. Not false 00:16:56.515 --> 00:17:02.121 positive. They were able to create the input and logic 00:17:02.121 --> 00:17:07.159 recreate the binary they've never seen. That means the 00:17:07.159 --> 00:17:13.332 conversation logic and the input that creates the sig fault. We 00:17:13.332 --> 00:17:18.371 asked them to patch software. Now, obviously we have 00:17:18.371 --> 00:17:25.077 conditions on this because it's easy to do that. Start exit. So 00:17:25.077 --> 00:17:30.683 what we asked them to do original functionality. The unit 00:17:30.683 --> 00:17:36.289 test, make sure the software was reasonably undamaged and not 00:17:36.289 --> 00:17:40.760 slow if software down. Performing within the limits. 00:17:40.760 --> 00:17:46.933 Given those preconditions we know there are 590 bugs and of 00:17:46.933 --> 00:17:54.206 those bugs we can test for as a field the machine's patch 100%. 00:17:54.206 --> 00:18:00.379 So we think we have believable autonomy in this space. 7 00:18:00.379 --> 00:18:06.552 finalist qualified who built the system we will introduce to you 00:18:06.552 --> 00:18:13.826 later. But think about the scale of that capture the flag that we 00:18:13.826 --> 00:18:21.667 will try to bring onstage near. 131 binary to run it in a day 00:18:21.667 --> 00:18:28.941 live network head to head that is whole tons of data sports to 00:18:28.941 --> 00:18:35.648 you live event. So how to go deeper from a sports casting 00:18:35.648 --> 00:18:41.821 perspective. It's easier to have raise of the bar contest. Team 00:18:41.821 --> 00:18:49.095 has points. But we wanted to actually to be able to see in 00:18:49.095 --> 00:18:54.700 realtime structurally what great patch looked like. What a great 00:18:54.700 --> 00:19:00.873 cashing input, flag capture looked like. To do that we have 00:19:00.873 --> 00:19:06.479 to build some visualization software and we did not decide 00:19:06.479 --> 00:19:12.652 to bring you screenshot. We brought a live demo. With that 00:19:12.652 --> 00:19:18.824 Jordan you are on. >> Thankfully I'm shorter. This mic works. 00:19:18.824 --> 00:19:26.098 Let's go ahead and pull up what we are talking about here. Mike 00:19:26.098 --> 00:19:32.271 talk about we have software that's able to look at other 00:19:32.271 --> 00:19:37.877 software. If you've done binary reverse engineering this will be 00:19:37.877 --> 00:19:45.151 familiar to you. S tray this. Sample sys call log. I'm able to 00:19:45.151 --> 00:19:51.857 see from here what kernel system called were made. But I don't 00:19:51.857 --> 00:19:58.030 see the logic. I don't see comparisons. I don't see certain 00:19:58.030 --> 00:20:05.304 things so to do that I'm going to pull out the debugger and 00:20:05.304 --> 00:20:10.910 look at what it's actually doing. Ctf is command-line game 00:20:10.910 --> 00:20:17.083 and understand is command-line exercise. >> I do pro, so that 00:20:17.083 --> 00:20:22.121 get you some graphical interface. You are looking at 00:20:22.121 --> 00:20:28.294 886. Don't try to read that. This one, though is the 00:20:28.294 --> 00:20:33.899 challenge you are running right now. You've seen the source. 00:20:33.899 --> 00:20:40.606 Hopefully you are working hard at it. I would love to see 00:20:40.606 --> 00:20:46.779 someone do crash on it. 300 lines of code. Clapping for 00:20:46.779 --> 00:20:53.486 something they saw there. Oh, that's good [ applause ] >> So 00:20:53.486 --> 00:20:59.091 we have little traditions to welcome new speakers. Are these 00:20:59.091 --> 00:21:06.365 guys doing a good job? [ applause & cheers ]. >> So we 00:21:06.365 --> 00:21:13.639 have a couple of patches here for these guys that we want to 00:21:13.639 --> 00:21:20.346 give to them. And we have one for the competitor over there. 00:21:20.346 --> 00:21:27.052 Thank you, guys. Give them audio round of applause. [ applause ] 00:21:27.052 --> 00:21:33.759 >> Nice. That makes more sense than source code. So this isn't 00:21:33.759 --> 00:21:39.932 really all that useful. Let's look at what the program does. 00:21:39.932 --> 00:21:44.970 It's a customer support message board. It's a classic 00:21:44.970 --> 00:21:49.441 application. Two vulnerabilities that we know about. Possibly 00:21:49.441 --> 00:21:57.283 more that's a beauty of c. I'm going to go ahead and put my 00:21:57.283 --> 00:22:03.455 name in there. Let's view some threads. Welcome to our message 00:22:03.455 --> 00:22:09.628 board. Let's reply to this one. Your software broke. Like most 00:22:09.628 --> 00:22:15.234 customer support request. Check the threads. Oh, good. It's got 00:22:15.234 --> 00:22:21.407 my message. So we can add new messages. Simple service. Let's 00:22:21.407 --> 00:22:29.248 exit back out. Now we get to the fun spot. Instead of looking at 00:22:29.248 --> 00:22:35.955 that, that execution right there is loaded up live in here and 00:22:35.955 --> 00:22:43.796 maybe it's 37. This is good. We got lots of input. I don't know 00:22:43.796 --> 00:22:51.637 if you could tell which one is mine. Let's see if this one is 00:22:51.637 --> 00:22:58.911 mine. >> So you want to give us technically what this is. >> 00:22:58.911 --> 00:23:05.084 This is me. I'm looking at someone else's. This is hexes. 00:23:05.084 --> 00:23:11.257 It's a visualization engine for cgc and this view is tracker. 00:23:11.257 --> 00:23:17.429 Memory trace viewer. That's what we are looking at. This is 00:23:17.429 --> 00:23:24.136 software running over time. And time, of course, on the x that's 00:23:24.136 --> 00:23:30.309 how it's done. When we start here at the beginning. The 00:23:30.309 --> 00:23:36.482 assembly bottom left. >> So the program ran in the dynamic 00:23:36.482 --> 00:23:42.655 sandbox the events recorded and what you are seeing left to 00:23:42.655 --> 00:23:48.260 right is execution overtime. And structure that was created by 00:23:48.260 --> 00:23:54.433 that data being executed by that software. >> So the fancy 00:23:54.433 --> 00:24:00.039 explanation is we've got realty address mapped into curve to 00:24:00.039 --> 00:24:06.211 maintain locality what it means it's a picture that shows what 00:24:06.211 --> 00:24:12.918 the program did. We took the program and we feed it input. 00:24:12.918 --> 00:24:20.759 And in this case is what I just did. That's what we are looking 00:24:20.759 --> 00:24:27.466 at right now. When other tracks, these are what you are doing. 00:24:27.466 --> 00:24:34.173 I'll see a little red one. If somebody manages to figure that 00:24:34.173 --> 00:24:42.014 out we will see it there. We can step through this track. Let it 00:24:42.014 --> 00:24:48.187 run. Change some layouts views of it. We've had system calls. 00:24:48.187 --> 00:24:55.461 Saw earlier this is my use. I've got transmit. I can see output 00:24:55.461 --> 00:25:02.167 to the program. Allocation. I can see memory. Layer on top of 00:25:02.167 --> 00:25:08.874 linux. All of these being shown in the gui. We've cheated. You 00:25:08.874 --> 00:25:15.047 don't need source code to track. This is viewer thread. And 00:25:15.047 --> 00:25:21.220 looking at this you can see structure. You can tell the 00:25:21.220 --> 00:25:27.393 piece that outputs data over here. This is the region of 00:25:27.393 --> 00:25:33.565 memory the piece of code that is doing word wrapping. It's 00:25:33.565 --> 00:25:40.839 reading over. Bouncing it back and when it gets to the end of 00:25:40.839 --> 00:25:47.012 it. You don't have to know exactly what the assembly is. 00:25:47.012 --> 00:25:52.618 You can make comparison without having that. >> Locality is 00:25:52.618 --> 00:25:57.656 preserved. Code that is closed together, it's grouped together. 00:25:57.656 --> 00:26:06.065 So a far jump is a far jump. >> And likewise a tight loop down 00:26:06.065 --> 00:26:12.771 here or something looks thin. This is the code in the original 00:26:12.771 --> 00:26:18.377 disassembly program. >> Over time is cool. Over time it's 00:26:18.377 --> 00:26:24.550 able to compare traces. We are hoping still that somebody is 00:26:24.550 --> 00:26:31.256 going to capture our flag and give us a crashing trace. We 00:26:31.256 --> 00:26:37.963 will show one now. Should we drop a hint? >> Yes. >> 00:26:37.963 --> 00:26:43.001 Structure links are super interesting. Strength of 30. So 00:26:43.001 --> 00:26:51.410 I might want to try that minus 1 plus 1. Anyway. >> I'm going to 00:26:51.410 --> 00:26:57.015 go ahead and generate a different use of the program 00:26:57.015 --> 00:27:02.621 now. I'm going to post new threat. My subject. Software. 00:27:02.621 --> 00:27:09.328 It's better. My spelling is too. All right. Back and look. That 00:27:09.328 --> 00:27:17.169 one is not mine. I don't think that's mine. >> Let's go take a 00:27:17.169 --> 00:27:23.342 look at that. >> Here's mine. That's the different one. Let's 00:27:23.342 --> 00:27:31.183 look at here. Let's pull them both up. So now, you. >> You can 00:27:31.183 --> 00:27:39.024 see the green trace as the red x of doom. Which means a security 00:27:39.024 --> 00:27:44.630 harmful crash. Signal 11. Generally bad. >> Well done. We 00:27:44.630 --> 00:27:51.904 have your name. If you can tell us your name that validate that 00:27:51.904 --> 00:27:59.178 you were the person. And this is yours the first to solve our 00:27:59.178 --> 00:28:04.783 capture flag. What was your name, sir? Funny thing that. 00:28:04.783 --> 00:28:13.192 Trust and verify. >> If you can come up and tell us to the table 00:28:13.192 --> 00:28:19.898 quietly what you signed in as. >> You can also tell us 00:28:19.898 --> 00:28:25.504 password. There's a root password [ inaudible ]. You want 00:28:25.504 --> 00:28:32.211 to scroll through what happened in the case here. >> So we've 00:28:32.211 --> 00:28:39.484 got, in this case whoever was able to crash it, you can see 00:28:39.484 --> 00:28:45.090 outputs, we already know. We see output. Someone viewed the 00:28:45.090 --> 00:28:51.263 message board. But in this case there's extra data. Leak out 00:28:51.263 --> 00:28:57.436 extra data. If your subject line is exactly 30 characters long. 00:28:57.436 --> 00:29:04.710 So [ inaudible ] read out the data actually send way too much 00:29:04.710 --> 00:29:10.882 data and causes a segmentation fault. >> It's a memory over 00:29:10.882 --> 00:29:18.724 read. >> So let's look at patch to that. Patch it for us. We 00:29:18.724 --> 00:29:25.998 want to see what it looks like when it's fixed. >> Before we 00:29:25.998 --> 00:29:31.603 were using the same software to compare different inputs. We 00:29:31.603 --> 00:29:37.776 will put the same input into different software. So the crash 00:29:37.776 --> 00:29:43.949 generated by the crowd going into patch and unpatched. So you 00:29:43.949 --> 00:29:49.554 can tell immediately which one is patch. Huge memory leak 00:29:49.554 --> 00:29:55.727 towards the horizon. The patch one ends normally. We should see 00:29:55.727 --> 00:30:03.001 the moment that they diverge. >> We can see right in here. Let's 00:30:03.001 --> 00:30:08.607 look at a different one. Different patch for a different 00:30:08.607 --> 00:30:15.313 program. >> So notice that was a very tight patch. Whoever wrote 00:30:15.313 --> 00:30:21.486 it knew exactly where to test for. They didn't change the 00:30:21.486 --> 00:30:26.525 program, there wasn't whole bunch of testing. This is 00:30:26.525 --> 00:30:32.698 software that is not connected to the internet. This is a 00:30:32.698 --> 00:30:38.870 completely different program. >> If you look at the shape of 00:30:38.870 --> 00:30:43.909 these, clearly it's doing different stuff. There's a flat 00:30:43.909 --> 00:30:48.947 initialization and broader peaks and valley. But they look 00:30:48.947 --> 00:30:55.654 similar. Two runs on the same program. One was able to trigger 00:30:55.654 --> 00:31:02.928 a program. >> The blue as the doom. See what we can learn 00:31:02.928 --> 00:31:09.634 about this patch. Anyone see a patch? >> Remember, a far jump 00:31:09.634 --> 00:31:16.908 is a far jump. In the very beginning is jumping as far away 00:31:16.908 --> 00:31:23.081 as it can and it's calling allocate and jumping back and 00:31:23.081 --> 00:31:29.788 that to me looks like a classic jump patch. Inserted by the 00:31:29.788 --> 00:31:34.259 patch author. I'm doing something allocate to protect 00:31:34.259 --> 00:31:40.966 the program. Never this fast, you will see at ctf. And here 00:31:40.966 --> 00:31:46.004 end. >> Nice easy. Something happen at the beginning. 00:31:46.004 --> 00:31:50.475 Allocation maybe it's tracking where memory is legitimately 00:31:50.475 --> 00:31:56.081 allocate. Instead of crashing, it exits cleanly. With an error 00:31:56.081 --> 00:32:01.686 code. >> Stack cookie detection. It looks like detection jump 00:32:01.686 --> 00:32:08.960 away hand code. We only have one more surprise for you about this 00:32:08.960 --> 00:32:16.234 patch and how it was made. >> This one was written by a 00:32:16.234 --> 00:32:22.407 computer. This is a binary from the qualification round that we 00:32:22.407 --> 00:32:27.445 recently finished and this is software patching software with 00:32:27.445 --> 00:32:31.917 no human interaction. Completely autonomous. This software was 00:32:31.917 --> 00:32:38.089 unknown to the system generated this patch. No access to source 00:32:38.089 --> 00:32:43.128 code or documentation. It did this all automatically. It 00:32:43.128 --> 00:32:49.835 decide to submit this to us as best case approach. And healed 00:32:49.835 --> 00:32:55.440 vulnerability. And it looks like what it is incredible tight 00:32:55.440 --> 00:33:02.147 patch and a flawed that it probably know about. >> In that 00:33:02.147 --> 00:33:09.988 case, it was a tight patch at the moment of the flaw. So it 00:33:09.988 --> 00:33:16.695 was able to detect that exactly there. It went go ahead clean 00:33:16.695 --> 00:33:22.300 and exited it. Readable error. Those about 200 thousand. Third 00:33:22.300 --> 00:33:29.574 one is 9 hundred thousand. So right off the bat it's a much 00:33:29.574 --> 00:33:36.281 longer execution but it's still the same program. If you were to 00:33:36.281 --> 00:33:42.454 pull this on ida and step through gdb it would have 00:33:42.454 --> 00:33:48.627 different functionality. If you look at it here, no system call, 00:33:48.627 --> 00:33:54.799 no other interaction until the very end. Much like the others. 00:33:54.799 --> 00:34:01.506 So it's the same shape, same gram and in this case different 00:34:01.506 --> 00:34:08.213 program doing the same thing. It's got the same input. So you 00:34:08.213 --> 00:34:14.920 get the overrule shape that looks the same but it's got a 00:34:14.920 --> 00:34:22.193 lot more to it. And we can see what it's doing. Hide underneath 00:34:22.193 --> 00:34:29.467 it. I call this the railroad track. If I click along any of 00:34:29.467 --> 00:34:36.741 the spot blue plain, it's where it was in that binary. If it's 00:34:36.741 --> 00:34:43.448 in the same spot, it's in the same spot. This bottom rail, 00:34:43.448 --> 00:34:50.155 line here, it was doing the same little check over and over 00:34:50.155 --> 00:34:57.429 again. We can hone in and look at the assembly. We don't need 00:34:57.429 --> 00:35:03.034 to because we know this program was successfully defend this 00:35:03.034 --> 00:35:08.640 particularly flawed. Instead of patch at that flaw, it was 00:35:08.640 --> 00:35:15.347 checking everywhere. It was a longer long. But it was able to 00:35:15.347 --> 00:35:22.053 do that not knowing exactly where the flaw is. I like to 00:35:22.053 --> 00:35:28.226 look at the traces and digging through the qualifier. And they 00:35:28.226 --> 00:35:32.697 almost have a personality. Because you see different 00:35:32.697 --> 00:35:38.870 approaches the system will take. Here anybody could see it you 00:35:38.870 --> 00:35:44.476 could tell right away where the changes are and what's 00:35:44.476 --> 00:35:49.514 happening. >> In that third trace machine grab with 00:35:49.514 --> 00:35:54.552 uncertainty. Jordan when his team can actually pull out 00:35:54.552 --> 00:36:00.158 difference in approaches. It's another thing to say I know 00:36:00.158 --> 00:36:06.331 which system built that. So which system built this and more 00:36:06.331 --> 00:36:11.936 important who built this system. Because we started this whole 00:36:11.936 --> 00:36:18.109 thing with about a hundred team registered around the world and 00:36:18.109 --> 00:36:25.383 we qualified the top 7 scoring team and they are mostly in the 00:36:25.383 --> 00:36:32.090 audience with us today. So I want to take a moment to 00:36:32.090 --> 00:36:37.696 appreciate that. We say can machine do this stuff in 00:36:37.696 --> 00:36:42.167 adversary format. We have researcher say maybe it's 00:36:42.167 --> 00:36:50.008 possible and maybe we can do it. So I want to talk about the 00:36:50.008 --> 00:36:55.046 teams. You can see the submission of their system. 00:36:55.046 --> 00:37:00.085 Capture the flag operating system available online. I want 00:37:00.085 --> 00:37:07.926 those teams to come up right now and join us in front of the 00:37:07.926 --> 00:37:15.767 stage. If you are a finalist and you are here today, come on up, 00:37:15.767 --> 00:37:23.608 guys. [ applause ] >> So when I call you out please step forward 00:37:23.608 --> 00:37:29.781 and let everyone give you a round of applause. Our finalist 00:37:29.781 --> 00:37:34.252 in no particular order. Team partnership between university 00:37:34.252 --> 00:37:40.959 of Virginia team tech x. [ applause ] From the home of 00:37:40.959 --> 00:37:48.233 university in pa. This is a team with deep ctf for all secure. 00:37:48.233 --> 00:37:55.507 Come on up [ applause ] Team code gazitsu. This was a much 00:37:55.507 --> 00:38:01.679 bigger team than was able to make it. An international team. 00:38:01.679 --> 00:38:08.386 Whole bunch of folks calling in from skype. [ applause ] Team 00:38:08.386 --> 00:38:14.559 dissect. If you play on the ctf circuit. Michael Cotraous. [ 00:38:14.559 --> 00:38:21.266 applause ] From the university of Idaho, led by Dr. Jim Elsfas. 00:38:21.266 --> 00:38:27.438 [ applause ] Team shellfish. You know shellfish working out of 00:38:27.438 --> 00:38:33.044 the lab of University of California Santa Barbara led by 00:38:33.044 --> 00:38:40.885 Yuns. [ applause ] And team deep red lead by Dr. Tim. Say hi, 00:38:40.885 --> 00:38:46.491 everybody [applause] These are our seven finalists and I want 00:38:46.491 --> 00:38:52.664 to close with a few parting thoughts. First, why are we 00:38:52.664 --> 00:38:58.836 doing this? Teach computers to play this game. Because it's not 00:38:58.836 --> 00:39:04.442 just a game it's one of the toughest applied reverse 00:39:04.442 --> 00:39:10.615 engineering on earth. And these are the hard skills of computer 00:39:10.615 --> 00:39:16.788 [ inaudible ]. Hard skill right now where machines have no 00:39:16.788 --> 00:39:22.961 chance. I'm from darpa. That means we try to invent the 00:39:22.961 --> 00:39:28.566 technology of the future and it's really easy to understand 00:39:28.566 --> 00:39:35.840 why we need something that can react to a new threat and attack 00:39:35.840 --> 00:39:42.013 in realtime. There was time to deny before. These are the 00:39:42.013 --> 00:39:50.421 pioneers who signed up to do it. I want to send out a big thank 00:39:50.421 --> 00:39:56.594 you for Defcon conference. Everyone on the team. Who let us 00:39:56.594 --> 00:40:03.301 put this big logistic into the move and hotel. Thank you very 00:40:03.301 --> 00:40:10.008 much. I want to close with the most important word I've said 00:40:10.008 --> 00:40:16.714 all day. It's not cyber and not darpa. This talk is Thursday 00:40:16.714 --> 00:40:22.320 august 6. Machine play capture the flag before Defcon. That 00:40:22.320 --> 00:40:29.594 means if you want to come back this room when we triple the 00:40:29.594 --> 00:40:36.868 size put in 15 of these racks and play capture the flag today 00:40:36.868 --> 00:40:44.709 you need to show up one day early. I want like to close with 00:40:44.709 --> 00:40:51.416 a round of applause for these teams. By this game on that 00:40:51.416 --> 00:40:57.588 machine live in this room next year the machine play capture 00:40:57.588 --> 00:41:05.430 the flag. Thank you very much. [ applause ] >> And I think we 00:41:05.430 --> 00:41:11.602 close this up with time for questions. >> If you have 00:41:11.602 --> 00:41:18.309 questions, come down here. I have the mic. >> That guy has 00:41:18.309 --> 00:41:23.348 the question's mic. >> There's one important question. Looks 00:41:23.348 --> 00:41:29.520 interesting. >> So what do you guys think about inviting the 00:41:29.520 --> 00:41:35.126 winning team to play against humans Defcon capture the flag 00:41:35.126 --> 00:41:42.400 near? >> I'm going to repeat the question. So I believe we have 00:41:42.400 --> 00:41:48.573 the of the legitimate business that run capture the flag with 00:41:48.573 --> 00:41:55.847 us and he asked if machines will play human next year. I can't 00:41:55.847 --> 00:42:03.688 ask these teams to do that. Well you can. Show of hands would you 00:42:03.688 --> 00:42:10.962 guys do that if we set it up? [applause] Okay. If you guys 00:42:10.962 --> 00:42:17.135 will play, we will keep the computers on. If you will 00:42:17.135 --> 00:42:23.841 basically tell everybody that it is a basically a fair and open 00:42:23.841 --> 00:42:30.548 contest for machine and people, good? Okay. We've got a deal [ 00:42:30.548 --> 00:42:37.255 applause ] And for the record I think it's probably early. But 00:42:37.255 --> 00:42:44.529 if you guys will make the game open to the machine entering and 00:42:44.529 --> 00:42:51.235 team wants to play, we will keep the machines on absolutely. >> 00:42:51.235 --> 00:42:56.274 Awesome. >> Great presentation. So just a couple observations 00:42:56.274 --> 00:43:03.548 and two questions. I want to start off with [ inaudible ] a 00:43:03.548 --> 00:43:09.720 lot of discussion domain way. Checker poker ctf and throwing a 00:43:09.720 --> 00:43:18.129 lot of power at this so is it safe to say this is mainly brute 00:43:18.129 --> 00:43:25.403 force type of problem or Denis at deep mind you can create game 00:43:25.403 --> 00:43:30.441 ai in naturalistic from neuroscience or is that just 00:43:30.441 --> 00:43:37.715 science fiction. Sorry. A lot of rants there. >> But I think the 00:43:37.715 --> 00:43:43.321 question is basically like how feasible is this and what 00:43:43.321 --> 00:43:49.494 category of problem does it fit into. The world top programmer's 00:43:49.494 --> 00:43:55.666 mind are literally standing right in front of me. You should 00:43:55.666 --> 00:44:02.373 ask them. We don't know what kind of problem, we will find 00:44:02.373 --> 00:44:09.080 out. Is that it? >> That was a cool visualization of the 00:44:09.080 --> 00:44:15.253 tracing. What did you use to trace instruction to do that? 00:44:15.253 --> 00:44:22.527 Emulator. >> How the tracer were generated in this case? We got a 00:44:22.527 --> 00:44:28.699 patch qmu. You can substitute that with anything. You can use 00:44:28.699 --> 00:44:34.305 anything that does execution system tracing. >> To make your 00:44:34.305 --> 00:44:39.343 visual software available after the contest. >> So far 00:44:39.343 --> 00:44:43.814 everything that's part of the infrastructure from the 00:44:43.814 --> 00:44:50.521 operating system we built for ctf up to all the challenges are 00:44:50.521 --> 00:44:56.127 going to be released to the public and also releasing 00:44:56.127 --> 00:45:02.300 everything that happens in the event. We have open track for 00:45:02.300 --> 00:45:07.338 almost everything we are building but that software, I'll 00:45:07.338 --> 00:45:13.511 let him answer that question. >> That's joint work with another 00:45:13.511 --> 00:45:20.217 company that generates that bits of it. We are still working on 00:45:20.217 --> 00:45:25.256 that. Mainly because it's an early prototype. We wouldn't 00:45:25.256 --> 00:45:31.963 rule it out. That's for sure. >> Thanks. >> Thank you, guys. 00:45:31.963 --> 00:00:00.000 Let's give them another big round of applause. [ applause ].