00:00:00.400-->00:00:05.405 >>Good afternoon hello wow everybody's got their own conversation going on, cool, I 00:00:08.308-->00:00:13.847 guess you're not really wanting to pay attention to what the badge means or any of the good 00:00:13.847-->00:00:20.654 wonderful puzzles and other fun hijinks that L0st has put into it but if you do here's Lost 00:00:20.654-->00:00:25.659 [applause] >>How's everybody doing today? [applause] >>I love you Lost! >>Thanks, I love you 00:00:34.134-->00:00:40.607 too, I would ask a a little patience, for those of you who may have heard rumors in the 00:00:40.607-->00:00:46.947 wind we we we have hiccups with regarding the badges every year and this particular hiccup has 00:00:46.947-->00:00:53.320 made me go the past three days with roughly two to three hours of sleep total so bare with me I 00:00:53.320-->00:00:57.758 also am gonna do a kind of new thing during this 101 talk it's going to be kind of an 00:00:57.758-->00:01:02.162 experiment and it's either going to go totally off the rails or it's gonna be fine but that'll 00:01:02.162-->00:01:07.301 be based on you guys and me so we're gonna try and go through this together. I do this 101 00:01:07.301-->00:01:11.638 talk every year um for those of you who don't know because it's 101 this is not I'm going to 00:01:11.638-->00:01:15.175 drop 0day I'm not going to talk about elite stuff and I'm not going to come and act like I'm 00:01:15.175-->00:01:20.147 this snooty jackass who knows more than you do um cause like most of you are way smarter than 00:01:20.147-->00:01:26.219 I am I'm just a weirdo with a soldering iron and uh and like math a lot but um how many of 00:01:26.219-->00:01:31.224 you this is your first Defcon by a show of hands holy crap [laughter] yeah! Welcome! 00:01:35.495-->00:01:40.634 Welcome! So I I really hate giving talks like this because I really prefer having discussions 00:01:40.634-->00:01:46.006 and on that note there is a room on the conference floor that's the 1057 room and I request that 00:01:46.006-->00:01:50.510 couches are put in there every year because I encourage people to come in and just sit down and 00:01:50.510-->00:01:55.349 hang out and talk with people because if people at this con whether they're the person who 00:01:55.349-->00:01:59.486 invented a programming language or wrote some major app if they're so pretentious that 00:01:59.486-->00:02:04.925 they're not approachable I don't want 'em here. So if And if if you try and approach someone and 00:02:04.925-->00:02:08.929 you try and talk to them and they're too high and mighty to talk to you you can tell them to 00:02:08.929-->00:02:13.934 fuck off because I just don't want them here [applause]. Of you guys that are here for the 00:02:19.606-->00:02:26.013 first time, how many of you are from out of the United States? Wow, thank you thank you for 00:02:26.013-->00:02:32.686 travelling so far to come here. Okay a couple of things we're going to do here so for those of 00:02:32.686-->00:02:39.259 you don't know my name is Lost uh they call me 1057 Lost Boy couple other things all the 00:02:39.259-->00:02:45.432 crazy crypto puzzly stuff that you see stuff on the lanyards stuff in the program that's all 00:02:45.432-->00:02:49.836 me so that's basically a representation of all of my free time from the last year 00:02:52.806-->00:02:56.276 [laughter] And I'm often asked you where you know how do I structure these things how does 00:02:56.276-->00:03:01.081 it come up with? So I I believe I do have ADD OCD where I'm constantly changing what I'm 00:03:01.081-->00:03:06.753 completely obsessed about and um I I I have these little quirky things that I do every year like 00:03:06.753-->00:03:12.526 one thing I would recommend that you guys do is I pick two uh publications of any kind that 00:03:12.526-->00:03:16.630 are completely out of my wheelhouse every year and I read them during that year and over 00:03:16.630-->00:03:19.966 time the the the knowledge base that I have tends to grow and the reason I do that is I have a 00:03:19.966-->00:03:21.968 couple of pet peeves and in full disclosure I use the 101 talk to try and dispel or stop some of 00:03:21.968-->00:03:23.970 the pet peeve stuff that I have in the community and I try and do that by raising us all 00:03:23.970-->00:03:28.975 together so here's a couple pet peeves that I have for those of you who've heard this before I 00:03:40.787-->00:03:45.358 apologize but there's a lot of new people here I mean who here has been to a talk of mine 00:03:45.358-->00:03:51.598 before? So not very many, okay. Sorry about how helter skelter it is like I said I'm running on 00:03:51.598-->00:03:55.569 very little sleep right now in fact I promise the opening ceremonies tomorrow will be much 00:03:55.569-->00:04:00.006 more structured we're supposed to be having fun in here this is 101 and originally it wasn't 00:04:00.006-->00:04:04.077 even an official track part of Defcon it was just us hanging out in the highways and some 00:04:04.077-->00:04:09.082 other people put this track together but anyway one of my pet peeves is this idea that um 00:04:12.252-->00:04:16.790 as hackers you have to be creative and in order to be creative you have to think 00:04:16.790-->00:04:21.228 outside the box and how many of you have heard the term think outside the box raise your hand 00:04:21.228-->00:04:25.065 how many of you know what the origin of that term is where does that come from? Besides 00:04:25.065-->00:04:31.338 obvious imposed you have a set of mental heuristics that you're imposing upon this problem and 00:04:31.338-->00:04:36.743 you carry those with you and if some high and mighty guy came down from off the ti- off the 00:04:36.743-->00:04:41.748 mountain top and said thou shalt not impose this particular heuristic then all of a sudden 00:04:43.783-->00:04:49.055 magically you're going to be creative and go ah ha eureka and you're gonna solve the next you 00:04:49.055-->00:04:53.593 know major problem. So there have been studies that have shown that that's total bullshit 00:04:53.593-->00:05:00.033 the uh the original origin of that uh term is from the nine dot problem which is a puzzle 00:05:00.033-->00:05:04.171 where you draw nine dots in a box three three and three and they say connect all the dots 00:05:04.171-->00:05:06.173 without lifting the pen and of course or in some times you'll have the constraint you can't 00:05:06.173-->00:05:09.776 cross the lines some you can just depends on the variant and of course invariably people have 00:05:09.776-->00:05:12.345 imposed this mental box because it's in a square and so it's really really difficult and then 00:05:12.345-->00:05:14.347 some jackass comes up and is all clever and is all oh I go outside what that frame was 00:05:14.347-->00:05:16.349 yadda da yadda da well it's been studied and it's been shown that even if you take a group of 00:05:16.349-->00:05:18.952 people and you tell them from the start you have to draw outside this imposed square that 00:05:18.952-->00:05:22.722 the same percentages of people solve the problem or can't solve the problem and the way you get 00:05:22.722-->00:05:25.659 people to have those epiphanal ah-ha creative moments is through deep study in a 00:05:25.659-->00:05:29.696 particular subject area. Now as we go further and further with technology Google search engine 00:05:29.696-->00:05:36.469 instant gratification phone in your pocket I don't have to go through any of the mental labor 00:05:36.469-->00:05:40.807 to get any of the answers of questions that I have any more we we do certain things faster 00:05:40.807-->00:05:42.809 but we've lost a sense of wisdom in our knowledge and by doing so we're starting to short change 00:05:42.809-->00:05:46.947 ourselves and we're going to start to lose the in the epiphanal genius moments that 00:05:46.947-->00:05:53.653 come from that deep study of the subject area so when I do my cryptographic puzzle challenges 00:05:53.653-->00:05:58.658 I structure them to do three things. I want you guys to talk to each other, I intentionally 00:06:24.451-->00:06:28.655 put things on the lanyard every year so that you have to find other people and you have to 00:06:28.655-->00:06:32.459 interact with them not only that but there's stuff even on the back here you have to take it 00:06:32.459-->00:06:37.297 off you have to linger in front of the other person it forces at least a a time for you to 00:06:37.297-->00:06:43.136 interact with one of those other people and for a crowd that is predominantly introverts you 00:06:43.136-->00:06:49.142 know I'm trying to force you to talk to each other. You know the whole joke about you can tell 00:06:49.142-->00:06:53.713 who the who the uh the extrovert at like the defcon conferences is the guy looking at someone 00:06:53.713-->00:06:58.718 else's shoes [laughter] but anyway so that's that's my soap box for that. During the 101 00:07:02.522-->00:07:07.527 talks I have a tradition also of saying I'm not going to explain and obviously in a forty minute 00:07:09.663-->00:07:13.667 talk or fifty minutes I don't even know how long I'm supposed to be up here but in a talk I'm 00:07:13.667-->00:07:18.672 not going to be able to teach you, thank you, or give you, um deep knowledge in a subject. 00:07:21.007-->00:07:24.744 What I'm hoping to give you are hooks, I'm hoping to give you hooks that give you the right 00:07:24.744-->00:07:29.482 points to start to go down and by the way I mean don't I do not mean to show disrespect to 00:07:29.482-->00:07:33.586 anybody I know a lot of you have deep knowledge in a lot of these subject areas but I kind of 00:07:33.586-->00:07:38.558 shotgun it to try and give people a foundational knowledge of these are the things that I 00:07:38.558-->00:07:42.429 think if you kind of generally know about you can have a well informed conversation with 00:07:42.429-->00:07:49.002 someone at a place like Defcon, cool? We we understand where I'm coming from? Yes, no? You awake? 00:07:49.002-->00:07:55.241 Yeah, I'm tired too. Well what do you think of the badge this year, by the way? [applause] So 00:07:55.241-->00:08:00.180 because this is 101 and don't tell don't tell DT I'm gonna tell you this because I'm not 00:08:05.018-->00:08:07.420 gonna I I don't know if he'll say it in opening ceremonies I don't know if it's a secret or 00:08:07.420-->00:08:11.791 not I'm going to tell you guys because you're at 101 which means you're hard core. There 00:08:11.791-->00:08:17.163 are There were let's just say I can't tell you the quantity but there were thousands of badges 00:08:17.163-->00:08:21.835 that were ordered, how many of you have ever done uh my uh production of electronics of any 00:08:21.835-->00:08:26.973 kind? Okay how many of you understand how long it takes to do not only do pick and place 00:08:26.973-->00:08:31.711 but how long it takes to program firmware onto something? Every single one of the badges that 00:08:31.711-->00:08:36.716 you have around your neck right now were programmed within the space of the last three days. 00:08:38.752-->00:08:43.757 [applause] And that and that's why I say none of this would happen without the community 00:08:47.927-->00:08:53.700 because that wasn't me that wasn't Lost jackass with a programmer that was hundreds and 00:08:53.700-->00:08:58.805 hundreds of volunteers who weren't paid who are people that come to the con that are here 00:08:58.805-->00:09:02.542 early that we run up and down the halls going we have an emergency guess what badges 00:09:02.542-->00:09:08.748 showed up and they weren't programmed before they got to us and so we set up a chop shop and 00:09:08.748-->00:09:14.954 went to town and and and there are people there are people in this room right now who have 00:09:14.954-->00:09:19.959 been awake literally for four days. Some of them are in the front row right here [applause] 00:09:25.765-->00:09:30.770 Okay pet peeve number two. I get really frustrated with people first of all if you don't 00:09:34.174-->00:09:38.645 understand or know something admit it. I don't know lots of stuff. When I talk to people at 00:09:38.645-->00:09:42.749 Defcon there's really really smart people around here, you guys. And when I have 00:09:42.749-->00:09:46.319 conversations with you after I give talks like this people come up and they want to talk about 00:09:46.319-->00:09:49.923 stuff and they'll say something it'll be like oh I didn't know what that is, tell me, explain 00:09:49.923-->00:09:55.795 that to me. Um my grandfather used to talk about Columbo if he if him he uh the younger people 00:09:55.795-->00:10:00.800 in the audience are like who the hell is that, google him. Um so so Columbo is a fictional 00:10:02.836-->00:10:08.041 character who was like the excuse me the ultimate social engineer he used to get everyone 00:10:08.041-->00:10:12.812 he met to teach him something even if he knew it already because it disarmed them. So 00:10:12.812-->00:10:17.817 social engineering tip 101 right there. But I I try and and not have you know when I first came 00:10:20.119-->00:10:23.823 to Defcon it scared the crap it was like these guys are way smart they're gonna say stuff I 00:10:23.823-->00:10:26.793 don't' understand and they're going to think I'm an idiot and they're going to kick me out I 00:10:26.793-->00:10:31.831 didn't know what was gonna go on. And if you can just be confident enough to talk with 00:10:31.831-->00:10:35.535 people be like hey I don't know what that is and on the flip side don't be an arrogant ass 00:10:35.535-->00:10:38.705 but if you know something share it with other people because that's the only way this 00:10:38.705-->00:10:42.976 community is gonna get better. For example how many of you aware with the discussions that 00:10:42.976-->00:10:48.047 are going on with cryptography and back dooring? Yes, no? The politics involved? The what's 00:10:48.047-->00:10:53.286 going on? That's going to fundamentally change communication and with people 00:10:53.286-->00:10:57.156 like us and the folks at the Defcon conference we need to talk about stuff like that 00:10:57.156-->00:11:01.361 because otherwise stuffs gonna go and the genie won't be able to put it back in the bottle 00:11:01.361-->00:11:06.366 after certain events. So I'm not gonna push my politics on you but let's just say we need to 00:11:06.366-->00:11:13.172 share the knowledge and information so that we can all elevate and it's not select so 00:11:13.172-->00:11:19.479 okay I get really tired when I talk to people and they make the statement I know that a computer 00:11:19.479-->00:11:24.484 uses binary I know that a computer speaks binary oh that just like it's like uh cheese 00:11:26.920-->00:11:31.424 grater on my thigh I don't know how else to describe it [laugh] sorry so and I often will ask 00:11:31.424-->00:11:38.231 people do you know what that really means and do you understand that? Now I know 00:11:38.231-->00:11:41.801 there's a lot of people in this audience who are like all I do is code I don't give a shit how 00:11:41.801-->00:11:47.240 the processor works, I hate that attitude how can you think like that remember the discussion we 00:11:47.240-->00:11:51.411 just had about creative epiphanal moments a lot of times those epiphanal moments become 00:11:51.411-->00:11:56.082 from tangential information that may be related to the subject but not directly involved 00:11:56.082-->00:11:59.953 because if it was directly involved some jackass would have already thought of it. How many 00:11:59.953-->00:12:04.757 of you know about the original bell labs or heard of it? And if you haven't especially young 00:12:04.757-->00:12:08.695 folks go look it up because it's like my dream mecca like if I could go anywhere in a time 00:12:08.695-->00:12:12.865 machine I would go back in time to the original bell labs the reason the original bell labs by 00:12:12.865-->00:12:16.502 the way you have C because of the original bell labs you have a lot of things that you use in 00:12:16.502-->00:12:20.740 your daily life because of the original bell labs what it was was a collection of experts in 00:12:20.740-->00:12:24.577 different areas but they weren't stove piped it wasn't like here's the math department 00:12:24.577-->00:12:28.514 here's the physics department here are the electronic guys they were like the chemist was 00:12:28.514-->00:12:32.151 next door to the chemist guy who was next door to the computer guy who was next door to the 00:12:32.151-->00:12:34.554 mathematician next door to the linguist and they all had access to each other and that's what 00:12:34.554-->00:12:38.758 caused this this genesis of all of this great creativity and we've started losing that 00:12:38.758-->00:12:43.830 because everybody wants to keep everything secret they don't want to share and and so we lose 00:12:43.830-->00:12:48.801 those epiphanal interconnections so back to the I know how a processor works. If you come to 00:12:48.801-->00:12:53.239 me and say uh Ryan you you wasted my time at Defcon because I don't care how a processor 00:12:53.239-->00:12:57.910 works I just want to code I would say to you you do not have the mindset of a hacker and I 00:12:57.910-->00:13:02.849 don't want to talk to you so [applause] I mean like I go back to that comment I said about 00:13:09.389-->00:13:13.426 subscribing to magazines I subscribed to like a sewing magazine for a year you know 00:13:13.426-->00:13:18.798 just and I actually learned really cool stuff so here's one of the experiments we're gonna 00:13:18.798-->00:13:22.101 do today and you guys are all coming along with me on this ride because this one's gonna be 00:13:22.101-->00:13:26.139 fun. So uh can I have a couple of you or however many you want I know you all got cell phones 00:13:26.139-->00:13:32.545 in your pockets that have timers on them like the stopwatch because I'm not going to lie I 00:13:32.545-->00:13:37.250 did not practice this part because I was like let's balls to the wall let's go let's see 00:13:37.250-->00:13:42.388 if we can do this. Pull out your phone so in a second we're gonna synchronize and we're gonna 00:13:42.388-->00:13:47.393 start and I'm going to try in ten minutes to talk through going from the three basic 00:13:49.896-->00:13:55.802 fundamental logic gates to a functioning processor in ten minutes how many of you have had 00:13:55.802-->00:14:00.073 digital logic uh in- uh classes and things like that? How many of you could sit down and 00:14:00.073-->00:14:06.879 actually describe that process to somebody? How many of you kinda remember? Okay how many of 00:14:06.879-->00:14:11.584 you are students right now? Everybody should raise their hand by the way it's a trick 00:14:11.584-->00:14:16.589 question [laughter] okay so are you ready? 'Cause I need to drink some water and we're gonna 00:14:19.592-->00:14:23.629 go and the reason I'm only doing it in ten minutes in that way if you guys if this is a total 00:14:23.629-->00:14:29.502 failure we only wasted ten minutes and you can kind of you can kind of forgive me for that. 00:14:29.502-->00:14:35.074 So what this is not this is not me teaching you all of this information this is me running 00:14:35.074-->00:14:39.479 through the forest wildly like my hair is on fire screaming out the things that you should 00:14:39.479-->00:14:44.150 google or lookup that you would then be able to have the knowledge of what these things 00:14:44.150-->00:14:48.755 are. And if one or two things sounds interesting to you hook on to that and go down that path 00:14:48.755-->00:14:53.192 so again 101 talks nobody's going to be able to give you the deep dive in a forty minute 00:14:53.192-->00:14:59.966 talk. Are you ready? Okay so at like three minutes or somebody somebody be like hold your 00:14:59.966-->00:15:03.269 finger like three don't do it like I guess you could do it every minute like one two 00:15:03.269-->00:15:07.940 because I kinda got a feel for how we have to do this and I have to talk really fast so here 00:15:07.940-->00:15:12.945 we go How to build a processor in ten minutes and no pressure is a total failure alright ready 00:15:19.552-->00:15:25.992 set start your things Okay so we got this guy his name is George Boole he's cool he comes up with 00:15:25.992-->00:15:30.463 this type of logic um where he talks about these three fundamental logic gates um and 00:15:30.463-->00:15:36.335 or and not how many of you have heard of that raise your hand yes we all heard of it okay so 00:15:36.335-->00:15:41.941 if I take a piece of wire okay and I cut it here and here I have just created a logic gate 00:15:41.941-->00:15:46.078 it's called and why because if I connect the wire here but not here the electricity doesn't 00:15:46.078-->00:15:49.715 flow if I connect it here and not here electricity doesn't flow if i have two cuts and I 00:15:49.715-->00:15:54.487 put them both down this and this electricity flows through it so I can make an and gate with a 00:15:54.487-->00:16:01.160 wire so we have the first fundamental logic gate Or I can take the same wire and I can run 00:16:01.160-->00:16:05.364 it in parallel and I can cut one or cut the other and if I connect one of them electricity 00:16:05.364-->00:16:11.504 is still gonna flow so if the top one or the bottom one go we'll have electricity or Not 00:16:11.504-->00:16:18.477 [laughter] not okay can't laugh you're gonna take my time [laugh] not is gonna basically 00:16:18.477-->00:16:22.315 invert the signal we won't talk about how we do that let's just say you can do it in electronics 00:16:22.315-->00:16:27.954 if you're interested in that think about that how does that happen, google it The first 00:16:27.954-->00:16:31.657 fundamental piece I'm gonna build so we have three fundamental building blocks we 00:16:31.657-->00:16:37.063 have and or and we have not and I claim that if you connect them in this particular configuration 00:16:37.063-->00:16:41.234 I will have this thing that I'm going to call an adder but this is a half adder because there is 00:16:41.234-->00:16:47.206 not a thing which people call a carry in this takes two bits of information one and two and if 00:16:47.206-->00:16:52.879 they are both one out the ass in comes a zero and a one which is a carry if that doesn't make 00:16:52.879-->00:16:58.317 sense to you google it look up half adder it's on wikipedia the important point to take away is 00:16:58.317-->00:17:04.257 two bits of information in one bit of information out and a carry bit out so two in two out 00:17:04.257-->00:17:09.262 boom So we got to count how do I make a counter? Trick question ha I'm burning the time just to 00:17:12.064-->00:17:17.870 make you nervous [laugh] so we're gonna take we're gonna take that half adder and I'm 00:17:17.870-->00:17:21.674 gonna shove it inside a box and this is called abstraction we do this a lot we do it in 00:17:21.674-->00:17:25.144 everything we do every one of those O P programming and all these other things. I need to 00:17:25.144-->00:17:28.748 take circuits shove it into a box because we're going to grow complexly so everybody's 00:17:28.748-->00:17:32.251 comfortable with that that box represents the two things coming in one thing coming out with the 00:17:32.251-->00:17:37.290 CRY yes, go Incrementally better I'm gonna stack these things I'm going to take one I'm going to 00:17:37.290-->00:17:42.028 put it on top of the other now I claim I can have two bits of information coming in and two 00:17:42.028-->00:17:46.632 bits of information coming out with the carry, everybody cool? If you don't understand that 00:17:46.632-->00:17:53.606 look up half outer and stacking. So that brings us to an important point I said two bits 00:17:53.606-->00:17:58.010 in two bits out so we have to use this thing we call hex to represent the numbers if you're 00:17:58.010-->00:18:02.648 not familiar with why we use hex I would challenge you to take a bunch of switches from Home 00:18:02.648-->00:18:07.587 Depot home with you tonight and take the first switch and sit and look at it and say how many 00:18:07.587-->00:18:11.924 things can I represent with a single switch, on and off, two binary that's why a computer 00:18:11.924-->00:18:18.064 uses binary but I just said we use hex not binary why is that because on standard systems when 00:18:18.064-->00:18:22.134 we first started didn't make sense you can't do a whole lot with a single bit so we added a 00:18:22.134-->00:18:26.973 bunch of bits together the basic standard bit so if I take one switch I get two things if I 00:18:26.973-->00:18:32.244 take two switches I get how many things? Four If I take three switches I get how many? And if 00:18:32.244-->00:18:38.751 I take four switches? Sixteen so we need at least four to represent decimal which is our 00:18:38.751-->00:18:43.856 natural tendency to count because we got ten of these things right? So we have to go 00:18:43.856-->00:18:49.261 up to four bits but if we only go to ten but we use four bits we wasted some because you just 00:18:49.261-->00:18:53.099 told me we could go up to sixteen we don't want to waste those we want to be efficient so 00:18:53.099-->00:18:57.269 we use a different representation or number base also called a radix look it up 00:18:57.269-->00:19:02.241 and that number base is basic 16 also called hex by the way on a side note there is a numbered 00:19:02.241-->00:19:07.146 number base or radix called heximole which is base six which is what I believe a pirate would 00:19:07.146-->00:19:12.151 count in because he has five fingers and a hook [laughter] So a bit negative okay you just 00:19:16.922-->00:19:20.626 told me the computer only has one zero inside how do I deal with negative numbers shit I 00:19:20.626-->00:19:26.265 don't know how to have a minus sign oh shit we're at four minutes let's go so I need to 00:19:26.265-->00:19:31.037 have a clever tricky way of reassigning what numbers mean in binary so that I can have 00:19:31.037-->00:19:35.041 negative there's this cool thing called one's complement well that kinda sucks because things 00:19:35.041-->00:19:40.312 didn't line up right look up one's complement then look up two's complement because we said 00:19:40.312-->00:19:44.650 I can take one's complement and I can fix it so that we can do this cool thing by having 00:19:44.650-->00:19:48.087 negative numbers that cancel each other out when we add them together and that's where two's 00:19:48.087-->00:19:51.857 complement comes from and I claim that this circuit here will give you two's complement 00:19:51.857-->00:19:56.929 representation of the number, look it up. There's these things called SOP and POS everybody 00:19:56.929-->00:20:02.935 hates in class so we're gonna skip it [laughter] Get off your half adder I claim that's a half 00:20:02.935-->00:20:06.739 adder because we didn't have a carry in so we wanna fix that I would claim that the logic of a 00:20:06.739-->00:20:11.744 carry is a and b added together if A and B are both one then I am going to get a carry. Full 00:20:14.513-->00:20:19.085 adder is what I get from that we're gonna shove that into a box because we're gonna abstract 00:20:19.085-->00:20:24.123 and go further because how many how much time do we have left five minutes Fully stacked now 00:20:24.123-->00:20:27.960 I'm going to take my full adders I'm going to stack them together this is representation of a two 00:20:27.960-->00:20:32.331 bit I would leave it as an exercise to the reader to extend it to four bit so we can get our 00:20:32.331-->00:20:37.336 four bit microprocessor guess what it looks exactly the same just keeps stacking So full if 00:20:40.072-->00:20:45.845 you have four full adders in a box and put em together you get what is known as a four bit 00:20:45.845-->00:20:49.648 adder you have a carry in you have a four bit number on the top four bit number on the 00:20:49.648-->00:20:53.953 bottom and out the other end comes the answer plus the carry so let's go would I steer you 00:20:53.953-->00:20:59.458 wrong okay we can now represent numbers kind of inside but I gotta steer stuff around inside 00:20:59.458-->00:21:03.596 the processor so how am I going to do that I have to have a way of steering stuff around we have 00:21:03.596-->00:21:08.601 these things we call mux many come in one comes out I have a way to choose it so this is kind 00:21:08.601-->00:21:12.838 of like a traffic cop inside I also have to have the opposite I have to have one come in and I 00:21:12.838-->00:21:16.909 can drive him to other places with these two things called a mux and a demux I can steer 00:21:16.909-->00:21:20.579 anything anywhere I want it to go inside the processor, cool? If you don't understand it, 00:21:20.579-->00:21:26.252 Google it. Stack the deck if I take two muxes and put them together I am building six 00:21:26.252-->00:21:30.956 minute okay we gotta go stack the decks two muxes put together out the other end I can control 00:21:30.956-->00:21:34.360 where data goes ya'll get the point we're controlling a flow of information inside the 00:21:34.360-->00:21:37.463 processor by the way why does this matter because we're eventually gonna get to 00:21:37.463-->00:21:41.167 registers and those matter when you start doing code and you start programming in assembly 00:21:41.167-->00:21:45.004 which you're gonna do if you're gonna write shelf code so shut up if you don't want to hear 00:21:45.004-->00:21:49.909 this [laugh] just kidding So logic inside the processor in order to not just be a 00:21:49.909-->00:21:54.046 calculator we have to have logic right? We have to be able to do logical functions on the data we 00:21:54.046-->00:21:58.951 put in or we have to be able to do arithmetic so we have this thing called ALU that's from the 00:21:58.951-->00:22:03.889 TV show V, ALU looks like a V if you look at it those of you who get the joke if not google it so 00:22:07.760-->00:22:12.598 you take all of this stuff you shove it in the ones complement the twos complement you put it 00:22:12.598-->00:22:18.304 in and we are going to create this thing we call a NEG NOT circuit a NEG NOT circuit says I 00:22:18.304-->00:22:22.408 have data coming in and coming out and with those two control lines down there I can either 00:22:22.408-->00:22:27.479 choose to negate it or get the not of it so I have the ability to do a function so ooh let's go 00:22:27.479-->00:22:32.284 and or with no pass through information comes in comes out at the ass end with the control 00:22:32.284-->00:22:36.722 here this is all abstraction that we just built up to I can take data in as it comes out I 00:22:36.722-->00:22:41.727 can choose to do an add or or it so I have math and logic in that place so this is with a pass all 00:22:44.096-->00:22:48.067 I did was stick a mux on the end which we talked about before I want the data to either be 00:22:48.067-->00:22:52.037 processed on or not processed on that's what the mux is for that's what the pass line is for 00:22:52.037-->00:22:58.244 let's go So I stick all that in a box I get the and or chip ALU there it is in all of it's glory 00:22:58.244-->00:23:02.248 that is basically in essence what you have inside your processor at home. Now there's 00:23:02.248-->00:23:05.584 been a delay there's this cool thing called propagation delay which we now don't have time to 00:23:05.584-->00:23:10.289 talk about because we're in a hurry so look it up basically it says data takes a matter of time 00:23:10.289-->00:23:15.995 to go through all this crap and come out the ass end Now what we have the ALU I need to be able 00:23:15.995-->00:23:20.099 to to produce input and store it and then I'll have my fully functioning computer so I have 00:23:20.099-->00:23:23.769 to have these things called decoders but guess what that's exactly the same thing as demux 00:23:23.769-->00:23:28.374 well shit why didn't you just call it that in the first place [laughter] so I can decode my 00:23:28.374-->00:23:33.712 decoders and decode the decoders of the coders in which case I can grow the address space and I 00:23:33.712-->00:23:37.383 can go from four bits to eight bits sixteen bits etcetera basically this is just stacking 00:23:37.383-->00:23:41.587 the coders so I have flip flops flip flops are really cool things that are latches inside 00:23:41.587-->00:23:45.624 that hold information so I can now have not just a state machine but I can hold stuff 00:23:45.624-->00:23:49.662 over time. Pick your logic combinational or sequential we're gonna talk about 00:23:49.662-->00:23:52.798 sequential cause that's what computers are because we have to have memory so we're not just 00:23:52.798-->00:23:56.869 based on the here and now or the state So then we build these things called registers which 00:23:56.869-->00:24:00.939 are a flip flop with the shit coming in so we have the thing that can hold information those 00:24:00.939-->00:24:05.411 registers are what you see when you open up like IDa Pro and you see register whatever that's 00:24:05.411-->00:24:09.948 what this is. Take a step back general structure we're going to get to this really quickly, how 00:24:09.948-->00:24:14.086 much time? >>one minute >>Oh shit, brains this is the brain that's microprocessor you got 00:24:14.086-->00:24:17.456 the ALU you got your memory which we just assigned control coming in you notice that 00:24:17.456-->00:24:20.959 control has nothing there shit this is a brainless microprocessor so we need a 00:24:20.959-->00:24:25.664 brain one so how do I do that? I take that I've got buffers on the side that's the data or the 00:24:25.664-->00:24:30.202 program I've got a thing called the decoder which takes my instructions but I don't know 00:24:30.202-->00:24:37.076 how to control it see all those switches in the middle so I need a thing called a ram we need to 00:24:37.076-->00:24:40.479 go from the one on the top where the control lines are blank to the one on the bottom and we'll 00:24:40.479-->00:24:45.117 have everything done PC address generation PC it's called or program counter we have to be 00:24:45.117-->00:24:48.854 able to step through the steps in our program we saw we could do an incrementor from an adder 00:24:48.854-->00:24:53.926 so we got that piece we got the mux we have the thing called the rom which basically defines all 00:24:53.926-->00:24:58.430 of the control signals for what I want this thing to actually do I put them all together and 00:24:58.430-->00:25:03.369 that's your full processor [applause] Did I, Did I make it? Did I make it? What time? 00:25:20.486-->00:25:25.491 >>five, four, three, two, one [applause] >>So that's ten minutes of your life you won't 00:25:33.532-->00:25:38.537 get back [laughter] How many of you guys are in college? How many of you have taken digital 00:25:41.106-->00:25:45.611 logic? Why don't you go to your processor er your professor I want you to manage your money 00:25:45.611-->00:25:50.616 back [laughter] say I got this in ten minutes where's the cliff notes? So not a joke little bit 00:25:55.721-->00:26:00.459 of feedback here because I prefer to talk to you guys um I hope I gave you some hooks of 00:26:00.459-->00:26:04.663 maybe some things to look up about basically how a computer works because a lot of people 00:26:04.663-->00:26:10.502 don't understand that and everything's abstraction we went from pounding rocks and starting 00:26:10.502-->00:26:17.075 fires to a playstation shit how does that happen? Do you think you're average person can tell 00:26:17.075-->00:26:19.945 me how the insides of a playstation works no no no and that's the whole point of 00:26:19.945-->00:26:24.683 abstraction is I'm going to build up the pieces but I would argue as hackers having these 00:26:24.683-->00:26:29.221 fundamental basic knowledge points are what is going to cause epiphanal stuff. I will 00:26:29.221-->00:26:33.792 argue with anyone right now everyone will say oh there's no longer a need to program in 00:26:33.792-->00:26:39.731 assembly mkay I'll have the argument with you. Or I'll have an edify discussion with you 00:26:39.731-->00:26:42.968 where you'll teach me stuff that I don't know and I'll change my mind because that's the other 00:26:42.968-->00:26:45.938 thing that people in this community need to be willing to do you need to be able to change 00:26:45.938-->00:26:50.075 your mind if somebody explains something to you that makes more sense. And I think there's too 00:26:50.075-->00:26:55.080 many people that get fixated on their uh their ideas. So excuse me I'm gonna take one more drink 00:26:59.785-->00:27:04.723 of water because that really took it out of me. I want everybody in this audience right 00:27:08.827-->00:27:13.198 now to find one person next to them that's not somebody they know and introduce yourself in 00:27:13.198-->00:27:18.203 the next 30 seconds [inaudible audience conversations] Okay okay okay okay wow is that 00:27:31.550-->00:27:36.555 longer than 30 seconds? I lost control. Alright let's focus focus focus focus [inaudible 00:27:57.342-->00:28:02.281 conversations continue] Oh okay okay okay okay bring it back in people bring it in come on come 00:28:23.068-->00:28:28.073 on come on come on hello hello hello hello hi alright thank you okay well that what just 00:28:46.024-->00:28:50.128 happened just then is fucking awesome because that's what Defcon is for me is the people 00:28:50.128-->00:28:54.666 and the interaction okay those of you came here thinking I'm gonna sit with my laptop unless 00:28:54.666-->00:29:00.205 you're doing CTF or you're doing my challenge but this is the best part about my challenge CTF 00:29:00.205-->00:29:03.609 you know they're going to sit in isolation with your team with your head down and your laptop 00:29:03.609-->00:29:06.612 and you're not going to talk to anyone. You're going to do my challenge you're going to talk 00:29:06.612-->00:29:08.680 to other people because you don't have a choice so it's all about the people for me. By the 00:29:08.680-->00:29:13.418 way I I just morbid curiosity how did the uh teleprompter people do with that that 00:29:13.418-->00:29:18.423 monstrosity we just went through? [applause] Awesome awesome so how did they deal 00:29:22.761-->00:29:27.766 with uh foreign language did we see >>Lost my friend >>Yes >>first time speaker >>I'm not a 00:29:30.002-->00:29:35.007 first time speaker >>[inaudible question] >>I I don't I don't drink but thank you, I will I 00:29:40.679-->00:29:45.684 will, thank you very much [laughter] thank you so that's a perfect example yes we have fun 00:29:53.859-->00:29:58.864 at Defcon, I encourage you to challenge the speakers if someone is saying something here 00:30:03.035-->00:30:07.239 that you think is bullshit go up and talk to them okay? Challenge people that's what we're here 00:30:07.239-->00:30:10.342 for I want people to challenge me I want you to come up to me and be like dude I thought that 00:30:10.342-->00:30:15.347 was crap or whatever that's how I get better, so yeah, so I will uh prepare you for 101 if you go 00:30:21.553-->00:30:26.258 or not 101 uh opening ceremony is tomorrow so like I said usually Thursday was our fun day 00:30:26.258-->00:30:29.995 where we were just kind of joking around but it's kind of evolved into another official 00:30:29.995-->00:30:33.699 day of Defcon, Defcon didn't used to be Thursday Friday Saturday Sunday used to be 00:30:33.699-->00:30:39.337 Friday Saturday Sunday so this is uh this isn't technically Defcon because we haven't 00:30:39.337-->00:30:45.444 officially opened the conference yet but I think that's crap so >>Yes it is, 101 is official, 00:30:45.444-->00:30:50.449 yeah! >>It is now, it is now, but it wasn't >>it is now that you're here [laughter] >>So so 00:30:52.484-->00:30:57.089 after this talk by the way there will be a 101 panel where we're going to interact with you guys 00:30:57.089-->00:31:01.426 more and talk with you more and then tomorrow opening ceremonies I will talk more specifically 00:31:01.426-->00:31:06.298 about the badge and some of the production and some of the problems we had and some of the 00:31:06.298-->00:31:11.036 craziness in the program but I kinda like to give a reward to the folks that make the effort 00:31:11.036-->00:31:17.008 of coming to the 101 stuff and talk just a slightly about uh some of the challenge stuff that 00:31:17.008-->00:31:20.479 may give you a little bit of a leg up if you're competing with other people. How many people in 00:31:20.479-->00:31:24.750 this room are actually working on some aspect of the puzzle right now? Or have? Or have 00:31:24.750-->00:31:29.755 thought about it? Okay um it I hope it's kind of fun um it's a little bit painful at times so 00:31:32.357-->00:31:37.796 let's talk a little bit about the uh the math that you see in the program if you look in the 00:31:37.796-->00:31:42.801 program on the second page where my ugly mug is at um there's a there's some equations there. 00:31:48.206-->00:31:54.913 Everybody see those? Everybody see that? The math that's there? How many of you liked in there 00:31:54.913-->00:31:59.918 and you were like hell no I didn't come to Defcon to freaking do math. Hell no! How 00:32:02.053-->00:32:06.792 many of you are familiar with a website called Wolfram Alpha? Yeah. How many of you tried to 00:32:06.792-->00:32:12.130 put that equation into wolfram alpha and how many of you got with what the fuck am I looking 00:32:12.130-->00:32:16.868 at? [laughter] Now second thing that was designed to stump you guys and see what I'm doing is 00:32:16.868-->00:32:20.572 I'm talking about an aspect of the challenge that hopefully will give you a hook or piece of 00:32:20.572-->00:32:23.742 information you might not have already known if you did you're really freaking smart come talk 00:32:23.742-->00:32:28.747 to me because I want to know you. Um there is a there is a way of representing equations in 00:32:31.249-->00:32:35.287 uh basically in a in the line of text because you're like how the hell do I put an integral symbol 00:32:35.287-->00:32:39.324 in how do we do that stuff? There is a thing you can look up called a reverse polish notation 00:32:39.324-->00:32:45.397 and it sounds like you're being like racist but it's it's not it's really called RPN for short 00:32:45.397-->00:32:51.670 reverse polish notation and it's the way those of us who are old like me used to put data into a 00:32:51.670-->00:32:56.675 a a com- holy crap I just realized I just realized no but I just realized you you are like 00:32:58.910-->00:33:04.983 a foot taller than last year >>woo! >>Stand up for a second, those of you who don't know this 00:33:04.983-->00:33:09.554 young man right here this is one of the smartest kids I've ever met he came to Defcon what two 00:33:09.554-->00:33:16.094 years ago is your first one? Four? He was like this tall his dad brings him and he br he 00:33:16.094-->00:33:20.498 brings his dad I think and this is why I love Defcon this kind of stuff he was correcting 00:33:20.498-->00:33:26.471 speakers he was correcting like Joe Grand and me and stuff like that introduce yourself to this 00:33:26.471-->00:33:30.609 kid because he's going to go places uh those of you who have like these track programs for 00:33:30.609-->00:33:34.312 hiring people like when they're young this is a kid you guys need to meet his name's Skylar 00:33:34.312-->00:33:39.317 anyway by the way, say hi [applause] So >>that is one of the best parts of con was the 00:33:41.920-->00:33:46.925 look on Joe Grands face when he corrected him [laughter] >>Okay so I did I did a puzzle badge 00:33:49.928-->00:33:54.366 for a conference called the gathering for gardner how many of you know who Martin Gardner 00:33:54.366-->00:34:00.872 is he is the father of what we call recreational mathematics and he's also like the champ he 00:34:00.872-->00:34:05.410 used to write for scientific american doing like puzzle stuff and most of you who've done 00:34:05.410-->00:34:11.483 puzzley type stuff like in the newspaper or in magazines he probably influenced that somehow 00:34:11.483-->00:34:17.355 he's a pioneer I I I've got much respect to Martin who is no longer with us um at that 00:34:17.355-->00:34:21.760 conference basically I found we had two camps of people we had mathematicians and we had 00:34:21.760-->00:34:26.998 professional magicians which is a really interesting mix and I met this guy he comes up to me 00:34:26.998-->00:34:32.003 and was introduced himself and apparently uh how many of you know what XKCD is? Yeah So XKCD 00:34:34.306-->00:34:40.745 had written a comic strip about the tool that this guy wrote and he came up to me and he he had 00:34:40.745-->00:34:44.582 heard that I was like this puzzle guy and I do all this puzzle stuff and he goes I I 00:34:44.582-->00:34:50.021 made this thing and it got a lot of press because XKCD featured it and I was in like his website 00:34:50.021-->00:34:54.225 got all this kind and he goes but nobody uses it I said you know what I'm going to use it 00:34:54.225-->00:34:58.330 I'm going to use it at Defcon and I'm going to give you credit for it and I'm going to make 00:34:58.330-->00:35:03.868 sure people drive so there is a tool and I have a challenge for people at this conference find 00:35:03.868-->00:35:08.873 the XKCD comic the tool and the name of the author before the end of Defcon and come to the 00:35:11.042-->00:35:15.880 1057 room and tell that information to me and I will have something for you. So that 00:35:15.880-->00:35:19.618 is me giving kind of like a mini challenge to the folks who don't want to get hard core into the 00:35:19.618-->00:35:26.358 competition it shouldn't take you very much time with Google to to find but in his algorithm 00:35:26.358-->00:35:32.831 he is able to put in a number and generate functions and equations that produce that 00:35:32.831-->00:35:37.869 number now you're saying to yourself oh this is passe this is easy I have lots of 00:35:37.869-->00:35:42.574 processing power now I will just do an exhaustive search bullshit for any of you who understand 00:35:42.574-->00:35:47.712 how complexity grows that is not what this guy is doing and this algorithm is brilliant and I 00:35:47.712-->00:35:52.751 bring it up for a reason because I'm convinced that someone out here is in hearing what I'm 00:35:52.751-->00:35:56.955 saying right now is gonna look at that and is gonna get inspired in a way to use that 00:35:56.955-->00:36:01.659 algorithm because I have an intuitive feel that that particular algorithm is 00:36:01.659-->00:36:06.164 applicable to some other aspects of what we do as hackers that I haven't quite put my thumb on 00:36:06.164-->00:36:11.436 yet and if one of you finds it just give me a nod or something I don't care but I really 00:36:11.436-->00:36:15.306 believe somebody out there is working on a problem or working on an exploit or working on 00:36:15.306-->00:36:21.479 something in security that this particular uh algorithm would be useful for I don't know what it 00:36:21.479-->00:36:26.251 is but I'm throwing that challenge out there and you remember I said this and it's 00:36:26.251-->00:36:30.755 being recorded so when some guy wins the nobel prize or does something amazing I can be like 00:36:30.755-->00:36:35.760 I helped make that happen and that's what this is really all about okay I am about dead on my 00:36:37.896-->00:36:43.701 feet this is what I had for you guys for 101 I want to know if you guys have any questions for 00:36:43.701-->00:36:50.008 me because I prefer to talk you guys are new to Defcon ask me anything you want like hey I'm 00:36:50.008-->00:36:55.013 new to Defcon yeah, what type of IC on the is on he's asking what type of chips on the badge who 00:36:57.816-->00:37:02.754 knows? What is it? It's an intel quark d2000 what does that mean it means its x86 compatible 00:37:08.293-->00:37:13.298 ooooh yeah any other questions before I fall over and we set up for the panel no? No qu- really? 00:37:17.168-->00:37:20.271 no questions and I'm giving you carte blanche like why do you wear those shoes why are you 00:37:20.271-->00:37:25.276 wearing rod serling on your shirt yeah? Yell it! [inaudible question] You mean like this? Oh 00:37:31.850-->00:37:37.789 the lanyards so so I have a question for you why would I make different lanyards and then 00:37:37.789-->00:37:42.794 just give it all out in picture oh meet space DDOS this is meet space oh after the after the 00:37:45.964-->00:37:50.468 fact so generally people that compete in my competition tend to write up descriptions of what 00:37:50.468-->00:37:55.373 they had to do to solve the problems and I guarantee somebody will have done that so 00:37:55.373-->00:38:00.311 it this is confession sorry guys I usually count on them doing that so I don't have to 00:38:05.183-->00:38:10.121 [laughter] I really wanna thank you guys for coming out I hope you yeah yeah go [inaudible 00:38:10.121-->00:38:17.128 question] Okay so I'll save it for the panel alright I'll save it for the panel, thank you guys 00:38:17.128-->00:38:19.197 for coming. Oh and these are awesome Gunnar glasses that I love so thank you guys for 00:38:19.197-->00:38:21.199 coming [applause]