Hey, so welcome to the 27th DEF CON. Are we that old? I don't feel old. We're really old. People ask me why I'm so young. It's just like I suck the blood out of young IT interns. I have my own little blood boy. Okay, so what we're going to do is talk a little bit, like we already saw a show of hands how many of you are new. I just kind of want to reiterate a couple of basic points. One is we question everything. And if you hear something or see something you don't understand, ask a question. That's the whole point of DEF CON is that I want you, us to learn, drink, meet friends, break shit, like it's an experience that I didn't fully appreciate until maybe two or three years ago I was talking to a friend. He's like oh I'm not sending my team to Black Hat, I'm sending them to DEF CON, so that's really interesting, why would you, what's the difference? And he's like well my team is really sophisticated, you know their experience, and so I would send somebody maybe to get specific training on specific technology to get like a little bit smarter, like sharpen the edge of the knife a little bit more. But then I send people to DEF CON to learn, to become better thinkers. And I was like whoa! Like I hadn't thought about that. But I was like I'm going to be a better of that. And so once you start realizing that's how other people see us it's like well that's the place I go to send people to learn. It's like well okay what are they learning and it's like that sort of crept into the theme for this year which is unofficially you know keep Infosec out of hacking. Because I think Infosec is great at getting you jobs. You got to get paid. But getting paid and having the skills to get paid are different than the joy of exploration. The joy of discovery. Spontaneously you know learning something challenging something. Failing. Being okay to fail. Not being afraid to fail. And to do it in a friendly environment. And challenge each other. And I think maybe that's different. Like if your job is online in Infosec maybe you are afraid to fail. Well it's also yeah like just because you're in Infosec doesn't necessarily make you a hacker. And just because you're a hacker doesn't necessarily mean you're an Infosec. Right? Because the hacker world is so much more than that. And I didn't know that. I didn't know that. I didn't know that either. I didn't realize. I didn't really think about that either until like a few years ago. Where it really is kind of started from that same nugget you know of people. But it's not like that now. And DEF CON has a feeling that other places just don't have. Right. Yeah. And so we're really trying to embrace that. So over the last few years we're using like well is it hacker enough? It's like sort of like if you're watching Metapocalypse. You know it's like ooh that's metal. It's like ooh is that is that hacker? Or not hacker? Could be cool. But that doesn't necessarily mean we will put it here. That would go great. Yeah. Yeah. Yeah. Yeah. Yeah. Somewhere else. More cowbell. Is it cow is it hacker cowbell enough? So two years ago if you remember we tried an experiment. We went to China for the first time. We took DEF CON outside the United States for the first time ever. And it was really an experiment to see one does DEF CON travel? Like are our beliefs or our skills transferable? And it turned out to be hugely popular. In the first year we were the largest kind of security event in China for hacking. And I just told this funny story which was when we were first going to China it was well um how much money should we charge for the conference? And like well nobody's ever charged money for a conference. It's all like as a marketing expense. It's all free. I'm like okay. Um should we do it on the weekend to attract students? Um or maybe on the weekday for companies. You know people. Like who who's going to come? Like hmm. Nobody's ever done a conference on the weekend before. I go right. Um no okay now t-shirts. We want to sell t-shirts. How much do t-shirts normally sell for? Oh. Nobody's ever sold t-shirts before. We're like okay. You know we're just going to go in there and see what happens. And so we had our uh our second uh DEF CON China. And at the time I was really trying to do something special. So I contacted Kingpin. Has like. I don't know if you've heard of Kingpin. Kingpin is like a kind of trying to hypnotize him and get him to come back and make some badges and do something cool. And and Joe you're you're like well it has to be something cool. Well you're also a hard guy to say no to. He was very convincing. But it had to be something cool and new and different because that's what DEF CON is about. Well so for those of you not around back then. You know when we had the idea of a hardware badge. We went to Joe. Joe made the first badge life badge. I mean that was Joe. And so he's gotten to see his little nugget. He's gotten to see his little nugget explode. And so it's a little bit of like well now you're coming back. You you don't want to just do the same thing over again. Right. Well it's overwhelming too. Because you know the the resources have gotten better. So many people are creating this amazing artwork and badge life community and all of this stuff. So when I came back into it I was like how how can I even compete with what has happened over nine years. You know since DEF CON 18. And there was a lot of worry at first. And then I was just like well I'll just kind of do what I do. And not try to compete. Just do my style like I've always done. And and hope people like it. And. Well and it worked. And the original story I don't know if this really came out. But the original story why we did that hardware badge back then is I didn't see in the community at Black Hat or DEF CON I didn't see a lot of hardware hacking skills. There was like Kingpin and a couple people. But it the skills were very limited in a few people. And I always remember thinking that if I was going to have to take over the world or overthrow the government or whatever defend myself against the robots. We need more hardware hacking skills. And so this was a secret back door attempt to get the community more involved in hardware. And now it's. It worked. It worked yeah. I mean we didn't know right. It was sort of like are people even going to they're going to get this thing and even know what to do with it. Or what's the response going to be. But dark tangent like he just had this. I mean you this happens a lot. Like you sort of knew what where the direction of things were going or like what people wanted. And it turned out okay. And the conference was much smaller then. But then it's just sort of ramped up. Yeah. Yeah. So um so when I did attract uh Joe to come and do the badges for China. Like we wanted to do something new. And so you want to just talk briefly about the the. Yeah well I might as well here I'll just throw up the slide I have of kind of the history of stuff that I've done. And the China one is the lower right. Um which is a flexible circuit board. And uh with some artwork on the front sort of representing a a tree. Uh and the thought there was to build community sort of like you're planting a tree. So you do different tasks at DEF CON. Um and then you're building a community. And the root LEDs will uh turn on depending on what task you do. Which is very similar to this badge uh as you'll see. Um and it has a very easy development environment so you can write some code for it. But it was something to build community and to see DEF CON China especially as this new kind of culture of hackers uh kind of take that. And we had to explain to them what is an electronic badge. Like what's the purpose of even doing it. Um was pretty amazing. And that actually some of the response from DEF CON China is what um kind of inspired me to make the US badge as it is. And so uh yeah and so it was like we said it was flexible. And I think at the time you were saying there's like two or there's only a handful of manufacturers. Yeah there's not many and it's costly and usually you see small pieces that are you know for inside of a printer moving back and forth or something. And we were like well can we do something that's you know paper thin that has electronics on it. That the electronics aren't going to pop off when you bend it. Uh but it was just something you know something new. Well actually see the badge is white. The paint alone on the badge. Yeah. Yeah. Added to the. It added it gave it a little bit more thickness so it wouldn't it wouldn't kind of break around. And then you know you can see the other ones like they're definitely not as complicated as a lot of the the badge life badges. Back when we started the resources for even designing circuit boards and then getting them fabricated was a whole other story. You can always watch those talks. I think they're all on the DEF CON media server. Uh but little by little we always tried new techniques. Always tried new fabrication techniques, new components. Well so so this bottom one was an aluminum. Yeah that bottom middle one DEF CON 18 was the last one I did before I retired. And uh that was an aluminum substrate with all the components on the back side. Laser engraved on the front side. Just trying crazy stuff and I remember having a conversation in a hotel room with you where we had to get the boards made and then send them out and it was it was this like do we want to take the risk of of doing it. And it's like let's just try it and see what happens. Yeah so that's the sort of uh and you've been unfortunately on the receiving side of sometimes when we try something and it fails like international shipping in customs. Some of you might remember those days. Yeah badges arriving a little bit late or pieces falling off them. Um. Not my badge. Actually no this year maybe. So uh yeah so on the China badge it was like what backlit uh LEDs. Yeah so we had reverse mount LEDs that were diffused through the circuit board substrate. So each of those little dots actually that picture's a prototype but the production one had the substrate which is sort of a brownish color. So as the lights lit up they diffused so you could you wouldn't really see it was an LED it just looked almost like a like an ornament or something on a tree. Um. So the I think maybe the one thing to to to segue into this year's badge is the China badge you would take it and physically plug it in to a visualization station. And the visualization station the art installation would then take essentially your leaves and your roots and it would give you a representation on this 3D immersive space. And so you could see the community solving problems and challenges and watching the actual tree of the whole con grow. And I was like man that is so cool. Yeah that was amazing. Yeah we've got to check it out. Yeah we've got to check it out. We've got to try to see if we can do something. Yeah and it started as just bare tree and then you know. Over the course of the con as people accomplish more things. Um. And that's that's always I mean that's always the goal with every with every badge with every project every village. We socially engineer we sit around and socially engineer like how do we use the badge as a point for you to meet other people. You to interact or you have something that they need or an excuse to interact. Right. And so. Yeah. That's half the other part is we're trying to figure out well is it a game? Are they going to be able to use it as a game? Or are they going to play the games like you're infected and you're a zombie and then there's a doctor. But then it's then it's competitive right? It's competitive. We didn't want competitive we wanted collaboration. Yeah and so we spent a lot of time just trying to figure out how do you make it so like one person doesn't flash the instant killer badge. Right. Turn around and wipe out everybody. You know. We have to contemplate a little rogue actors. Yeah. Um. Okay so so just a little bit then about DEF CON this will be our largest DEF CON ever. We're in these these uh four hotels. Um. We want. Um. We want to make sure that we have a lot of people that we can feed back. We know we're not going to please all the people all the time but we try to. Uh. So if you have a problem or you've got feedback please let us know. Um. If your badge does fall apart or something goes wrong there's a soldering skills village. Um. You're going to talk about some of the people are here. Yep. Some of the resources available for if you want to try to fix your own stuff. That's towards the end. Yeah. Okay so with that I want to pass it over to Kingpin and he's going to kind of talk about this year's badge. Yeah. So I'm going to pass it over to Kingpin. Alright man I never thought I would be back up here talking about a badge. Sort of the story that went with that when I stopped doing the badges um I just kind of felt like my role was done um and I was kind of just competing with myself every year and sort of doing the same thing over and over even with different technologies and I was like alright well I should just step back let DEF CON grow let somebody else do the you know do the badge and see where it goes. Um. But I'd always said like if DT calls me then I'm going to pass it over to Kingpin. Um. Then I'll do the badge again and low and behold he he did. So yeah definitely never never thought I'd be up here um it it's an honor to be back it's really great to see how DEF CON has changed and just the number of people and the variety of people um and to to work at such a high volume like I've always I've been basically designing the badge for this day so I can finally talk to people about what it is because it's been a secret for I don't know six or eight months or something and my wife doesn't want me to talk about it anymore and nobody wants to you know my kids don't want to talk about it anymore so finally I can talk about it. Um yeah so so really the goal um for my type of badges I like them to be simple kind of unobtrusive uh but have some things that you know hardcore badge people can can work with and and electronics people but that's not the main point the main point of this one is to appeal to as many possible people that we can because DEF CON a lot of times you know you don't have to be a hardware hacker to to use the badge for this and I and I really want people to sort of use it as um as you'll see kind of as a guide to help you through DEF CON. Um my my thought about this was like alright if this is my first time at DEF CON there's so much going on it's so overwhelming like what what do I even do where do I even go? Uh so this badge is is part of that um where the actual game play is very simple and this is the slide where everybody who's been hacking on the badge yesterday starts crying. Um so I'm going to go ahead and I'm going to go ahead and I'm going to go ahead and I'm going to go ahead and I didn't build puzzles into it. The puzzle is the badge quest. Uh you know uh there's so many amazing puzzle badges out there that and not XOR badges uh just all the badge life stuff and that's like I mentioned that's I can't even think that way I can't you know come up with a puzzle my my stuff is all about just like trying to keep it simple single task to like appeal to lots of people. So when you power up your badge you might notice that the lights kind of blink in a slow pattern that's what I call the attract mode and that's just the the pre-state. Um and then there's a bunch of different states that you have to go through uh to achieve the final the final state. Um I'm not going to give away too much I know people have done some reverse engineering but there there are a number of quest a number of tasks you have to complete uh around the conference and it basically the badge is to get you to experience DEF CON. So um I I think somewhere later on I'll I'll mention the tasks but it's not something that you can just go run around and like you know auto automatically win. So um I think it's not something that you can run in uh unless you hack it. Um but it really is to get you to try new things and sort of experience things cause like even I haven't done everything at DEF CON and it's impossible to do everything but at least if you can try to do the different tasks uh you know you you meet new people you learn new things and and it's just kind of fun. So there there are some hackable aspects to it but it really is more to encourage people to get out there and to kind of celebrate that and again build community and have it be something simple that can relate to people uh and then still have a few things that are you know hidden for for other people. So here's what the hardware looks like. I will get into the details of that but I want to at least kind of clarify the main functionality. Um this is what the hardware looks like and uh there's kind of a few main subsystems. The the probably the coolest thing is the um you see antenna upper left NFMI on the bottom. We call that infamy because I can't actually say NFMI very fast. Uh it's like one acronym tongue twister. Uh so that infamy chip is near field magnetic induction and it's actually a communication mechanism that uses magnetic induction uh instead of like traditional RF where you're propagating RF. So I'll talk a little more about it later but what I want to mention I've seen a lot of people sort of kiss their badges together like magnets and there is some similarity because a magnet has a magnetic field and this badge is generating a magnetic field but you don't have to touch them together. You can be maybe up to a foot maybe a little bit more and the data is still going to communicate. Uh but it doesn't leave you alone. So I'm going to talk a little bit more about the RF signature. So all of you you know RF software defined radio badge hackers trying to hack on the communication you're not going to be able to do it unless you have some magnetic probe and you're standing you know right between me and Jeff or something. Like it's it's very short range which means that one of the possibilities outside of DEF CON is you can make some sort of covert communication you know message passing thing uh you know instead of passing papers in class you can you know walk by your friend with a with a badge or something. But it's cool I think it has some cool covert subversive uses which actually ties back into that theme of uh you know using technology in a way that that helps us and not just harvest all of our information and all of our data gets sold to everybody which is super frustrating. Um we have uh the microcontroller, LED driver, piezo but it it I tried to keep the design really simple and it actually wasn't simple but in appearance I thought it was somewhat simple. Um I also want to mention this, the mounting options. This is something that you know like like DT said we like to try doing new things with the badge. We like to try doing things with the badge and it's great to say that and it's easy to say let's try something new and see what happens but you still want to plan and hope it works right? Because if we tried something new and it completely failed like that would that would suck. Um so we wanted to try this new mounting method because normally you know you have your lanyard you clip your badge onto the lanyard. But what we thought is what if we move up the stack and bring our badge up onto the lanyard so now we free up the actual lanyard clip for badge life stuff because there's so many other blinky badges out there instead of crowding everything like you have on the back of your lanyard you have some space. And it's like the uh what is it like the bolo tie? Here I'm gonna try this. You can like you know bring it up and be like check out my badge man. So and it's like you who knows what people are gonna do with it right? And that was so actually I'm gonna leave it this way. Um hold on. I just don't want to strangle myself. But that was sort of the intent of like let's give something new and see what people do with it. And what's funny is most people actually just clipped it onto the clipped it onto here. And it was like no that's not what we wanted. So we tweeted out like you know here these are lanyard straps you can mount them to different things. Um so I would recommend besides the normal mounting method like this which you slide the lanyards the lanyard through what I call the lanyard straps which are actually high current jumper uh bars. Bus bars. Um you can do other creative stuff. So we actually made watch bands this year. So if you go to the swag area I think they're five bucks or something like that. And you can wear your badge like a watch. Or I saw somebody who made a like a neck. I don't know what they're called. Neck jewelry around their neck. And like that's cool. Or maybe as a pin. Or you wear it on your head. I wanted to make a headband but I don't know how to do that. Um you know just something different right? Because that's sort of like the physical changing the physical aspect to see what happens. And uh I thought that was sort of fun because this is really like a piece of jewelry as well as the. badge. And some people might not want to go and figure out the electronics you just want to show it off. And like that's kind of cool. So here's a block diagram for the system. Um I'm not going to go super into details yet because I want to tell the story of of how we even figured why we're doing all of this stuff in the first place. Um but we have a um an NXP ARM Cortex uh M0 as a microcontroller which is a KL27. That's a general purpose microcontroller but really powerful as far as letting us reconfigure pins to to be different functions and that helped a lot when we were doing our layout. Um this information by the way these slides are a slightly earlier version of these slides and some of the badge design details are on the Defcon media server already. Uh some of the firmware is there as well if you want to look through that. I will post on my website the final actually an expanded version of these slides uh plus some other details whenever I can actually get to my room and do it. Um so we have uh the LED driver, we have the infamy radio which is also an NXP chip and I'll get into the details of those. Um but I had you know had to have some blinky lights on there because every badge should at least blink maybe a little bit. So we put some lights on there as sort of some indicators and then we have some two uh low dropout linear regulators that takes the 3.3 volt battery and then drops it down even more. Um that's one of the things I really like is trying to trying to get electronics working with a single coin cell that's sort of lightweight. There was two years of my badges that one time we had to add an extra coin cell at the last minute uh because I didn't read the manual properly and uh one year we used like a CR123A. But having these small ones makes it I think just a little, little more comfortable. Oh I do have the details here. Okay so microcontroller um this really is just the heart of the system. So this controls communicating to the LED driver, to the radio, um processing the the badge quest and uh it's just something that you need in every system. Um it is an NXP chip. But the coolest thing again is the uh is the infamy chip and it's uh it's uh it's uh it's a chip. And this is something where typically you see this, this technology's been around for a long time but you only really see it in super high volume products. Um when I first, yeah like at least a million volume um or most companies won't even acknowledge that you exist. And that's a problem when you're a hacker or when you're a small company or a small engineer trying to work on something. Um but the way we found out about this is uh I had previously worked with Freescale on some of the earlier badges and they had a great team of people that would sort of you know help us out and share their knowledge. And so I was able to work with Freescale on some of the badges and show us what's going on. Um NXP ended up purchasing them and one of our, one of our contacts still works for NXP and I called him up and said hey I'm doing the DEF CON badge again. He's like what? You are? And uh he said um I said what cool technologies are there? He said you should check out this infamy stuff. Um but it's a small group of people within NXP. So you're gonna have to convince them that, that you can, that they should even bother you know supporting you. Which I totally get because they're a huge company and we're, we're just a small conference. Um so I wrote them an email basically begging them and explaining them to, about DEF CON and all the audience and how cool it would be to kind of share a new technology with people. And um they wrote back and they're like yes we want to do it. And there was like 8 people or 7 or 8 people in this group in Belgium that was the infamy team. And they, they helped out a huge amount. I'll get, I'll get into that. But the actual technology itself um is usually in hearing aids, kind of body area network types of things. So short range because that magnetic communication is with the magnetic field. And it basically is you have a transformer, we're kind of creating a transformer with an air core. So normally we have a transformer with um kind of a material in the middle that bring, that kind of routes the magnetic flux to the other side of the transformer. But ours is sort of an air transformer. And I like to think about the communication as like an air high five. Right? So like you're like hey man and uh I'm just wearing this one on my wrist. But like hey man cool. And you don't have to be like right in their face. So I thought that was kind of cool. Um there are some antenna related things. Not that we really have to worry about for this application but the, oh yeah the bandwidth. Where did I put that one? Um oh that's on the uh where did I put that? I don't know it's somewhere. Um yeah here it is. So the bandwidth is 596 kilobits a second. Which is pretty fast. You know it's like uh faster than your typical modem. And uh but it's actually like for hearing aids what it's used for is to transfer audio from one side you know one hearing aid to the other side to synchronize audio. We do see these also there's a few applications for consumer um headphones like high end consumer headphones. So you have ear to ear and then you have ear to bluetooth. Which is kind of cool. But the coolest one that I saw when I asked NXP uh about what applications are there was this like tactical communications thing for firefighters and and other kind of public service where there there was a tooth microphone like a molar microphone and that would transmit through infamy to some other piece on your body and then that would transmit over radio. So like super spy stuff. Uh yeah so really you know this badge wouldn't have gotten done without a lot of a lot of people's help and I'll I'll also mention that later but NXP really stepped up here um you know to help us. Really to help the community and that that that I thought was really cool. The infamy radio is actually the infamy chip plus an arm core inside. So you actually have two microcontrollers on this board. One of them is running the radio code and then one of them is running the game code. You know the defcon code. Uh so NXP actually assigned an engineer specifically to write the code for that radio chip uh that would be the broadcasting functionality. Because if I had to write that from the beginning forget it. It would be not a six month, eight month project. It would have been a multi-year project. Um one of the interesting things is their documentation as a lot of companies that have pretty amazing technology is they usually require like a non-disclosure agreement to be set and and you know you can't release the information. And uh but they they were so interested in defcon that we kind of came up with this solution where we don't have to release all the documentation and the radio becomes this black box that we can just use to send data to. And that's all we need it for. Like we don't really have to dive too deep into it. Um so there is some custom code that is loaded onto the radio chip on power up. And that's why when you plug in your badge it plays a little tune. Uh you'll see the lights kind of go from three to one. That's as the code is loaded from the KL27 which has like a just a binary blob of the firmware for the radio chip. And that's as it's loading. So it's kind of it's kind of a neat technology there. And we basically just have a few pins going back and forth. Like there's a UART interface between the two. So if there's a valid packet that you read that gets sent over to the KL27 and then we can process it. So here's something that might be of interest if you're if you're hacking on things. Um I intentionally did not release sort of the the different states of things but I will probably on Sunday. Um but this is the packet that actually gets sent that gets broadcast from every badge and then gets received from every badge if you're within range. So there's a unique identifier and then there's a unique number. Um there's the badge type. So there's like a 10? 9 or 10? I can't even remember. I'm so like crazy about this. There's some large number. You can look in the code and figure it out. Um magic token flag which I'll get to. Game flags and there's an unused byte also. So if you end up hacking this firmware you can not only transmit your own badge data but you can transmit other data. Right? If you add a sensor or if you add something else and make some other thing with it. Or you can just clobber this whole packet and create your own stuff. Cause the code is there on our control side you can just send whatever data you want into the into the radio chip and then that's going to start broadcasting it. So we have the LED driver as well. This is the other kind of main portion. This one was sort of crazy. This was like oh. Oh yeah. Okay right. How many people can be in the area? Yeah. So that's great. So a lot of radio you know you have point to point or you might have a mesh network or something. The way that this thing works is that we basically have a pseudo random generated time where each badge is transmitting and each badge is receiving and then it sleeps the rest of the time and I'll show you what that power cycle looks like at the end. Um so it can be a one to many or a many to one sort of situation. We don't even know how many badges can be can be communicating at the same time but it's it's more than ten. Uh which is cool for like a group sort of chat thing to trade data between them. Um which is kind of cool. And you know NXP as they designed it like we've never done it with this many. And that's part of the fun of like who knows what's going to happen. And in that situation you know you can just all stand together and see if there's if the lights are blinking on your badges you know they're communicating and that's kind of cool. Oh yeah. Okay right. Great idea. Yeah. Geez. I should just have you give the talk. Um Jeff's remembering all these worthy things. Um so yeah because it's pseudo random that the detection time can vary from like five milliseconds if you just happen to be at the right state at the right time. Or it might take a few seconds. Um which I think is maybe why people are moving closer and closer to each other as they're doing the communication and then it finally works. Um but the more badges you have the more potential there are for data collisions and then it waits you know some random number of time and does it again. So it could take five ten seconds maybe. You know the more badges you have the more time it will take. And that actually comes into play for the final stage. Uh which I'm not going to tell you anymore than that but multiple chat group chat is required. Um so this LED driver you might notice the different different badge types. So human, speaker, goon. The ones that have colored gemstones have matching colored LEDs. Uh and that was a way for goons out in the conference to be able to easily identify people. But that's a hard thing to do. Like having red and green LEDs are easy. Having white, blue, purple, um and even the green, the green that we have is a high high uh forward voltage. And you can't normally run that very well off of a coin cell for very long. Especially if you're doing multiple of them. So this was a last minute addition this TI LP 5569 that takes in through I squared C a common internship communication pro call. Um the data to drive each LED and it has a little boost converter in there so it can take our coin cell down to about two volts and still drive the LEDs. So it really is a very very low power system that we have here. Uh and this saved us because now we can have different colors. Like we originally were just going to have a single color kind of pulsing and we're like that's kind of lame. So here here's the fun stuff. These are mostly pictures I think from this point on. Um some of our early concepts uh I went up to Seattle to meet with with DT um and some of the other guys and we're like what can we do? When I first saw the the the picture um that Jeff sent of the woman holding the laptop and the pastel colors and the happiness like that just hit me so hard. I was like we need something like this. You know like we normally are wearing all black and I couldn't find any colors to to wear up here so I have to buy some. But you know it's like DEF CON themes have been dark and this was just uplifting and I saw that and like for some reason I was like gemstones. Right? Like gems are so cool. And uh you know I we're like how can we integrate something soft natural material because technology is so much like hard. And um so we're like how can we get a gem? And we're like okay let's go to the gem store and buy some gems and see what what works. And we knew nothing about this like that you know. I sit in in my lab and design electronics like I don't know about jewelry. Um but we wanted to figure out how to make it work cause it just seemed to make sense. So here's some of the drawings like sticky sticky note drawings. What's that? Oh yeah that's right that's Jeff's watch. So we're sitting in the um we're sitting in that was that the Mexican place and I remember drinking like some caffeine and I was like like if you think I'm wandering around now that was a funny meeting cause I could not stop talking. And um we we grabbed this and like the watch was the electronics and then the cup was supposed to be the gemstone and we're like oh we'll just drill through the gemstone and put the electronics inside not knowing that that's really hard because gems are like you know rock and they're hard. You might have noted that but I didn't really think about that. I was like they have drill bits like just drill through the thing. Um but didn't quite didn't quite work like that. So over time I'll get to the hunting for the treasure park cause that's pretty fun. Um but here's some of the other kind of pictures of the development process. This is something that started in January. Um we started ordering components for this project January February before we could even verify that anything actually worked. And that was scary because we're spending DEFCON's money and taking this huge risk um basically on you know on the word of of people we're working with of NXP who had developed this technology and and just of experience of like alright well if we have a microcontroller it should connect to the radio like that makes sense. Um we did have evaluation boards for the radio and for the LED driver just to evaluate with our computer and with some of their boards. Um but it was a huge huge risk and I definitely got more gray hair over this for sure. Um but we started with like on the left is just a milled out circuit board to simulate the the badge and had some different color LEDs. You can see my schematic which is like a road map of of how an electronic circuit is designed. Started off as one thing and then as I start I'm like oh I'm gonna have to do this again and then I'm refining things and scribble and it becomes a mess and then it gets refined again. This picture is of the circuit board layout. I'm using um Altium designer here. He's been a a big supporter of of me for a long time which has been great because it's an actual tool that we could do some crazy stuff with and especially with this circuit board. I don't know if you've noticed but those parts are really tiny. Right? They're like really tiny. Um doing layout for a system like that there's a whole bunch of of crazy stuff. I have the circuit board stack up in the extended version of the slides not this one but we have things called via in pad which are little interlayer circuit board communications underneath the chips um uh or circuit board connections and it's just a very difficult manufacturing process so this this tool has saved me for sure. Here's some other pictures of when we got the prototypes back. Um so basically like we went to Defcon China the day before we left for Defcon China I had to get the prototype sent out to fab so when we got back from Defcon China two weeks later we had the prototype. I had seven days to write enough low level firmware to make sure that the system worked so we could order 28,000 of them a week later. Literally seven days later. Um highly not recommended. Like don't do that. It was really it was really really hard and there was nights of just like ugh yeah don't do that. Um and so we went from six prototypes to 28,000 units without even being able to verify the final changes I made for production um which was really nerve wracking and it was a lot of money. Even we got a you know great deal on manufacturing but this stuff costs this stuff costs money and it was a lot of money. Um so we were really really really excited about it and I didn't want to be responsible for like the downfall of Defcon by spending all this money on something that doesn't work. So there's sort of that that stress of trying to please people and then also be within budget. Um which I actually went way over budget by the way so I'm gonna tell you on the stage so you can't like strangle me. I'm just warning you now. Uh but at some point you can't some like the ball is rolling so fast that you you can't go backwards right and it was like we had to get things done for this day so we had to pay to get it done and I'm glad I'm glad it made it. So part of the fun part was learning about gems and this is really I think we're kind of the hacker spirit helped out of like going into this industry going into this world of how the hell do we find a place to get essentially 30,000 units actually it was 30,000 units of a of a gem. Like is this even gonna work? So I happened to be on a trip to Texas and oh. Oh right. So we have a local gem store like a new age store near near my house I'm in Portland so there's like a new age store in every block. Um so I went in there and like picked some stones and they're awesome like found found ones I think might work and I talked to the guy and I'm like so you know you have a few out there like can you guys get me 30,000 of something and he's like that's a lot. He's like even we can't do that. And I'm like well what do I do? And he said well there's this show called the Tucson Gem Show that's you can just like. sort of think about it as like a gem show, you know, like DefCon but for gem people of all levels. And I see some people nodding their heads. Have you been to the Tucson Gem Show? It's like, it's crazy. Yeah! Gems! So, um, it's 50,000 people over two weeks going to this event. Collectors, retailers, wholesalers, mine owners, everything along the way. And we had 36 hours to figure out what to do. Um, I happened to be in Texas doing some work and, uh, I call up Jeff, I'm like, hey, there's this gem show. He's like, just go there on the way home. I'm like, alright. So I booked a hotel in what, in what turned out to be, you remember like old DefCon days where the hotels were super shitty? This was like, uh, this was one of those. Um, but it happened to be one that had a bunch of vendors, well actually all of them had vendors in it, but this one had vendors that actually helped out, um, which was really good. It was a good starting point. And, um, so I got there and I was like, oh, I'm going to do this. I'm going to do this. So I got there, dropped all my stuff in the presidential suite. I don't have a picture of it, but it said presidential suite and then there was like all this stuff tore off and you go in and it's just, it looks like, um, uh, Alexis Park or something. Yeah, it was like, wow. Gems. Um, oh yeah, so this was like the first picture. So I check into the hotel, I go down, I go to the, I try to find a retailer, right? Somebody that has the connections to wholesalers to sell stuff. So this, this picture here is who would sell to the, the, the local stores. So your local gem store would buy from a place like this. I walked in there and was like, holy shit, like look at all those gems. And it was, it went on and on and on for miles all around, all around, um, Tucson. So I sent this picture to Jeff and I'm like, I don't know what we're going to do. So what made it even harder is I went to talk to the owner of this company and I was like, yeah, I'm doing this thing for DefCon. It's a hacker conference and anytime you say that they're like, hackers, that's scary. Why do you want gems? I'm like, I'm not really sure yet. Something to do with lasers, I don't know. Uh, so, but that's how you get their attention and it actually worked. So I, I was like, we need 30,000. He's like, we can't do that. I'm like, holy, oh my God, what are we going to do? He's like, but you should talk to this guy. So I went to that guy, which was like, you know, walk down a mile, sort of like walking down the strip, but it's empty. You go to this other building, you find this other guy, you say, this guy sent me. And, um, but it is very insular, like all these people know each other. So it's a lot of personal connections. So I ended up finding this wholesaler, um, and I was like, okay, let's do this. Um, but then they couldn't help out, but I learned how most gemstones are shipped in these giant, um, what are they? The oil drums like you had in Defcon China, giant oil drums wrapped in paper. So it's like, you see, you know, you go to your new age store and it's like mystical quartz crystal that helps you with whatever, but like they don't really care. They're just shipped in these massive things. Like they're not that special, they're stones. Um, and that really like, that kind of ruined me, you know, because I really wanted to believe and, um, I don't know. It's just one of many things that ruined me in this project. So anyway, I found a place, I walked by a local place called Norcross Madagascar. That's a huge company that makes a lot of like the carvings that you see of things, you know, different carvings that you, that you get made out of gems. Um, and I went into, they're a local company in Tucson. I went in and I said, uh, hey, I'm working on Defcon and they look at me like, what, who is this guy? And, um, I ended up meeting with the president of the company, the owner of this company, who, I don't know, maybe it's fate, had the same last name as me except the D was a T. And people always get that confused, Grand and Grants. And, um, I started talking to him. So that was it. We, like, connected to that. And, um, he was awesome. So I basically sat down with him for an hour and he owns a mine in Madagascar that makes, um, agate. So I'm trying to figure out, we don't even know what material we're going to use yet, by the way. So I start talking to him and he was basically my mentor for that one hour of, like, you, you can't do it this way. You, you know, you're not going to be able to get it done. You can't use glue because you have to do this. And it really helped me. It, but he was like, I don't think we're going to be able to get this done in time for you. Because I think we had six or eight weeks or something to order them. Um, he said, but you need to talk to this guy. And that was it. Like, I had 15 minutes to get to this, to this show before it closed. Big trade show for wholesalers only. Um, and I have a business certificate so I could get in. He said, you got to talk to this person there. Like, get on WhatsApp and do it. And I'm like, what's WhatsApp? And, uh, cause I don't, I don't use technology. I design it. I don't use it. And, um, so I load WhatsApp on my phone while I'm waiting for the taxi to come. And, uh, I get over there and I rush through and I run back there and I'd already tech, WhatsApp, whatever, Whatapt, whatever you call it. Texted. Sent a message. And, um, said, I'm on my way. You know, Robert recommended me. And that's the end. Cause a lot of large factories, you can't just walk up and say, hey, can you build something for me? Um, so I went over there and met with Ms. Rainbow and she, like, totally hooked us up. I was like, DEF CON. We have 15 minutes. And she sent me samples of what we wanted. And then from there it was just, like, to the races. So pretty, pretty crazy, um, that we were able to pull that off. And I, I don't know why I put this in. There's just, like, beautiful stuff, right? It's like, even if you don't, like, appreciate, like, what you're doing, things, this is all, like, under the earth, right? Like, earth is sort of beautiful if you get rid of the humans. Um, or, or, yeah, you put robots instead. That's gonna, yeah, that'll work. Um, so, oh, by the way, so that thing on the right, that's just, like, a hundred million year old, like, Mosasaur fossil. Just sitting there, right? So you can get, like, crazy stuff. We originally were gonna use agate, so that's, like, dyed agate. Um, but there's too many variations in the, in the, in the, in the, in the, in the, in the, in the, in the material to make it work. So we ended up using hand cut crystal from, from, uh, from Brazil. I didn't know it was gonna be hand cut. I'll get to that. Um, and as you notice, every single gem is different, right? Every badge is unique, just like all of you. I've, I've been waiting to say that for, like, six months. But it's true, right? Like, it's true. Like, we really are all different. And the gems are, too. And that was, like, you know, some of them have cracks, right? Some of you got them and they were already broken. That's life. That's natural. But you can actually go and fix them. We have extra, we have extra materials. Don't worry. Um, anyway, so the strength varies depending on the thing. But it starts in the mine. Lower left is a picture of the mine where these gems came from. Middle one are, are, are the gems in their natural habitat before we rip them up and destroy them. And then on the right you can see the size of, like, a, a quartz crystal that we use. Like, it's about this big. And heavy. Like, rocks are heavy, too, by the way. So when I hooked up with Yian, which was this, um, gem, huge gem and jewelry manufacturer, we did all of this sight unseen based on the trust and the reputation of, you know, of Robert from, from Norcross. Um, but when the project was done, when we were in Def Con China, I said, hey, I'm already in the area. Can I visit the factory? And they said, sure. So I got to actually go to the factory. They already had all 30,000 gemstones built into the mine. Um, and, and, and, and, and, and, and, and, and, and, done in huge boxes. So got to take a picture with that, which was cool. But then they said, let's show you how the gems were made. Because I thought that would be, like, the actual useful part of, of this for you to see. Um, and mind blowing, because it's not technology, but it's still very technical, very skilled. And this is where I found out that somebody's actually cutting them by hand, not, like, drilling them out. It's a very manual process. Um, so you start with this big, uh, this big gem block. You cut that. Then you put it in another machine. You cut that. And you make slices, um, that are the same, same width as what we want, which I think is, uh, 5 millimeters. And then somebody sits with the slices and draws the outline of the badge with a pencil. And then this is the cool part. So here's a video of one of the, one of the, the people there, one of the, um, jewelry manufacturers taking a really sharp disk and then just hand cutting. And look, like, no gloves. Yeah. You could say I was a little clenched watching him. But it's, it's fascinating, like, to see this world and to see, like, this is how, you know, all the fancy jewelry is made. Somebody's actually making it. Every little ball of a, of a bracelet or of a necklace is handcrafted. And that, that was pretty eye opening. So the disks are made. Then they're, they're, they're, um, kind of sanded a little bit more to be shaped, hand shaped. And then put into these super loud vibrating machines. I should have taken a video with audio just to, like, blast your eardrums out. But it's a whole room full of these things that polish the gem. And then some of them were dyed, depending on the, on the badge color. Um, so there's me with the team that, that helped out. And they were the management for all of the, all of the staff underneath. But it was actually cool to see, to see a lot of the workers and, and wave to them because they're working. But, like, they knew who I was because they were, you know, had made all of these for us. And it was, like, really, really cool. Um, there are all the boxes. And these are the pictures of the first dyed gemstones that we got back. So it really was a fascinating sort of experience. And we didn't know, like, how would the light shine through? Like, how would the variation be? Um, but it was worth, you know, worth trying anyway. And I think it turned out alright. So as far as the code of the system, um, it's a 64 kilobyte flash device. The KL27. So we're using a lot of it. And, and that's with optimization turned on. Without optimization I was over the, over the, the amount of memory. And, and I got really scared until I realized I didn't turn, I hadn't had optimization on. So now I do. And it's good. It's just hard to debug because when you optimize code it's, you know, you're, you're going all over your, your program count is going all over the place. Um, the actual number of source lines for the project is 3,000. Just for the badge main, main dot C basically. All the library functions and all of that stuff is separate. So if you look through the code, just remember, like, I'm a hardware guy. Um, I'm not a software developer. I can write low level code. And, um, you know, previous DEF CON years I would actually apologize in my code for things. But I don't apologize anymore. Just look at it and change it and, and, you know, make it do something cooler. So the development environment, um, is also, these development tools are on the DEF CON media server. So if you want to set up your, your project and start hacking on the code, you can do it. We use MCU Expresso, which is just the standard NXP, um, development environment. Totally free. Uh, we use the KL27 SDK and that consists of some of the low level libraries that you need for different interfacing. Um, we also have, um, you know, some of the, um, you know, some of the, um, you know, some of the software that we use. Um, but the badge really is a, you know, general purpose environment with a radio and with LEDs. Um, so you could create some cool blinky functionality or do some other radio communication like I talked about and really expand on that. For hardware hackers, uh, there's two different connections. The first one is the more complicated one. This is SWD, serial wire debug, which is a, um, subset of the JTAG standard. So sort of for programming and debugging interface. You, you need some sort of programmer. So the LPC link 2 is what I used as the hardware interface. Um, the Black Magic Probe, uh, by Peter Esden is, uh, also usable, open source. People have already been using it and hacking on it. Hacker Warehouse has those for sale. Uh, but you do need this tag connect cable, which we have some of this hardware, by the way, in the hardware hacking village also. Um, and I'll, I'll, I'll get to that, uh, pretty soon. And you plug this connector onto those test points and that will fix the problem. Um, so communicate, you could load new code in, you could extract the code if you wanted to, but you already have the code on the media server. Modify the code, load it in and have it do other stuff. You know, maybe change your, change your data packet to unlock everybody's badge or something. Um, but I think for the end, more entry level people who are curious about hardware hacking but haven't done it, this UART interface is the place to start. And this is a standard sort of communication interface used for debug outputs. Sometimes on devices you find it and you get dropped into a root shell so you can hack on things. Uh, when you connect here you get a command based interactive menu. So you can control different aspects of the badge, see the state. When you read someone else's badge it dumps the, the packet information. So it's a cool way to kind of learn what's going on. When you actually complete the entire quest, um, this mode enables some extra commands that are sort of artsy and hacky and like there's some, some neat things you can do there. So, um, oh, and this is something too, this is a 1.8 volt UART. Most people that are hacking on things are at 3.3 volts or 5. Low power system, low power system, like what we're using, 1.8 volts. And it's sort of good practice. I was like, well, it's kind of annoying because it's lower voltage but that's part of progressing with hacking is like, let's figure out how can we use different tools to do the same job. Black magic probe will work for this. Um, the JTAGulator will work if you set the target voltage to 1.8 volts, use the pass through mode. Um, the bus pirate should work. Uh, any FTDI or USB to serial adapter that supports 1.8 volts. Lots of ways to do it. And you just hook up to those pins. 1, 2, 3, 4. Here's a few pictures of fabricating. Um, of the boards being made. I think this one has some videos. This is the assembly. So if you've never seen circuit boards being assembled before, uh, it's cool. Like robots, right? So, um, here's some robots putting components on the boards. There's 12 badges per panel. So we made 28,000 pieces. So, someone do the math. 2,000 panels or something? I don't know. It's a lot. So this thing's putting the components on and then it, then it shoots out of that and goes to this machine that's called an AOI, uh, Automated Automated Automation. Uh, it's a optical inspection that optically does some computer vision to make sure that the components are right. It compares it to a known good, like a gold standard. So this is checking every single, every single board one by one to make sure the parts are, are on there properly. Um, and if they're not, then you'll see a big fail. Like a big red box fail. I think this one actually says good. Um, and this is something that's required because every step of the way there's variations in the process. Like the reels of components that come from the manufacturer, you would expect all of them to be perfect, but they're not. Sometimes components are upside down or, or whatever. So this machine will test, will test for that, look for it, and they can fix the issue before it goes into this reflow oven, which is like a giant cookie making machine, uh, that one by one, the boards come out. And this is full speed. So can you imagine making 2,000 of these, sitting here like, okay. We can almost look at it now. Like it's almost there. But then watch this, it gets really fast. It's like, yeah, it's like a pizza, right? And there's actually at engineering trade shows, you'll see people who sell these machines and they'll put cookies through or put pizza through or something. So now it comes out and then it like shoots along this rail and you're like, stop! Like don't go, don't go over the edge. And it comes out and like keeps going and it's like, oh my god, it is going to go over the edge. And then it stops. So that has to happen over and over again, then it goes through the testing and all of that. So it really is like a long term process. What's cool about this, Fusion EMS is the company that I used to do this, local factory. That was another big decision of staying local so I could drive to the factory and say, hey, we're putting gems on things. And they're like, okay. We've never done that, but we can, we can figure out how to do it. And, uh, you know, I was there a lot and I think every time I went there, they're like, oh god, Joe's back. Um, but we got it working. We got the process working. And here's some x-ray images of it just to show. Little DEFCON logo hidden on an inside layer of the circuit board that you can't see from the outside. I thought that was a cool trick. Yeah, you need x-ray eyes. Yeah, you need x-ray eyes. Yeah, you need x-ray eyes. That would be like, maybe that would be a DEFCON 54 by the time that happens. Um, and then final assembly, we had the factory, this is why we're over budget, by the way. The factory had to hire 20 temp workers, like high school students and college students who were interested in, in engineering, um, to work at the factory to do some of this labor of putting this, the adhesive on the gemstone. Putting the, it's double sided tape, by the way. Putting the adhesive onto the gemstone, putting the gemstone on for the final assembly. Um, and they learned a lot and I got to talk with them and talk about DEFCON and hacking and everything. So it was like, kind of satisfying. Here are the final numbers, uh, mostly human of course, and then there's all the other ones if you want to collect them all. Some of the gemstones are more see-through than others, so we wanted to put some cool artwork underneath, so depending on the variation of the gem, you can still see it. Uh, so these are, you know, different colors and the artwork under there before we put the gems on. Okay, if you're doing the badge quest, this is important. Um, these are the tasks that you need to complete at DEFCON. The first task you do is you just communicate with somebody. And I didn't mention this, but it was in the slides, the LED pattern of the state you're in actually indicates what state you're in, so you might be like, oh they're just doing something, but those, those states, the LEDs tell you what state you're in. Um, the first state is just communicating with a friend, or anybody. Then the next five states have to be going and doing DEFCON. So you go to arts, you do a, you go to a show, um, you go to a talk, you go to a village, you participate in a contest, or you watch a contest, you go to a party, and that, um, there, it's not, it's not a person who has a speaker badge, the goons within those different groups that are working those areas have the magic tokens. And these are different stones that are very visible, um, of different types, and they have the flag that when you communicate with it, it advances the state. And the intent there was there's so many people working behind the scenes at DEFCON, you cannot even imagine. Um, like I'm in one little communication group just for the badge, and there's ten or something of us, but I don't even know how many hundreds, how many goons and stuff are there? Behind the scenes? I don't even know how many goons and stuff are behind the scenes people. Yeah, so 500 goons and then all of the DEFCON staff. Artists and everybody who's participating too. It's huge. So I thought this would be a cool way to, like, interact with the volunteers and say thank you, um, and then, you know, give them an air high five and, and get your, get your, uh, your flag. So, um, I thought that was kind of cool. Battery life should last four days, depending on what mode you're in. Uh, this is amazing because the radio turns on, transmits, goes to sleep, and it's, uh, point sixty-one milliamps average while the radio is communicating. That's, that's very, very small. It's like sipping power. It's pretty wild. Um, and the LEDs are what take up the most power. So if you're in the attract mode the whole time, your battery's gonna die sooner, but we hope it should still last through the conference because four days is 96 hours and if we bring the battery down to two volts, 2.3 milliamps, milliamp hours per average and that should be okay. We have extra batteries in case, you know, you need them. And then one little extra thing that was a last minute DEF CON exclusive. Um, because we liked the artwork in China so much, this interactive component, we thought, let's add some interactive component here. B-b-besides just the communicating with each other, like, let's build some, some crazy project. And we had Zebler Studios, who's done a lot of cool, um, uh, video mapping and other stuff all around DEF CON that you see. Oh yeah, right here. Stuff so cool. Where you look at it, you're like, how are they even doing that? And it's stuff that's, that's all around DEF CON that they're doing that, again, it's one of those things you don't, you don't even consciously notice. It's just like, that's awesome. Um, so, those guys were gonna kill us because a week before DEF CON, we're like, oh, by the way, heh, we need some artwork. And, uh, what they pulled it off. I built a little bit of hardware on the left that would take the badge and then process the data in an easier way for, um, for David to work on. One of the guys worked on this project where it was just an easier packet that went into a Raspberry Pi and then he basically created these packets that would affect their, um, video, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, uh, manipulation software, which was this Resolume software. And what you end up seeing is this display in the chill-out lounge, you go there, you scan your badge, it's gonna show you your progress, it will show you your badge type, um, and, you know, you might get some crazy things, if there's any bugs in the code, who knows what that's gonna do, right? So, like, hack on it, if you change the firmware, see what it's gonna do, it's gonna make the Zebler guys go crazy, um, maybe you'll break the reader, but, like, might as well try it, right? It's DEF CON. Um, yeah, so there were a lot of challenges, I'm not gonna go into them all, but what I really learned, um, is that, you know, every big project, no matter how big it is, like, you can actually get through it in little chunks, and, um, this really exercised, like, every aspect of my soul. And for engineering, like, it made me a better engineer, and it made me a more confident engineer, because once you realize, like, all problems, you can find the root cause and you can fix them, even though it might take a lot of, a lot of time. Lots of uses for things, if you, uh, you know, want to hack on your badge, you can, you know, you can, you can, you know, you can, you can hack on your badge, that's cool. And this is where I have to thank everybody, because, um, you know, I'm standing up here giving the talk, but I don't really deserve the credit as much as everybody else who backed it, who supported me, um, because it, it, you know, this stuff doesn't happen in a vacuum. Uh, I'm just the one that happens to, to, to receive the thanks, but a lot of other people should be thanked. So, um, I do want to thank, um, NXP, of course, the DEF CON staff, DT, Nikita for listening to a lot of stuff, because I couldn't actually talk to anybody for six months, um, Fusion EMS, Kingbright, who had the LEDs, Altium, NXP, of course, because they had huge support, um, Future Electronics, and, you know, it's a global effort, right? There's stuff all over the world. I actually flew to Belgium also to meet with that team there, and it turns out one guy did most of the code of that team, and it was, like, mind-boggling. So, you know, we are a global community, right? That sounds sort of cheesy, but it's actually true, and, like, we couldn't get stuff done if it was just us alone in our room. So, resources. This is it. Final slide. If you want to hack on your badge, go to the Hardware Hacking Village. If your badge broke, if a connector fell off, if a battery fell off, there's no better time than DEF CON to learn how to fix something. Um, there's a real-life engineer from NXP in the Hardware Hacking Village. Actually, he's not there yet. He's here. Um, a guy named Anthony. You should stand up. So, he can help you. And, and so he can help you get up and running, load the tools, hack on it. I'll be around, but the intent really is to let you guys go free and do this. Like, there's no hidden puzzles that you need me for, right? Like, just go out, enjoy DEF CON, have a good time, try stuff, and thanks again. It's really been an honor, and, uh, maybe I'll see you next year.