Welcome to DEF CON. I'm the Dark Tangent, and this is DEF CON 18. We've been in many hotels that have been demolished or blown up or kicked out of, but this is the first one that's gone bankrupt. Not because of us. So yeah, that was a little bit of an excitement about a month ago when that all started breaking. And then also, I'll just go over a couple of brief things before we really get into the technical stuff. This year, how many of you people have gotten onto the wireless network? There's like one dude back there. There's like, okay, there's two. Hey, so we spent a lot of energy, and Locke and the network team spent a lot of energy to try to roll out this WPA2 encrypted network. And the way it's architected, the two networks don't touch until it goes out the gateway to the Internet and all of that. So. So. So the goal was, you know, how many people here think the AT&T network is saturated and sucks? Like everybody. So, I mean, if you're trying to take a picture, send it to a friend, you're trying to blog, whatever, you just can't. I think last year I was trying to stream a 30-second clip, and it took me two hours. So that was, you know, useless. So this year, we wanted to do WPA2 so you can get it in your phone, your laptop, whatever, and it's all encrypted, and at least you feel safe about streaming or doing whatever you want. And because of that, hoping that you guys would take advantage of the experience, we're trying to get it in your phone, your laptop, whatever, and at least you feel safe about streaming or doing whatever you want. So we bumped bandwidth to 75 megabits, full duplex, which is, like, by far the fastest we've ever had. I think last year we were about 20 megabits. So we got a lot of speed this year. And maybe next year, if we use it this year, I'll bump it to 100 next year, which would be pretty sweet. So try to take advantage of the encrypted network. The instructions on how to do it and install the certificate are in your program. And so that's one big change this year. The other big change is, like, where did everybody come from? There's, like, there's a lot more of you this year than last year. And Joe's got some funny stories about the problems that's caused. Personal problems. A lot of them. So we rearranged the floor plan this year to do better flow, wider hallway, and we thought that this was going to work out really well. We bought 1,000 extra badges than we did last year. We thought we had this. We put this down. And so many extra people showed up. I don't think the wider hallway really makes a difference. It's like that worked for, like, the first 50 people. Yeah, so we're aware of these problems and have contingency plans. So new floor plan, putting all the content down here. We're putting a lot of the action up there so that people aren't hopefully walking back and forth across everybody. We've got the new network. We have a crap ton of new contests. And so as we say, DEF CON's what you need. That's what you make of it. There's a lot of new contests, a lot of new blood out there. And so if you get the time, stop by, check out some of the contests. I'm doing one I've wanted to do for three years. And every year I'd procrastinate and I'd get sucked into the vortex of con planning and I'd never do my contest. So finally I'm doing it. It's this tamper-evident contest. You get these boxes. You have to get past the seals on the outside. You have to get through the seals inside. You have to tamper with the contents of some information inside, and you have to seal it all back up and make it look like it was never opened or messed up. Because it's kind of like lockpicking and it's kind of like some other physical security stuff. And I thought it would just be really cool because you see these seals and you're thinking to yourself, there's no way that can be secure. That little symbol on your power meter, does that little lead grommet with the wire really, does that really work? I don't know. But you guys are going to find out for me. And then you're going to get points for scoring and teaching everybody. How you did it. It's going to be an educational event. So we can all learn how this works. I think that would be really cool. And a lot of other people are doing interesting contests. So take some time out, just drift through there. Maybe get involved in something. That would be really cool. What else do we want to say before we start revealing the innards of the badge? There's how many people checked out Thursday night? Sort of the soft roll yesterday. Was that okay? Not okay? Give you guys something to do? Yeah. I kind of like that idea of soft start to socialize and hang out where it's not a lot of stuff happening. I think we're going to keep that in the future. What else is there? I don't know. I think that's pretty much it. It's the biggest con ever. So back at the Alexis Park at the height of the dot com boom, like the year before the bubble burst and everything crashed and everybody disappeared, we had about 7,000 people there. 7,200 people. And I talked to registration and we just surpassed that. So we're now back where we were right before the bubble burst. But in a hotel like twice the size or three times the size or something and not on fire outside getting heat stroke. So that was really cool. So we've really come back. And the difference now is people aren't coming here because they saw the movie Hackers or something and they're not on rollerblades. I think the people here actually are really into it. So that's really cool. And I want to thank you all for coming here and hanging out and checking out this session. This is longer than usual because Joe really wanted to get into more of the hardware hacking side. So the first half you'll really hear the story and some of the stuff that's going on. But the second part, if you're really into kind of more of the details, right, you're going to get down more into the nitty gritty. And the thing that's interesting is when we first started doing hardware hacking badges the very first year, it was just to do something different. Nobody had really done it. We wanted to be different. And if you look at the progression of our badges. Every year, they've gotten a little bit more and a little bit more crazy. And while that was happening, the hardware hacking village was growing. More people were getting into hardware. Now like every con has a hardware hacking badge. So many more people are hacking hardware. It's sort of like we've incubated that a bit and we've got people thinking about it. And that's super cool because that was the intent, right? We shifted some people's focus to start looking at hardware and software. And like it's four or five years later and it's really caught on. So anyway. We're pretty proud about that. We really like the idea of incubating ideas and getting it out there. So it would maybe be safe to say that there might be things different next year, right? Where should we shift attention? And that's something we've been thinking a lot about. Because we think the hardware stuff is really taking on a life of its own and that's great. So maybe now we need to shine the light somewhere else. Get something else going. So Joe and I, we've been talking about that for quite a while. So we can talk about that. But we should always use your feedback. What do you think has not gotten enough attention? RFID. RFID. Yeah. As if Chris Padgett hasn't spent his life thinking about that and major malfunction and stuff. But I don't know if you want to walk around with a big block of aerogel around your neck. Maybe a CNC milling machine or something around your neck. And I hear mass spectrometers have come way down in size. And that's the funny thing. Just as a side note. I have a friend who's... Yeah. My wife bought one of these new miniature mass spectrometers. They're actually getting pretty inexpensive. And so what do you do with it? Well, you fuck around with it. And she's like, yeah, Fiji water? Not so much Fiji. She's like, how come my red wine has sugar water in it? And so, I mean, that's really cool. She's just running everything through the spectrometer and finding completely opposite results than what you're supposed to find in your foodstuffs. So that's pretty cool. And next year, I'm probably going to have a tamper, a data destruction contest. I've been accumulating ways to destroy data. But that's not involving the badge. Unless they're made of sequels. Yeah. And I would like to announce a contest right now related to the badge. And that is we have past badges dating back to DEF CON like three. We have a whole bunch of weird badges. The metal badges. Remember those? They were like cast metal and weighed like five pounds and the black stuff came off your neck. Well, I've got a tub of that and it weighs like 500 pounds. And I want to get rid of some of these badges because they're just filling the DEF CON office and they're really hard to move. So I'm going to try to find a way to donate past badges to artists who can do something with them. So if you can think of a project you can do with hundreds of old DEF CON badges, I'll ship them to you. The deal is you've got to bring it here and put it on display. So if you've got something in mind, I'd love to help you out and I'd love to have a cool display of all the various years' badges. So with that said, it kind of reminded me of what you did when you had all the broken ones. You did that art project in San Francisco. That was pretty cool. Okay. So with that said, I'm going to pass it off to Joe Smooth, AKA Kingpin. And we're going to get this party started. So he'll pass it off to Kingpin. Thanks a lot, guys. See you around. Joe Smooth, AKA Kingpin. Joe, Joe, Joe. I'm going to wait for you to come back. I'm going to wait for my slides, because there are good pictures on there. Oh, yeah. The slides look better than I do anyway. All right. Here we are again for the fifth year in a row behind the scenes of the DEF CON badge. Let's go. So in case you don't know, my name is Joe Grand, AKA Kingpin, AKA Kingpin. And when I don't have to go out in public, I usually look like that, but I shave my mustache off and got a haircut to look a little better. I'm an electrical engineer by trade and by hobby and by lifestyle. It's what I do. I hack hardware. I break hardware. And I design stuff. And let's see. So how many of you guys were at DEF CON 14? Yeah. Yeah. That was actually more than I thought it would be. Yeah. Oh, yeah. So this is the... So I'm gonna do a little retrospective and each year I wanna see how many people are coming because I realized when I started designing this year's badge and started writing the article and stuff and putting together the documentation, I was like, a lot of these people probably haven't even seen the past ones. So they're just coming into this with the end without seeing the progression. So yeah, this is the limited edition gold solder mask that we just made a few of to test it out. Paint it red. Paint it red. Yeah. Well, the gold one, we always try to do something new. So what was the deal with that year? It was gold. It was a new thing, right? Yeah. I'd never seen gold solder mask before and the factory was like, we have this tub of something that says gold sand and we're like, yeah, let's try it and see what it looks like. So I don't know if anyone else has seen circuit boards that look like that. But every year we're trying to do something different. What about DEF CON 15? Yeah. Yeah. The numbers are growing. Yeah, they are. With the trippy optical wave thing. Yeah. So this was the... This was the scrolling text message with the... With the capacitive touch sensing buttons and you could set your own messages and do all sorts of stuff. Persistence of vision. People hacked it and wrote games for it. It was cool. And there's a lot of swear words going across it. That's the year it really took off, I think. Yeah. Yeah. The first year was sort of like, oh, cool, electronic badge, awesome. But then when people started expecting it, it was sort of like, hmm, now we should do something cool. Oh, actually, yeah, this one also had a bunch of 802.15.4 slash ZigBee wireless support. That was unpopulated and accelerometer support that we gave out a lot of components for people to hack on, but no one ever did anything with it. I think one guy put in the ZigBee. Yeah. Yeah. DEF CON 16. Is that more or less? I can't tell if that's more or less people came to DEF CON 16. I think it was about more, like by two. Yeah. So this one was the infrared... Wow, that's a great picture up there. Yeah. This was the invisible badge. Well, no, you need the... You need the... Yeah, this one's stuck in customs. That was the first year we had customs problems. That's... Yeah. Is there a way to adjust the... Screen? Picture? Because I have a lot of pictures, and if they all look like that, this is going to be a really shitty presentation. Why don't we jump forward one and see if it's just the slider. Yeah. Now go back. Okay. We've got to mess with the... Brightness, contrast. Yeah. Well, theoretically, we've got some goon room proctors that can tweak the projectors. So if we have goon room proctors that can tweak the projector. Oh, yeah. Someone asked it. Doesn't someone have a remote control and they can just mess with the projector? Enhance. Enhance. Yeah. So anyway, you just have to use your imagination here, but this was a really gigantic badge, and we had an infrared receiver and transmitter and SD card support, secure digital card support. So you could put files on an SD card and then transmit wares to your friends, and it worked sometimes. There was a lot of challenges with this one. It was hard because you have to support all the different SD card types because you never know what someone's going to bring. So we had this gigantic battery on there, and people were complaining that their neck was getting sore. Oh, and then all the people that put the battery in backwards. Which is kind of funny at a hacker conference because they come to me with burned fingers. And they're like, your badge doesn't work. I said, look on the battery holder. It shows you where the positive side is. So yeah. That was fun. What else? We had a TV be gone mode in that one. So if you didn't have an SD card, the thing would just turn off TV so you could hold it up. It would turn off TVs in North America. What about last year? Yeah. So this is the year we got really crazy because Dark Tangent was always like, we've got to do a puzzle. We've got to do a puzzle. And I'm like, no, let's not do a puzzle. But then this year, I didn't have an excuse. So we're like, let's do a puzzle. So we did a puzzle. And there's seven different badges that all connect to each other like a puzzle. Yeah. And Neil did the background art. Yeah. And when you put it all together, you kind of got the reveal. And this was the first time that I'm aware of that anybody was using multiple layers of silkscreen and solder mass to get completely non-standard circuit board colors. And the factory, E-TechNet in China, went out to actually find the colors because we gave them a Photoshop drawing that Neil did with those colors. And they actually went and matched those colors and found the right silkscreen, which is totally cool. Well, yeah. So talk a little bit about that manufacturing process. You show up at one of these fabs and you're like, hey, we want to do this. And they're like, W-12. Yeah. Most times, circuit boards usually are green and square. And they're getting a little bit better in general. Factories are starting to become aware that people want to do different solder mask and some art and stuff. But to do something like this where each badge was an individual cutout and with all these different layers and colors and stuff that, luckily, we'd been working with the same factory for a while. So like, oh, great. It's time for DEF CON. And they put people on it. But it was cool. And the badges actually... Well, no. Look how closely the badges align. I mean, the tolerance is amazing. The tolerance was good. Did they... What are they, water jet cut that? No. They're just milled. Oh. Yeah. Milled with a really small bit. And so the badges not only physically fit next to each other, but you could also connect them together. And they were individually addressable. So you could use the human badge as the master and control the lights on the other one and stuff. Oh, yeah. The master-slave sort of thing. Yeah. Yeah. Yeah. One group did that last year for the badge hacking contest. Smitty and his minions. And his minions. Yeah. Yeah. And it had a surface mount microphone, too. And it wasn't a bug, but you probably could have turned it into one. Yeah. Oh, and then... We talked about that we had some secret modes in that one. Oh, yeah. Oh, yeah. So every year... Right. This is actually good. Every year, we put in all sorts of secret stuff. And every year, no one finds it. So this year, we put in a lot of secret stuff and we actually told everybody that we put in secret stuff. And there's a lot of it, so chances are you'll find at least one thing. Yeah. So what was the one last year? Since we had a microphone... Oh, yeah. We were trying to figure out, well, what do you do with a microphone? We had some different ideas. And we were like, well, people are going to be at the black and white ball and it's, you know, DJ too fucking loud is going to be playing and it's going to be really loud. So why don't we detect the pressure level, the sound, and if they're in a loud environment for too long, the badge will go like, SOS, help me, help me, you know? In Morse code. I'm losing my... Yeah. And so we went into SOS, like Morse code mode, but nobody noticed. Yeah. No one noticed that, but they were probably too drunk. But I think so. So we did that one and we set the time limit to be like 30 minutes or something. Yeah. So if you're rocking out and partying for 30 minutes, then it would go off. And you know, like at every closing ceremonies, we want to do something cool. And for people who are like DEF CON 14 and 15, the lights were off and like awesome streams of light and everything, at least from up here, it looked really cool. So we did that for last year too. And that was sort of... For me, it was kind of anticlimactic because we forgot that we set the limit for 30 minutes. So we start playing that... You guys were here, right? And everyone's like, what the hell? Why are the lights off? The music's so loud. So we're playing the music, everyone's holding their badges and it's blinking and it looks cool, but we're waiting for this Morse code. Yeah. Waiting for everything to switch into like, help me, help me mode. Yeah. Oh, not 30 seconds. Yeah. Not 30 seconds, 30 minutes. And then, so I go back and look at the source later and I'm like, oh, Jeff, that's why it didn't work. So I don't know what we're gonna do this year, but it's always fun to do something. What was the year you had a, there was an exploit against our badge? Remember one year there was like a bug track posting on a exploit in the... Yeah. Wasn't that, I think that was the infrared one. If you... One year we had, you could load the SD memory card. Yeah. That was the infrared one. That was a ninja eye and you could transmit data back and forth. Yeah. If you put an SD card in. And the idea was that people would pass around anonymous data and you'd show up back at your room at the end of the night and you'd pull out your SD card and you'd look at all this cool shit you got just wandering around. Transmitting it. Which is already safe, right? But it didn't quite work out that way because, yeah, people didn't just stay there and hold the badges up to each other and it didn't, it took too long to sync even if we were, what, a hundred and something thousand baud? It was slow. Yeah. I wrote the routine myself so that tells you something. It was probably like three or four baud I think. The electrical engineer wrote the code. Yeah, yeah. You know how that goes. All right. So that's the retrospective and now we're gonna start the actual badge this year. Oh, wait. Tell them about the drama with the leakage of the info last year and why we... Yeah, was that last year or two years ago? Oh, with Wired. It started two years ago. Yeah. So we always wanted to leak a little bit of the information out there so you guys could get your kits ready if you were gonna use any decompilers or any hardware hacking stuff or whatever. You'd know enough about it in advance to maybe grab some tools and head out here. Because the first year we tried it we really didn't say anything and it was kind of hard. Yeah. So we figured we'd start leaking stuff. But how do you leak it without giving it all away? So we would do like two-part press interviews. Like here's sort of the overview and then the con would start. Then we'd dump everything so people would have a place to refer to. And it didn't quite work out. No, there was a misunderstanding and all the info got out on like Tuesday or something. So it's sort of... We like to have it sort of secret because then it's more of a surprise for people and it's like, cool. If you're at home and you haven't even come to DEF CON and you already know what stuff looks like, that's sort of lame. So... Yeah. So... This year we were a little more careful, I guess. But then we were doing a little bit of tweeting. Yeah. Now we've got the Twitterverse. So we've been trying to... Yeah. But sometimes people have been sending some misdirection out there. I think somebody was like, yeah... Somebody asked me, yeah, so which SIM card do I bring to plug in? I'm like, I'm not sure if it's AT&T or Verizon. Yeah. It's like... Someone asked me if the FCC had released our badges yet. Yeah. Because they were in for radio testing. Right. Yeah. We do give you a little misdirection, but... Yeah. That's always fun. All right. So you guys remember this? Badges by Christmas? Badges by Christmas. Yeah. No? Were you guys running the closing ceremonies? When everyone's like, yeah, badges by Christmas, and you all yelled it? Right? I have a video. You all yelled it. I have proof. And I believe we said, hmm. Yeah. And I was saying something like, if I got Jeff's credit card, then I would do it. I just couldn't get in touch with him until February. So here's the timeline. I'm gonna go through the timeline and some details. I'm gonna go through the timeline. There's a lot of details I wanna go into. Because previous talks, I've sort of skipped stuff, and then later, I'm like, oh, I really should have mentioned that. So now there's all sorts of stuff that you're probably saying, damn, I wish he was gonna stop talking. So timeline, fall 2009, after DEF CON, after we sort of recovered. It was actually before Christmas. We started initial brainstorming, just trying to figure out what we could do. Because every year, it's like, how are we gonna top that? What are we gonna... We've used... And then also, it's like, Joe will be like, oh, a new technology is coming along. Maybe we can use that. Let me get samples. Oh, no, that sucks. Okay, let's try another technology. Too expensive. Yeah, too expensive. Not enough parts. Too slow to manufacture. And so we were going through ideas. And then you start to investigate it, and three weeks later, you're like, that's not gonna work. Right. Yeah. And there's a lot of constraints that I'll go into. So we started brainstorming. And then January is when we actually had a pretty decent idea. I found these displays, and I'll talk about those later. But I found this cool display, and then we decided to go with an aluminum circuitry. It's a great board, because aluminum is awesome, and metal is like, yeah. I'm wearing my metal badge. So that was cool. And it's doing stuff. Yeah, and it's doing stuff. Yeah. So that was pretty cool. What did you say in your little speech in the program? It's like metal eliteness or something. It's pretty elite. So we started doing prototype design, hardware design in January. Basically, I set my milestones to the different Black Hat conferences. So at Black Hat DC, I tried to have the prototype hardware done so I could go when I went to see him, I could physically show him, because we don't live anywhere near each other. And we don't often Skype. And so let's see. Then we did, once we approved the hardware, then finished writing the firmware, at least the low-level stuff, made sure all the hardware worked. And then we could at least kick off the board order while we finished up the firmware. And that way, we could try to avoid some of the problems that we encountered last year. And then we ordered parts. And it's pretty much trouble-free. There's a few little hiccups that we'll go into. But the badges ended up arriving on time. So do you guys? Yeah. Do you guys like that? Are you happy with that? OK. Well, and the funny thing was is, well, you'll tell the story, but it's the wrong country's customs held it up. Yeah, yeah. Yeah. Well, at least you enjoy not standing in, well, I guess you have to stand in long lines anyway. So I don't know. I guess it was worth the effort to get him here on time. But it was good. So here are some more pictures. That's the OctoSquidly badge. Yeah. This is what happens when an electrical engineer uses a pen. And I'm like, we could do like an octopus. I'm like, hey, Joe, that's a great idea. Yeah. Neil. Neil, we need some help. Yeah, yeah. Over here, Neil. Yeah. So this was the original sketch. Actually, this was sort of my proposal to Jeff and Ping about even using the LCD. Because it's sort of like, how are we going to mount it? It's not really designed to be in a badge. And I was like, no, we can do it like this. We can have it on the front and have a slit and put it through and do laser stuff. And yeah, they sort of went with it. Yeah. It turned out that the squid form factor didn't quite work. Yeah. That got thrown out. So here's the next step. So basically, we had, you know, we knew what we were going to do. And I wanted to put together a paper mockup to figure out how I could align the LCD and the battery and everything. Because the pin out of the LCD was in such a way that I couldn't, I could only do it the way that you see. So pin 1 is on the left and pin 30 is on the right. So I couldn't move it any lower because all the other electronic stuff was in the way. So I had to do a bunch of mockup stuff. And then I built the prototype. So this is before the art. Oh, motherfucker. That's why someone called my cell phone. Call the hotline. Dead battery. Hate the badge. Need advice. Button stopped working. Make a suggestion. Wrong color. Badge problems. Call my cell phone. I expect that the goons will find out who did that and come tell me. And if you do decide to call me, you can go fuck yourself. Or I'll find you and do it for you. I like the one, wrong color. No, no. You got the color you're supposed to get. Yeah, yeah. Sorry we don't have any more spare red or black badges for you. But seriously, someone called me last night. And I'm like, who the fuck is that? And they're like, yeah, I really want to hack the badge. But there aren't any left. So maybe you can, you know, if you can give me one, that would be cool. Give me a call back. Thanks. Oh, no. They're also like, if you're not too wasted, give me a call back. So the guy obviously didn't know me. Yeah, so that was a little weird. So you'll just, you know, turn off your phone and just do text message, right? Yeah, right. Text message support. Yeah. So, damn. I'm not changing my phone number either. I like that one. So let's see. Yeah, prototype badge. Put the parts on. And this was the first time that I had everything together. Because it's hard to prototype with that, like, 30-pin flex connector without making actual circuit boards. So this is the first one. Before we had the artwork, we knew we wanted the general size to be the same. We wanted it to be, like, this iPhone type of thing. Because everyone loves the iPhones. We're like, well, let's make a badge that is the same size. And everyone's going to love that, too. Right. If they're hanging it around their neck, it's not, like, you know, huge. Yeah, like other years. Public enemy, like Flavor Flav style or anything. Not that that isn't cool. I have an idea for a badge next year, Joe. Big clocks? Yeah. And the Uber ones can have just huge gold chains? Yeah. We're going to start working on that right now. After this talk. So let's see. Prototype came in, did some hardware testing, low-level routines that I'll talk about. Writing the drivers. Basically getting everything working on this prototype board. And that's what I went to go show Jeff and everything at Black Hat Barcelona in Spain. So now it's like... Right before VolcanoCon when we all got trapped because of the volcano. Yeah, that was nice. That was a good time. And so everything worked. You know, we knew the hardware worked. And we knew the board worked. So we could at least start spinning that and finish working on all the firmware. So the firmware was done all over the place. I don't know if you guys have read the little thing I wrote in the program. But, like, the firmware development for badges in the past had been done, like, on my honeymoon and in buses and airplanes and everywhere. And this time was no different. Except I didn't have another honeymoon. This was in, like, the airport in Frankfurt. And so all different airplanes and airports. People riding airplanes never really like when I'm doing dev because I pull out, like, the board. And usually, like, the prototype has extra wires on it and the battery and the cable and, like, the USB tap. And, like, stuff is spread out everywhere. And I usually get stares. But people have actually asked. They're like, what is that thing? You like to sit on the aisle, right? So the big people on the inside are like, excuse me, I've got to go to the bathroom. Yeah. And you're like, don't touch that. That's right. It's like I'm in the middle of single stepping through some code. You're going to have to wait. I'm single stepping, so this could take a while. Yeah. So, yeah, those are some pictures. What about laser engraving? Well, we looked at a bunch of stuff. We wanted to acid that. Yeah, yeah, yeah. So, okay, yeah. So we knew we were going to use an aluminum substrate board because aluminum was just cool, right? Like, everyone else uses fiberglass. And the challenge of aluminum substrate is we needed to have everything on a single side of the board. So we'd have the front side clean. So we're like, all right, now we have the front side clean, what are we going to do? We've already done solder mask colors. We've already done different silkscreen artwork. Yeah, cutouts. Cutouts, yeah. So it's like, what can we do and what works great on aluminum? And it ended up being laser engraving. We looked at, like, sandblasting and actually etching instead of engraving. Yeah, yeah, we did acid etching, but then you have to submerge the whole board, right? Yeah. There's a problem where you couldn't protect the electronics. Yeah. So this gets into the area that we've never tried. You know, we were trying. We wanted to try something new and didn't know what it would turn out to be like, but we didn't want to completely sabotage the entire thing. So we decided to do the laser engraving, and Neil, of course, did all of the crazy, insane artwork. Yeah, and it turns out you have to invert the art. Yeah, you have to invert the art, and I think I might have a picture of that. But the real challenge was finding a vendor that wanted to do it, because every vendor is like, yeah, we'll laser engrave your coffee mug or your key chain. But it's like, can you laser engrave our circuit board? And they're like, what's a circuit board? And then they get all scared and everything. So it was really hard, and E-TechNet actually ended up finding a facility in China that would do it. Well, at one point we were going to Guatemala. Yeah. Or Guadalajara, yeah. I might even have slides on that. But basically they, you know, the factory in China would do it, but they jacked up the price because they didn't know how it was going to turn out, and they would probably have to spend more. And then E-TechNet jacked up the price in case they had to go and support it and everything. So the price was like, it ended up being like $6 to laser engrave. After doing the fab of the board, so we're like, oh, that's a lot. So we reached out to like some places in Guadalajara, which is some factories that Freescale uses, and since we have the connections to Freescale through the microcontroller, we reached out to just all our contacts. Like Ping reached out to all the people that used to do DEF CON badge manufacturing and everything. And it was like really nerve-wracking. And actually I was in South Africa, and you were somewhere, and Ping was somewhere, and we all had this conference call trying to figure out what to do. And we ended up getting a slightly lesser price from the laser engraver in China. It ended up being like $3. But we figured it was safer to at least do that instead of having to ship badges to all different places to have them like... We had problems with Chinese customs. I don't know a thing about Guadalajara customs. Guadalajara, yeah. At least it's Mexico. You can like drive there and just smuggle stuff back. And like throw a few people in there as well. No, you can pay somebody to smuggle it. Yeah, right, exactly. So here's the process of the laser engraving. I didn't actually ask Neil if I could use these, but I'm sure he won't mind. So we started off with like this pencil sketch and pen sketch. Yeah. Yeah, I was trying to tell... I was trying to say, you know, we want to have this whole portrayal of like a whole hacking scene of all these different things going on. And when you combine all the badges, you get a large piece of artwork. And so he started... This is his first draft where he was like, finally understood what I was trying to get at. And he kind of pulled this together. And so it was a good thing we got a picture of that before it disappeared. Yeah. And there's... I mean, this was a huge labor-intensive project. For him to do the artwork, it was like weeks. Well, and the aspect ratio of it all. Yeah. And then this is how it finally came out. Yeah, that's... In a form that could be lasered. And do you guys notice on your DEF CON or the Riviera Hotel keys that they match the image? Yeah. So if you can social engineer the people at the front desk, you can get all seven. And then you get the whole panoramic image. And you get the whole... Yeah. And so the artwork is totally cool. So then we had to work with the laser engraver to actually like get it done. And what's funny is the laser engravers, a lot of them still use CorelDRAW, like on Windows... 3.1? I think it was 3.1. Or like 3.1 or something. Yeah. Yeah. Really, really old equipment. So poor Neil, he sent me Adobe Illustrator CS with the latest... Four or whatever. Yeah. And we send that to the factory. And they're like, what's Adobe Illustrator? So there's a lot of back and forth to try to get into the format that they wanted. And they ended up doing it right where the white part is where it's been lasered. And the dark part is where there's no laser. But we had it reversed. So the first set we got back was inverted and we're like, this looks really shitty. So we tried it again and it looked all right. And it's a little like sort of hologram looking. So yes, they do have all different images on them. You just have to look really carefully. And they bill you for how long the laser dwells, right? Yeah. So how far down do you want a laser? Well, you're renting time and everything. And we're like, can we make it more contrasty? And it was just too risky. So it looks awesome. And no one's done that. And that's what we like to do. All right. So some functionality. Early block diagram. This is a little more of my style because they're just squares and arrows. We have the 56F8006, which is the Freescale part. And we have the display, USB to serial adapter, a bunch of interfaces and test points and some other things. So let's see. Let's go here. This is the same part we used last year. Do you guys remember that story where a bunch of these parts were stuck in customs going to the factory? And we had to order more to try to get those things. So we went through and those also got stuck in customs. So now we had like... We had like 50% more than we needed. Yeah. It was like 100% more parts stuck in customs. 14,000 parts at one point stuck in customs. And then half of those got released and came to you guys on the badges. And then the other half, like three months later, got sent back to my house. So we had all of these badges and... You can't return them three months later. No. Not after they're programmed and everything and they've been sitting in customs. So we had these parts and it's a great part. And I thought it would actually be cool to use it again because you guys who are hacking the badge are like, familiar with it now. And you can do some like really cool stuff. So, you know, there were some things we wanted to do. We actually were talking about doing some wireless functionality and some other things. But this part in particular just isn't suited for that. So like, all right, you know, what's it suited for? And we chose, you know, sort of chose a design based on that. All the data sheets are on the CD but they're also linked up there. For those that don't know, it's a pretty sweet part. It's like a 16-bit, essentially a digital signal processor. It's called a digital signal controller. It can do all sorts of things. It can do all sorts of cool like math functions and hardware-based accelerated stuff. 16K of internal flash. The PWM channel is what we used last year. I2C. Everything you could want in a cool little chip. We're powering it from three volts and there's a block diagram. So that one you should be familiar with and it's, you know, it's just a nice general purpose part. This is the cool thing. This is like I wanted to use a display for a really long time but the prices haven't been right and we never knew how we were going to mount the display. And everything. So this is a display from Kent Displays. And did you guys notice when you got your badges like you could sometimes see the DEF CON logo on there? Because these things are super cool. It's like this cholesteric LCD and the liquid crystal is twisted in some way that you don't need to refresh it. You can basically write to it and you don't have to refresh it or apply any power to the display once you write to it. Sort of like a Kindle or whatever. So you can, you know, write your image and then it draws. Essentially it draws no battery power at all unless you update it again. So during the test procedure I had them, you know, put up the DEF CON logo and then it would come to you. But you notice like sometimes it was fading and stuff because that if you push on the display it will fade because you're not actually refreshing it. You're just like untwisting the crystals or doing something. So then you have to hit a button or, you know, put power back on and it will refresh. It's just a really, really sweet little thing. Well in the battery life in the past, you know, we had these huge batteries and you're like walking around with this big thing around your neck. And now this thing. What was the power consumption? Yeah. So I have a power consumption chart that I'll show you guys. But previously, you know, it's always been a challenge because we want the badges to last the whole time and the LEDs not die and everything. So it's a really hard problem. So I'll show you the chart later. But the battery ends up lasting like two weeks. And it could be more but there was a few little things that we put in so you couldn't actually end up like physically damaging the flash device if you're trying to reprogram it. But there's some other modes that we could have done to make it last. So I'll show you the chart later. But the battery ends up lasting like a year or something. But two weeks is good because you'll be home by then. Hopefully. So, yeah, a bunch of different specs. So, you know, this was another one of those companies where I saw their thing online. I had seen them a bunch at different conferences. And I call them up and I'm like, hey, I'd love to use this cool display you have for this DEF CON conference. And they're like, DEF CON? What's that? And I explain the whole thing. And they're like, cool. And most companies, like most big companies, when you tell them what DEF CON is, they don't go cool. They hang up on you. And then they don't call you back. So these guys were totally into it. And it turns out that the sales guy I was talking to is this old school ham radio operator and everything. And, you know, he gets it. So they gave us huge, huge discounts. Essentially they gave us 100,000 quantity pricing for almost 8,000 pieces. And it still costs $3.50 each because these things are like a brand-new technology and everything. But it's just super cool. And it took a little bit of convincing, you know, because it costs so much. It's the most expensive badge ever. But the interesting thing is what was this originally designed for? Yeah. So this was originally, so actually it was not used in the first moon landing, for those who remember that. I guess nobody. It's like a totally different audience. Yeah. One person is like, yeah, I remember that. Dumbass, it was in 1968 or 42 or whatever. So, yeah, this wasn't used in the moon landing. It's usually designed for like the verbatim insight USB hard drives, which you guys have probably seen. But they're for sale right now. And the display is used to show like the remaining hard drive space. And it's usually designed to be inside of a bezel and protected. So we were the first ones to actually use it in like this exposed environment. So we ran into some interesting things. And we actually just discovered a problem with their display with the power down modes because it was something that verbatim had not needed. And then we start using, you know, our battery-powered device. And we wanted to do all sorts of stuff. And we totally discovered this bug. And they're like, holy shit. And I was like, holy shit, because we had like four days to get the firmware done. So they ended up sending us a revised version that they happened to have and just hadn't released yet. And it was good. So those guys are great to work with. And you notice like it's pretty slow to update the screen. So it's like 1.7 seconds. And that's kind of just the nature of the technology. The Kindle seems to flip faster. You sort of have, you know, you have Kent Displays and you have E-Ink are the two companies that I'm aware of that do this stuff. So the technology is slightly different. But these guys were excited about it. So we went with them. Yeah. Yeah. I think I have a slide on the adhesive. So the internals for this thing is cool. It takes a serial interface. And there's a bunch of external capacitors and components to set up the drive voltages. And then it's just a standard serial interface. So it's very, very easy to use. And there's a bunch of sample code that they gave me. And basically like a few hours in. The display came right up. So it was like, yeah, it was pretty cool. Made me feel good. So here's the schematic. And I'll step through like a few of the different functions in more detail. There's a seamless power switch between the battery and the USB connector. Because we figured if you're going to plug this thing into your computer and do all sorts of stuff with it, why drain battery power? So you can leave the battery plugged in and then plug in your mini USB to your computer. And now it's switching from the battery to the computer. Which is cool. That was actually like the hardest part to design hardware-wise. Even though it's like, oh, it's just a MOSFET and a diode. But I learned a lot about diodes during that time. And a lot about MOSFETs. So there's all sorts of debug and bootloader and some other things that I'll get into. Building materials, I always show this. Yeah, $14 per badge. That's not the only reason the price of DEF CON went up. I remember the first DEF CON badge was like $1.20. That was like $5. $5. But that's a big jump. And this actually doesn't include the cost of the Freescale processor because we already had those. So it would have been actually like $16 or $17. Or your labor. It does include your labor in there. Yeah, my time. Then the badge would have been like $35 a badge or something. $50. And the big ticket items were the LCD and the laser engraving was $384. But we wanted to try something new. And it's Jeff's money, so I figured we might as well just spend it. So here's the assembly drawing. All of these things are also in the CD, so when you do want to start hacking it, you'll notice there's no part designators on the actual board. These are the part designators. And some of you guys might have actually, like the last 40 badges were short a diode and possibly short a capacitor or maybe short a display. So now you can go to Hardware Hacking Village and put them back on. Yourself. Yeah. Yeah, I don't know. I don't see a sticker on the badge though. Yeah, well you'll see an arrow on it. Just if you're right at the end, like the last 40 people or something. But we expect to see you in the Hardware Hacking Village. And we're actually, with Jeff's permission, we brought all of the leftover components from previous badge builds. So we have reels of components and other things. You can come up and grab some of the RGB LEDs from last year, like the microphones, and put them into whatever you're hacking on this year for the contest. So free hardware. Here's the back side. You have your two switches on the left side. Your FTDI232. USB to serial adapter. JTAG port, which the footprints are there, but I actually have about 100 connectors to give out. And I'm going to get into all of that. So this year I actually decided to talk about what the badge really does. And I think previous years sometimes I forgot. So there's a few core modes and then there's all this other secret stuff that you guys are just going to have to figure out. So the glyph selection is, this is like our social experiment where we tried to do the social experiment with the infrared. So it's like, hi, my name's Joe. Do you want my data? Which sort of worked, but I think this might work better. Yeah, yeah. So then we decided, well, how can we help people be more social with the badges? And we've got a display. Something needs to go on the display. And Neil is like, that means I have to draw art, doesn't it? A lot of stuff, yeah. So we decided, you know, to put up basically different glyphs. And you could choose what glyphs you like if you're into, like, hardware or gaming or whatever. I'll show you some on the next slide. I like the one that's like booze. Yeah, yeah. I'm just here to drink. Yeah. And then you can take the emoticons and stick them on your badge and sort of show off to other people the things you're into. And that way you don't have to talk to anybody first. You can just look around and be like, oh, cool. I'm into gaming, too. Hey. You know? It's less awkward. Or, well, once you see the icons, you're like, hmm. Yeah. Except I don't know which is more awkward. It's like looking at that and it's like, ah, forget it. So there's some instructions on how to do it. You can figure it out. But you basically use, you know, the buttons. Here are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Yeah. So all 11 of them. So let's see. If you're into drinking, gambling, sex. Which one is sex? Well, love. Oh, yeah. Yeah, yeah. Or looking for love. That's right. And then music. So that could be, you know, a typical, you could either be a rock star. Yeah. Or you could be a total geek. We had to blend the two lifestyles. Or in that case, you'd have like the floppy disk in the heart or something. I guess there were any of them in the heart. So, and then you can potentially build your own. Yes. You can build your own. You can do all sorts of stuff. What we decided to do this year, too, is since we had the USB port and we're using the USB port primarily for the serial bootloader that I'll talk about so you can hack the badge and load your own firmware, blah, blah, blah. You know, what could we do with the USB port in just regular user mode? So I decided to create this little API that would let you control the LCD through the serial port. So in case you're not like a hardware guy and you don't want to do all sorts of hardware stuff but you still want to hack the badge and do something for the contest or show off or load your name or, you know, change whatever, you can do it using scripts. Somebody actually I saw at the EFF party yesterday had already done something which was really cool. It said hello. And I was very proud of that. That the API actually worked. So you can do all sorts of stuff. So hopefully you guys take advantage of that because it's something, you know, just to expand what can be done and what people can do. Yeah. Yeah. So a lot of this kind of came from Jeff because he wanted to make it easier for more of you guys to hack on the badge whereas I wanted to actually make it harder and more challenging. Yeah. For software guys. There's a lot of software guys out there, right? How many people, like, use software? A lot of people. Yeah. So you can use, you know, you can even use, you know, whatever to send stuff to a comp port. Doesn't matter what operating system. Doesn't matter, you know, you could use an Arduino if you're into Arduino. So here's a little description of it. You plug the USB in, you're going to detect, it's going to detect an FTDI USB to serial adapter. You probably don't need any drivers if you've installed any sort of USB to serial adapter before. If you do, you can just click yes, like, you know, download drivers because, I don't know, they're there. It should be easy and seamless. You plug it in, the badge is going to give you a little welcome string and ASCII and then here are the commands. You can clear the frame buffer which is in RAM on the device. You can load different bytes into the frame buffer and then you can update the display and that will give you your update and then you hit X to exit it. Or you just take the battery out. And you'll get an ACK after each command. Now the tricky part is that the commands are actually in ASCII but then for loading the byte you have this load byte VV into frame buffer location AA. So you have to look at this. This next page which is the memory map for the actual display which isn't your typical matrix like that. So maybe somebody wants to write a little wrapper to handle that but I couldn't figure it out. So you have to load, you know, you have to look at the memory map with the LCD and then load your data in hex bytes. So you have your, you know, a non-printable ASCII. So you have your ASCII character and then the three non-printable ASCII hex bytes. So that's the only tricky thing. So you can't really only be in hyper terminal the whole time. Yeah, so check out the data sheet which is also on the CD. And here's the memory map. So those are like the only two core functions. We want to keep it really simple. Like there's previous years badges I felt like we provided so much stuff it was hard for people to figure out like what they wanted to hack on and everything. And sort of force feed you features. So then this year we tried to go the other way. Like force feed you capability and then you guys can figure out what to do with it. So there's all sorts of secret modes. We had in March we did this call. Call for integration. And we're basically like what can we do to involve people more and not keep it just like, you know, Joe locked in his office talking to Jeff once in a while. Yeah, so the idea here was that everybody's, we want to try to make the badge more central. And we've got memory on it. And it's something everybody's basically going to, unfortunately not everybody, but basically the majority of everybody will have. So if we're going to put a secret on there or a clue or a certificate or we're going to do something, why not, besides us having cool stuff on there, why not let everybody else that we trust in the contests put clues on their other areas. And try to make it more central to a lot of different things you're going to do and just max out the RAM. Yeah. And so there's a lot of stuff on there. Some of it I don't even know what it is. We just had people say put this chunk of data or hide this string or do this or do that. So I'd work it in to where it would seem relevant to do. And a few people have found things. But there's a lot there. And, you know, you can get the benefits of different contests. The last was Space Rogue. Oh, yeah. Is Space Rogue here? I guess he wouldn't admit it anyway. So, you know, we took all these submissions from people and we decided which ones are cool that people would really enjoy. And so Space Rogue from Hacker News Network was like, yeah, you know, I want to give away a free T-shirt. We're like, all right, you're cool. You know, we go way back from the loft and everything. So we put them in. But we wanted to keep it all secret. Like we figured, you know, people would hide data and not tell anybody. So as soon as I was like, yeah, we'll put your data in. He, like, sends out a tweet and, like, his HNN, like, all over the place. It's like, fine, you know, DEF CON is going to hide data. And we're like, you totally just, like, blew it. And I made up a whole story and told him that Jeff was really pissed and that we were going to take it out and everything. And he, like, profusely apologized. That's funny because I never heard from him. He's just like, sorry, dude. But, yeah, so we tried to keep everything secret. And, actually, I'm going to tell a story that might embarrass two people here. I don't think I've ever met them in person. So that's why I'm going to say it. So one of the things was this guy that was like, yeah, man, you know, I'm going to actually propose to my girlfriend. And I want to do it through the badge. And I'm like, yeah, I'm, like, a sensitive kind of guy, you know. I'm like, I got goosebumps and tears and everything. And you're Joe Smooth. Yeah. You know, I'm known to be pretty suave with the ladies. Swash. Yeah. So I was like, that's cool. That's a good way to propose. Well, he couldn't get the airplane with the streamer behind it. Right. He couldn't see it from inside of the RIV. So we were going to integrate, like, this, you know, secret message of some sort for the person to find. And he would propose. And, you know, we probably would have made, like, a big production out of it. And he probably would have come up here and stuff. So we had him on the list. And then as I started integrating stuff, I emailed him. I'm like, all right, man, what should we do? And he's like, actually, there's a little problem. I'm not getting, I'm not, I'm not, we broke up. And then I got an email from his ex-girlfriend. That had said, you know, it was something basically the same thing. It's like, sorry, or whatever. I don't even know how she knew that he was going to propose to her unless she was, like, reading his mail or something. It was really, it was actually really strange. I was like, oh, that totally sucks. And he's like, well, maybe you can write, you know, maybe you can put in this poem or something. I'm like, no. You know, it was like a love poem. Because, like, wedding proposal is okay for DEF CON. But, like, groveling love poem is not okay. So that didn't make it in. It's unfortunate. Okay. So some other badge stuff. This is, these are things sometimes I forget to say. So other stuff you might want to know. If you don't want to know it, you can leave. Don't, I won't feel bad. Because there's other talks going on soon. And actually, we're going to end up with a lot of extra time anyway. So you won't miss your next talk, really. We're actually going to be able to have questions and answers here, too. Okay. So the development environment is the exact same as last year. It's the Freescale Code Warrior for 56-8000. Specialization. Specialization is free for up to 64K of Flash. And we only have 16K. So totally free. Like beer. And it's not open source. Which people always complain about to me. But, you know, the tool was chosen. The part was chosen for a reason. And the tool kind of follows along with it. And Freescale was nice enough at least to make it free. As opposed to charging us money. And it is Windows only. Works fine in VM. All the tools are on the DEF CON CD. So you don't have to go to the interweb or anything to download the tools. The one main part that's really cool is Processor Expert. And I mentioned this last year. Where basically it's this GUI for configuring the peripherals. And everyone loves GUIs. And no one loves configuring peripherals. So it's like a perfect match. Basically it takes care of doing all of the low level drivers and interface functions for timers and serial port and PWM and everything. So you don't have to actually do a lot of the setup. You can just select your bean. Which is what each module is called. Configure your bean. And then drop it into the code. You generate code and it will generate it. So if you're not a low level embedded guy. You can still develop stuff. And I use the beans. I use Processor Expert. So if you load up the source code that's on the CD. You'll be able to see how everything is configured. Who's planning on hacking their badge for the badge hacking contest? Three people. Seriously? Are there more? Five? Six? Seven? Eight? Nine? Ten? That's good. We're going up in numbers. So this might interest you. The serial static bootloader we had last year. Except this year it's easier to use. Because last year we just had test points. You had to wire up a bunch of stuff. This year we have the mini USB port right there for your use. And all you need is a USB port and a terminal program and you're good to go. You can load your code right up on the badge. To enable the mode. Hold SW1 and SW2 on power up. What I like to do. Since you need to have your computer plugged in. Remove the battery and then make sure it's off. And then just plug the device into the computer. And that way the unit is going to come up. No batteries there. You don't have that switch over problem of maybe the badge still being on. And you're not able to get into the bootloader. So just hold down SW1 and SW2 on power up. Both LEDs are going to come on. Virtual com port is going to appear. And you're good to go. It's waiting for the bootloader. So use your dev tools from Code Warrior. Modify your stuff. There's a few caveats with that though. When you're modifying your code. You have to make sure that you. If you change the vector table. You have to make sure that you change the reset and the COP vectors. To point to the bootloader. Which are the first two in the vector table. Otherwise when you reflash your code. And you go to run it. It's going to jump right to your user code. But if for some reason you brick something. Or you want to reload something again. You can't because it's never going to get back to the bootloader. So make sure you change that. And if you end up bricking it. There's a way to do it. But read the details in CPU.C. And for those who did it last year. You're familiar with it already. It's 9600 baud. And use your elf.s output file. And it takes like 90 seconds to load. But it's cool. Because you don't need any hardware at all. Like any external hardware. And that was the real key. Is trying to do something like. We can't make it much easier than that. But in case you totally screw up. And brick your badge. And forget to change the vector tables. Or just do something and completely clobber it. There is the JTAG interface on there as well. And that's where that 7 by 2 row footprint is. I have about 100 of the connectors. That I'm carrying around with me. And if I don't get it costed on the way to the hardware hacking village. Giving them out. I'll leave the remainder of them up there. And you can just solder them on. And use the USB tap hardware. Which is also what we used last year. There will be a few of those up in the hardware hacking village. And you can just completely load the flash back on. Which is the DC18-with-boot. Which is the bootloader. So it's cool. So there's two ways to do it. And it's just very, very simple. All right. So say you want to create your own graphics. And put porn on the badge or something. Which if you do. You might score very highly in the badge hacking contest. If I have anything to say about it. So you can load your own graphics. Basically it uses the. At least this is how I did it. If you are into software and stuff. You could probably do it a different way. But I used the Kent display tool. Which comes on the CD. Which was designed for 132 by 64. Their older display. But basically what you do. Is you convert the bitmap to an array. And then you cut off a bunch of the bytes that aren't used. To get to your 128 by 32 pixel size. So you convert the image. And then you use your tool. And then you erase the unused bytes. And then you copy the data into the array. So you said older badge. Does the newer one have more pixels? No. So this was one of their. Actually I shouldn't even say older display. Just for a different display. That's bigger. That wouldn't fit on the badge. It was like way too big. So that's why it's trained. So they don't have. This part is so new. The 128 by 32 that we're using on this badge. Is so new that they don't even have. The right development tools set up yet. So we're making use of the old ones. And actually by. I think they're coming out soon. But it might be too late for Def Con to use them. But this way is totally fine. So here I even like made a little step by step. Graphic. I had a lot of time on an airplane. When I made these slides. So choose your source file. Which is going to be your image. And it has to be. It has to be 132 by 64. Otherwise if it's not 132 by 64. It's going to give you an error. Then you just generate the C array. And it says C array generated. And then if you compare. Like what one should look like on the left. To one that you get from the output on the right. You have those four extra bytes. At four different locations. So you just cut those out. They're all FFs. And then it looks like that. And then you just load that code in. And you're good to go. So here's the power consumption stuff. So we're using a CR2032 lithium coin cell. Which this is sort of the battery of choice. For batteries. Because it's small. It's thin. It's cheap. Defcon 14. We used one. Defcon 15. We used two. Defcon 16. We used that gigantic photo battery. And then last year we used the CR2032. But the problem is it doesn't like high current consumption. And it's only really good for things that are like very, very low standby current. And things that maybe have a little pulse for like a second. But so that's the challenge. Is trying to get the power consumption down to a point where the badge would be good. And useful for at least the time of Defcon. And this time we finally exceeded it. So in idle mode when you're not doing anything. It draws about 700 microamps. .7 milliamps. The only power consumption at that point is the microprocessor. And it's in a sleep mode. But it's not in the lowest sleep mode. Because it turns out if you put it into the lowest sleep mode. You're reducing the clock to like 180 kilohertz or something like that. And then if you try to debug without bringing the device back into its normal clock. And you try to write to flash at 180 kilohertz. You could completely screw the flash. Like physically damage the flash. Which we ended up doing a few times along the way. And luckily John Winters. One of the guys from Freescale who helped design the chip. Came to Defcon last year. And he's an old school MIT hacker and everything. And one of the few people that actually also does work on like Memorial Day weekend. And holidays and stuff like that. So when I encountered this problem. I'm like wait the sleep mode isn't working. And now I can't reprogram my badge or anything. And I call him up. And he's like hey. You know he just happened to be home. And we spent the weekend like troubleshooting this whole thing. And debugging stuff and getting it working. But that was you know. Who knew that you could physically damage flash using a debugger. I had no idea. So when you're. So in idle state. Which it normally is always in idle. It's just sitting there sleeping. In active mode once you hit a button. And it's like updating the LCD. It's 8.3 milliamps for less than a second. So it is a little bit of a peak. And then it goes back down and settles. And goes to sleep. So really even if you're like continually changing screens and stuff. It's not really drawing that much current. If you're transmitting through a serial port. I'm not going to tell you how that's done. It's 6.7 milliamps. And you're not going to tell them because. Because it's a secret. You guys writing that down? Yeah. Secret. And you maybe will figure it out. Maybe not. I'll tell you at closing ceremony is what it's for. So you can use this thing for two weeks. Which is cool. And I'm really happy with how it turned out. Say you have typical daily use of an hour active. Which means an hour of the display updating constantly. Which you're probably not going to sit there and update it for an hour. But even if you do it's still going to last nine days. Here's a little power consumption chart. For a single LCD refresh you can see it just sort of peaks. Then comes down really quickly. Multiple mode changes. If you're switching stuff around and selecting your glyphs. You see a little more peaks. And the serial port is like this steady power consumption. For those that are into graphs. And I thought that was kind of neat. This is something I'm really proud of. Because I'm not really an analog guy. I'm just a digital guy. I design embedded systems. And having to like take out and use a mosfet and a diode was like cool. I'm a real engineer now. So the seamless power switching was something I mentioned was really important. Just because you had the battery in there. But why run it on the battery all the time if you're going to plug it into your computer. But what's also cool is say you plug it into your computer. Then you want to take out the battery. You can do that and the system's not going to crash. Or say you have it plugged into your computer. And then you want to go mobile. You can plug in your battery. And then take out the USB. And you're still going to be up with no glitching. So the way I have it set up here is there's a. God I hope I remember this. This was a long time ago when I did this. I have a P channel mosfet that's on by default. Because I have R4 pulling it down. So that's going to be on by default. Meaning that VBAT is going to connect to VCC. And then VCC is the system power that goes everywhere else. When the USB is plugged in. Then the 3V3 out which is from the FT232. Which is a 3.3 volt low drop out regulator output. That's used. It's like a 25 milliamp current source. So you can power some things with it. When you plug into the USB port. So that line goes high. And turns off the mosfet. And then the battery is isolated from the circuit. And then you have the D5. Now passing current the other way. From 3V3 to VCC. And there is a little bit. Of leakage from the body diode of the mosfet. So there is some leakage coming back into the battery. But it's really really small. Like nanoamps. And that's okay to back power a lithium battery. At nanoamp range. But if it's something larger. And say you put in a different mosfet for some reason. You could like explode the battery. And then the one other interesting thing. Is the voltage drop across D5. Causes VCC to be lower. So we're not actually seeing 3.3. We're seeing like 2.6. When we're running it off the USB port. And there's all sorts of problems. That I ran into with diodes. Because you always think of a diode as being this ideal device. It's like you let current flow one way. And it blocks the other way. But it's not really like that in the real world. Current will flow one way. But then there's leakage backwards. And then there's the voltage drop across the diode. So basically the higher the voltage drop. The less leakage. The less reverse leakage you have. But then the higher voltage drop. You lose that voltage. So I was going with a really low voltage drop device. Because we were on 3.3 volts. I was like well I don't want to drop it too low. But then I was actually powering the device. Through. I was powering the FTDI part. The USB to serial adapter. Through the battery. And the thing was coming on. And it's like that shouldn't be on. So it was this whole problem. And I switched out the diode to just a more general purpose one. And it worked fine. And here's some other pretty pictures. So this is switching from battery to USB. God you can barely see that. But VBAT's at the top. And then you can see 3V3 out is low. And then when you plug in USB it goes high. There's a tiny little like 50 microsecond glitch. At VCC. When it drops from battery voltage down to the USB voltage. But totally works. And then here's the other way. Of USB to battery. So say you have it plugged in. And then you pull it out. And it goes back to battery. You see a little like half volt droop. And then you can see the battery. Or 3V3 out sort of drain. And then the battery stays level. So all sorts of neat stuff. Badge types. Here are the different quantities. So 7,000 human. Sorry. It should have been like 10,000. But live and learn I guess. You can never correctly estimate it. And people are always like why don't you just order more badges. But those badges cost money. And it's hard to get stock. And then we don't want to end up with like 2,000 left over badges. So here there just were no more parts. Yeah. So that was the other thing. We originally were going to do 6,000 human badges. And after I ordered all of the parts. And got everything sent over to the factory. Jeff was like can we order more? We should probably order more. And I'm like all right. So we ordered 1,000 more. But it turns out I called up free scale. I called up all the distributors. Trying to get 1,000 more of the 56F8006. Semiconductor. There was only like 1,000 left in stock. And I was like wow. Because all the factories now are on what's called on allocation. And they're so backlogged it's ridiculous. Like parts now anywhere you look. Most parts have like a 17 to 26 week lead time. So we could get parts for next DEF CON. But not for this DEF CON. And that's anywhere you look. So we could only end up buying 1,000 anyway. So it's lucky we only did that. Yeah. Just really wild. So let's see. Uber there's 30. So you want to get one of those. Actually yeah. So what I didn't mention in these slides is. You guys remember like all the customs issues we had. Right. From the two years ago and last year. Where parts were getting stuck in Chinese customs going to the factory. So they couldn't even start manufacturing badges until like the Monday or Tuesday of Black Hat before DEF CON. And then of course you know what happened. That was the year of $30,000 of overnight FedEx charges. Yeah. Which brought the cost up of the badge a lot. $30,000 of yeah. FedEx loved us that year. So getting stuck in Chinese customs just was not an option anymore. We just couldn't. We couldn't take it. Like I couldn't come up here again and say sorry guys. The parts are stuck in customs. So as luck would have it. E-TechNet has had a lot of problems with customs going into China. So they ended up setting up an office in Macau. Which is a special region and has different customs rules than the rest of mainland China. So we could send stuff to some person at some law office somewhere. Which is you know. A gigantic building somewhere. We could send all the parts to Macau. And then somehow they smuggled them into China. Into mainland China. I didn't ask how. But it worked great. And so all the parts got through totally fine. We did have a few problems coming back into the U.S. When all of the badges were built. Because of some documentation problems. You know. We were shipping it to the Black Hat warehouse. Care of Caesar's Palace. Care of some other warehouse with you know. Joe Grant. Customs I guess is getting really strict. Trying to bring stuff into the U.S. now. And I heard they hold stuff all the time. So there's a documentation issue that Ping took care of. And the good thing is at least they spoke English. So it was easy to deal with that. And like the next day the parts came through. So that was the only little hiccup. Here's a little time chart that I always show. This was interesting. Because it's like half the time was on firmware. And half the time was on hardware. And let's see. Research meetings. We didn't really have a lot of meetings. And you know. Administrative stuff. Yeah compared to last year. So it was 150 hours total. Last year was. I can't add that up so quickly. A little more. I think it was like 160. And the year before it was 180. So we're getting more efficient. The less time we're stuck in customs. Yeah. Less time waiting. OK. So badge hacking contest. Once again. Jeff is going to help me judge. So you guys don't think that I'm playing favorites. Because I don't play favorites anyway. But Jeff is going to help me. Because last year there were so many submissions. And there were so many good ones. We're like oh my god what are we going to do. And I call him like freaking out. Trying to get some help. So we're going to be judging the entries. And you actually get to win a black badge. If you win the contest. Because I cleaned out my lab. And cleaned out my closet and stuff. So there's all sorts of cool things that you really want. Freescale has actually given a bunch of dev tools and stuff. To give away. Yeah. So it's definitely going to be worth doing. And we're awarding the top three. Previous entries if you want to read all about the contest and stuff. Just go to my website. And check out like the DEF CON 14 badge or whatever. All you need to know is. At 2 p.m. on Sunday in the hardware hacking village. Is when we're going to start taking submissions. So I'll be there. I probably won't be there. But I'll give him the rundown. When we start deliberating the results. And I'll take pictures and video it and everything. And you have like a few minutes to show your stuff. So I hope to see you guys there. And we're looking forward to what you can do. Especially if you're not in the hardware. If you're a little bit nervous about the hardware. You can still use the USB serial port. And do something cool. I think that's a different category. There's the people who do all hardware. And the people who do software. Yeah we haven't exactly decided. How we're going to judge stuff. And who's going to win. But maybe there'll be multiple winners. Software only or hardware only. But we're not going to tell you that. Because we don't want to limit you. You just do what you do. And make your project. And hack your badge. And then we'll decide what to do about it. So that's actually it. And we have some time for questions. For the first time ever. People can ask questions in the room. You have to use a microphone. And I guess before people come up. Just to reiterate what Jeff said. We've been doing the electronic badges for a long time. The fifth year. And I feel like we've sort of. If we haven't solely set the trend. We've kind of helped push that. And conferences and parties are doing electronic badges everywhere. Which is awesome. Everybody has their own constraints. And it's cool to see what people are doing. But I think it's safe to say. That we might do something different in the future. If I'm involved. And we'll see what happens. But it's been a fun ride so far. And thanks for coming. And stay if you have questions. Any questions? No.